mirror of
https://github.com/portainer/portainer.git
synced 2025-07-20 05:49:40 +02:00
feat(k8s): display namespace status and terminating namespaces (#5551)
refactor(k8s): use function instead of filter
This commit is contained in:
parent
e4fe4f9a43
commit
8d157c2c33
3 changed files with 25 additions and 7 deletions
|
@ -38,6 +38,17 @@ angular.module('portainer.docker').controller('KubernetesResourcePoolsDatatableC
|
|||
return !ctrl.isSystemNamespace(item) || (ctrl.settings.showSystem && ctrl.isAdmin);
|
||||
};
|
||||
|
||||
this.namespaceStatusColor = function(status) {
|
||||
switch (status.toLowerCase()) {
|
||||
case 'active':
|
||||
return 'success';
|
||||
case 'terminating':
|
||||
return 'danger';
|
||||
default:
|
||||
return 'primary';
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Do not allow system namespaces to be selected
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue