diff --git a/app/kubernetes/components/datatables/resource-pools-datatable/resourcePoolsDatatable.html b/app/kubernetes/components/datatables/resource-pools-datatable/resourcePoolsDatatable.html
index 4002b169c..2bf68bad8 100644
--- a/app/kubernetes/components/datatables/resource-pools-datatable/resourcePoolsDatatable.html
+++ b/app/kubernetes/components/datatables/resource-pools-datatable/resourcePoolsDatatable.html
@@ -92,6 +92,13 @@
+
+
+ Status
+
+
+
+ |
Quota
@@ -124,6 +131,9 @@
{{ item.Namespace.Name }}
system
+ |
+ {{ item.Namespace.Status }}
+ |
{{ item.Quota ? 'Yes' : 'No' }} |
{{ item.Namespace.CreationDate | getisodate }} {{ item.Namespace.ResourcePoolOwner ? 'by ' + item.Namespace.ResourcePoolOwner : '' }} |
diff --git a/app/kubernetes/components/datatables/resource-pools-datatable/resourcePoolsDatatableController.js b/app/kubernetes/components/datatables/resource-pools-datatable/resourcePoolsDatatableController.js
index c7f4e1896..a669e3bc0 100644
--- a/app/kubernetes/components/datatables/resource-pools-datatable/resourcePoolsDatatableController.js
+++ b/app/kubernetes/components/datatables/resource-pools-datatable/resourcePoolsDatatableController.js
@@ -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
*/
diff --git a/app/kubernetes/services/namespaceService.js b/app/kubernetes/services/namespaceService.js
index fa26d5442..df8670b0f 100644
--- a/app/kubernetes/services/namespaceService.js
+++ b/app/kubernetes/services/namespaceService.js
@@ -41,14 +41,11 @@ class KubernetesNamespaceService {
const data = await this.KubernetesNamespaces().get().$promise;
const promises = _.map(data.items, (item) => this.KubernetesNamespaces().status({ id: item.metadata.name }).$promise);
const namespaces = await $allSettled(promises);
- const visibleNamespaces = _.map(namespaces.fulfilled, (item) => {
- if (item.status.phase !== 'Terminating') {
- return KubernetesNamespaceConverter.apiToNamespace(item);
- }
+ const allNamespaces = _.map(namespaces.fulfilled, (item) => {
+ return KubernetesNamespaceConverter.apiToNamespace(item);
});
- const res = _.without(visibleNamespaces, undefined);
- updateNamespaces(res);
- return res;
+ updateNamespaces(allNamespaces);
+ return allNamespaces;
} catch (err) {
throw new PortainerError('Unable to retrieve namespaces', err);
}
|