1
0
Fork 0
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:
xAt0mZ 2020-07-24 04:45:02 +02:00 committed by GitHub
parent 99db41f96e
commit 3953acf110
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 336 additions and 23 deletions

View file

@ -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;