mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 07:19:41 +02:00
fix(kube): make app autorefresh and show system settings stay [EE-6771] (#11257)
Some checks are pending
ci / build_images (map[arch:amd64 platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:amd64 platform:windows version:1809]) (push) Waiting to run
ci / build_images (map[arch:amd64 platform:windows version:ltsc2022]) (push) Waiting to run
ci / build_images (map[arch:arm platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:arm64 platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:ppc64le platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:s390x platform:linux version:]) (push) Waiting to run
ci / build_manifests (push) Blocked by required conditions
/ triage (push) Waiting to run
Lint / Run linters (push) Waiting to run
Test / test-client (push) Waiting to run
Test / test-server (map[arch:amd64 platform:linux]) (push) Waiting to run
Test / test-server (map[arch:amd64 platform:windows version:1809]) (push) Waiting to run
Test / test-server (map[arch:amd64 platform:windows version:ltsc2022]) (push) Waiting to run
Test / test-server (map[arch:arm64 platform:linux]) (push) Waiting to run
Some checks are pending
ci / build_images (map[arch:amd64 platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:amd64 platform:windows version:1809]) (push) Waiting to run
ci / build_images (map[arch:amd64 platform:windows version:ltsc2022]) (push) Waiting to run
ci / build_images (map[arch:arm platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:arm64 platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:ppc64le platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:s390x platform:linux version:]) (push) Waiting to run
ci / build_manifests (push) Blocked by required conditions
/ triage (push) Waiting to run
Lint / Run linters (push) Waiting to run
Test / test-client (push) Waiting to run
Test / test-server (map[arch:amd64 platform:linux]) (push) Waiting to run
Test / test-server (map[arch:amd64 platform:windows version:1809]) (push) Waiting to run
Test / test-server (map[arch:amd64 platform:windows version:ltsc2022]) (push) Waiting to run
Test / test-server (map[arch:arm64 platform:linux]) (push) Waiting to run
This commit is contained in:
parent
5088634a41
commit
84ca6185dc
1 changed files with 14 additions and 12 deletions
|
@ -169,20 +169,22 @@ angular.module('portainer.kubernetes').controller('KubernetesApplicationsDatatab
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$onChanges = function (changes) {
|
this.$onChanges = function (changes) {
|
||||||
// when the table is visible, sync the show system setting with the stack show system setting
|
if (this.settingsLoaded) {
|
||||||
if (changes.isVisible && changes.isVisible.currentValue) {
|
// when the table is visible, sync the show system setting with the stack show system setting
|
||||||
const storedStacksSettings = DatatableService.getDataTableSettings('kubernetes.applications.stacks');
|
if (changes.isVisible && changes.isVisible.currentValue) {
|
||||||
if (storedStacksSettings && storedStacksSettings.state) {
|
const storedStacksSettings = DatatableService.getDataTableSettings('kubernetes.applications.stacks');
|
||||||
this.settings.showSystem = storedStacksSettings.state.showSystemResources;
|
if (storedStacksSettings && storedStacksSettings.state) {
|
||||||
|
this.settings.showSystem = storedStacksSettings.state.showSystemResources;
|
||||||
|
DatatableService.setDataTableSettings(this.settingsKey, this.settings);
|
||||||
|
}
|
||||||
|
} else if (typeof this.isSystemResources !== 'undefined') {
|
||||||
|
this.settings.showSystem = this.isSystemResources;
|
||||||
DatatableService.setDataTableSettings(this.settingsKey, this.settings);
|
DatatableService.setDataTableSettings(this.settingsKey, this.settings);
|
||||||
}
|
}
|
||||||
} else if (typeof this.isSystemResources !== 'undefined') {
|
this.state.namespace = this.namespace;
|
||||||
this.settings.showSystem = this.isSystemResources;
|
this.updateNamespace();
|
||||||
DatatableService.setDataTableSettings(this.settingsKey, this.settings);
|
this.prepareTableFromDataset();
|
||||||
}
|
}
|
||||||
this.state.namespace = this.namespace;
|
|
||||||
this.updateNamespace();
|
|
||||||
this.prepareTableFromDataset();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$onInit = function () {
|
this.$onInit = function () {
|
||||||
|
@ -226,7 +228,7 @@ angular.module('portainer.kubernetes').controller('KubernetesApplicationsDatatab
|
||||||
// make show system in sync with the stack show system settings
|
// make show system in sync with the stack show system settings
|
||||||
const storedStacksSettings = DatatableService.getDataTableSettings('kubernetes.applications.stacks');
|
const storedStacksSettings = DatatableService.getDataTableSettings('kubernetes.applications.stacks');
|
||||||
if (storedStacksSettings && storedStacksSettings.state) {
|
if (storedStacksSettings && storedStacksSettings.state) {
|
||||||
this.settings.showSystem = storedStacksSettings.state.showSystemResources;
|
this.settings.showSystem = storedStacksSettings.state.showSystemResources || this.settings.showSystem;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setSystemResources && this.setSystemResources(this.settings.showSystem);
|
this.setSystemResources && this.setSystemResources(this.settings.showSystem);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue