mirror of
https://github.com/portainer/portainer.git
synced 2025-08-05 05:45:22 +02:00
refactor(kube/apps): migrate stacks table to react [EE-4661] (#10091)
This commit is contained in:
parent
a5f60c64ef
commit
25d5e62f5c
31 changed files with 516 additions and 565 deletions
|
@ -30,18 +30,15 @@
|
|||
</uib-tab>
|
||||
<uib-tab index="2" classes="btn-sm" select="ctrl.selectTab(2)">
|
||||
<uib-tab-heading class="vertical-center"> <pr-icon icon="'list'"></pr-icon> Stacks </uib-tab-heading>
|
||||
|
||||
<kubernetes-applications-stacks-datatable
|
||||
dataset="ctrl.state.stacks"
|
||||
table-key="kubernetes.applications.stacks"
|
||||
order-by="Name"
|
||||
refresh-callback="ctrl.getApplications"
|
||||
remove-action="ctrl.removeStacksAction"
|
||||
on-refresh="(ctrl.getApplications)"
|
||||
on-remove="(ctrl.removeStacksAction)"
|
||||
namespaces="ctrl.state.namespaces"
|
||||
namespace="ctrl.state.namespaceName"
|
||||
on-change-namespace-dropdown="(ctrl.onChangeNamespaceDropdown)"
|
||||
is-apps-loading="ctrl.state.isAppsLoading"
|
||||
is-system-resources="ctrl.state.isSystemResources"
|
||||
set-system-resources="(ctrl.setSystemResources)"
|
||||
is-loading="ctrl.state.isAppsLoading"
|
||||
on-namespace-change="(ctrl.onChangeNamespaceDropdown)"
|
||||
>
|
||||
</kubernetes-applications-stacks-datatable>
|
||||
</uib-tab>
|
||||
|
|
|
@ -144,10 +144,12 @@ class KubernetesApplicationsController {
|
|||
}
|
||||
|
||||
onChangeNamespaceDropdown(namespaceName) {
|
||||
this.state.namespaceName = namespaceName;
|
||||
// save the selected namespaceName in local storage with the key 'kubernetes_namespace_filter_${environmentId}_${userID}'
|
||||
this.LocalStorage.storeNamespaceFilter(this.endpoint.Id, this.user.ID, namespaceName);
|
||||
return this.$async(this.getApplicationsAsync);
|
||||
return this.$async(async () => {
|
||||
this.state.namespaceName = namespaceName;
|
||||
// save the selected namespaceName in local storage with the key 'kubernetes_namespace_filter_${environmentId}_${userID}'
|
||||
this.LocalStorage.storeNamespaceFilter(this.endpoint.Id, this.user.ID, namespaceName);
|
||||
return this.getApplicationsAsync();
|
||||
});
|
||||
}
|
||||
|
||||
async getApplicationsAsync() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue