feat(tasks): add missing task states, set new default state color (#1459)

pull/1470/head
Miguel A. C 7 years ago committed by Anthony Lapenna
parent f1d9b72a06
commit f3b5f803f5

@ -55,16 +55,19 @@ angular.module('portainer.filters', [])
'use strict';
return function (text) {
var status = _.toLower(text);
if (includeString(status, ['new', 'allocated', 'assigned', 'accepted'])) {
return 'info';
var labelStyle = 'default';
if (includeString(status, ['new', 'allocated', 'assigned', 'accepted', 'preparing', 'ready', 'starting', 'remove'])) {
labelStyle = 'info';
} else if (includeString(status, ['pending'])) {
return 'warning';
} else if (includeString(status, ['shutdown', 'failed', 'rejected'])) {
return 'danger';
labelStyle = 'warning';
} else if (includeString(status, ['shutdown', 'failed', 'rejected', 'orphaned'])) {
labelStyle = 'danger';
} else if (includeString(status, ['complete'])) {
return 'primary';
}
return 'success';
labelStyle = 'primary';
} else if (includeString(status, ['running'])) {
labelStyle = 'success';
}
return labelStyle;
};
})
.filter('containerstatusbadge', function () {

Loading…
Cancel
Save