mirror of https://github.com/portainer/portainer
feat(tasks): add missing task states, set new default state color (#1459)
parent
f1d9b72a06
commit
f3b5f803f5
|
@ -55,16 +55,19 @@ angular.module('portainer.filters', [])
|
||||||
'use strict';
|
'use strict';
|
||||||
return function (text) {
|
return function (text) {
|
||||||
var status = _.toLower(text);
|
var status = _.toLower(text);
|
||||||
if (includeString(status, ['new', 'allocated', 'assigned', 'accepted'])) {
|
var labelStyle = 'default';
|
||||||
return 'info';
|
if (includeString(status, ['new', 'allocated', 'assigned', 'accepted', 'preparing', 'ready', 'starting', 'remove'])) {
|
||||||
|
labelStyle = 'info';
|
||||||
} else if (includeString(status, ['pending'])) {
|
} else if (includeString(status, ['pending'])) {
|
||||||
return 'warning';
|
labelStyle = 'warning';
|
||||||
} else if (includeString(status, ['shutdown', 'failed', 'rejected'])) {
|
} else if (includeString(status, ['shutdown', 'failed', 'rejected', 'orphaned'])) {
|
||||||
return 'danger';
|
labelStyle = 'danger';
|
||||||
} else if (includeString(status, ['complete'])) {
|
} else if (includeString(status, ['complete'])) {
|
||||||
return 'primary';
|
labelStyle = 'primary';
|
||||||
}
|
} else if (includeString(status, ['running'])) {
|
||||||
return 'success';
|
labelStyle = 'success';
|
||||||
|
}
|
||||||
|
return labelStyle;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
.filter('containerstatusbadge', function () {
|
.filter('containerstatusbadge', function () {
|
||||||
|
|
Loading…
Reference in New Issue