mirror of
https://github.com/portainer/portainer.git
synced 2025-07-21 14:29:40 +02:00
feat(k8s/volumes): introduce storage rollup panel (#4055)
* feat(k8s/applications): storages rollup panel * feat(k8s/volumes): move storages table to volumes view * feat(k8s/volumes): minor UI update * feat(k8s/volumes): remember the selected tab * feat(api/k8s): update user default policies * feat(k8s/ui): minor UI update Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com>
This commit is contained in:
parent
99db41f96e
commit
3953acf110
12 changed files with 336 additions and 23 deletions
|
@ -1,5 +1,5 @@
|
|||
import angular from 'angular';
|
||||
import _ from 'lodash-es';
|
||||
import * as _ from 'lodash-es';
|
||||
import KubernetesStackHelper from 'Kubernetes/helpers/stackHelper';
|
||||
import KubernetesApplicationHelper from 'Kubernetes/helpers/application';
|
||||
|
||||
|
@ -10,6 +10,7 @@ class KubernetesApplicationsController {
|
|||
this.$state = $state;
|
||||
this.Notifications = Notifications;
|
||||
this.KubernetesApplicationService = KubernetesApplicationService;
|
||||
|
||||
this.Authentication = Authentication;
|
||||
this.ModalService = ModalService;
|
||||
this.LocalStorage = LocalStorage;
|
||||
|
@ -95,9 +96,10 @@ class KubernetesApplicationsController {
|
|||
|
||||
async getApplicationsAsync() {
|
||||
try {
|
||||
this.applications = await this.KubernetesApplicationService.get();
|
||||
this.stacks = KubernetesStackHelper.stacksFromApplications(this.applications);
|
||||
this.ports = KubernetesApplicationHelper.portMappingsFromApplications(this.applications);
|
||||
const applications = await this.KubernetesApplicationService.get();
|
||||
this.applications = applications;
|
||||
this.stacks = KubernetesStackHelper.stacksFromApplications(applications);
|
||||
this.ports = KubernetesApplicationHelper.portMappingsFromApplications(applications);
|
||||
} catch (err) {
|
||||
this.Notifications.error('Failure', err, 'Unable to retrieve applications');
|
||||
}
|
||||
|
@ -109,14 +111,12 @@ class KubernetesApplicationsController {
|
|||
|
||||
async onInit() {
|
||||
this.state = {
|
||||
activeTab: 0,
|
||||
activeTab: this.LocalStorage.getActiveTab('applications'),
|
||||
currentName: this.$state.$current.name,
|
||||
isAdmin: this.Authentication.isAdmin(),
|
||||
viewReady: false,
|
||||
};
|
||||
|
||||
this.state.activeTab = this.LocalStorage.getActiveTab('applications');
|
||||
|
||||
await this.getApplications();
|
||||
|
||||
this.state.viewReady = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue