diff --git a/app/filters/filters.js b/app/filters/filters.js index efc463d23..ee3b6435a 100644 --- a/app/filters/filters.js +++ b/app/filters/filters.js @@ -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 () {