1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-02 20:35:25 +02:00

feat(applications): application page performance improvements EE-4956 (#8569)

This commit is contained in:
Prabhat Khera 2023-03-08 10:27:42 +13:00 committed by GitHub
parent 01ea9afe33
commit bdde278139
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 239 additions and 9 deletions

View file

@ -35,7 +35,8 @@ class KubernetesResourcePoolController {
KubernetesPodService,
KubernetesApplicationService,
KubernetesIngressService,
KubernetesVolumeService
KubernetesVolumeService,
KubernetesNamespaceService
) {
Object.assign(this, {
$async,
@ -54,6 +55,7 @@ class KubernetesResourcePoolController {
KubernetesApplicationService,
KubernetesIngressService,
KubernetesVolumeService,
KubernetesNamespaceService,
});
this.IngressClassTypes = KubernetesIngressClassTypes;
@ -219,6 +221,7 @@ class KubernetesResourcePoolController {
return;
}
await this.KubernetesResourcePoolService.toggleSystem(this.endpoint.Id, namespaceName, !this.isSystem);
await this.KubernetesNamespaceService.refreshCacheAsync();
this.Notifications.success('Namespace successfully updated', namespaceName);
this.$state.reload(this.$state.current);

View file

@ -1,4 +1,4 @@
<page-header ng-if="ctrl.state.viewReady" title="'Namespace list'" breadcrumbs="['Namespaces']" reload="true"></page-header>
<page-header ng-if="ctrl.state.viewReady" title="'Namespace list'" breadcrumbs="['Namespaces']" on-reload="(ctrl.onReload)" reload="true"></page-header>
<kubernetes-view-loading view-ready="ctrl.state.viewReady"></kubernetes-view-loading>

View file

@ -17,6 +17,12 @@ class KubernetesResourcePoolsController {
this.getResourcePoolsAsync = this.getResourcePoolsAsync.bind(this);
this.removeAction = this.removeAction.bind(this);
this.removeActionAsync = this.removeActionAsync.bind(this);
this.onReload = this.onReload.bind(this);
}
async onReload() {
await this.KubernetesNamespaceService.refreshCacheAsync();
this.$state.reload(this.$state.current);
}
async removeActionAsync(selectedItems) {
@ -48,6 +54,7 @@ class KubernetesResourcePoolsController {
}
}
}
await this.KubernetesNamespaceService.refreshCacheAsync();
}
removeAction(selectedItems) {