1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-29 10:19:41 +02:00

fix(stacks): conditionally hide node and namespace stacks [EE-6949] (#11528)
Some checks failed
ci / build_images (map[arch:amd64 platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:amd64 platform:windows version:1809]) (push) Has been cancelled
ci / build_images (map[arch:amd64 platform:windows version:ltsc2022]) (push) Has been cancelled
ci / build_images (map[arch:arm platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:arm64 platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:ppc64le platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:s390x platform:linux version:]) (push) Has been cancelled
/ triage (push) Has been cancelled
Lint / Run linters (push) Has been cancelled
Test / test-client (push) Has been cancelled
Test / test-server (map[arch:amd64 platform:linux]) (push) Has been cancelled
Test / test-server (map[arch:amd64 platform:windows version:1809]) (push) Has been cancelled
Test / test-server (map[arch:amd64 platform:windows version:ltsc2022]) (push) Has been cancelled
Test / test-server (map[arch:arm64 platform:linux]) (push) Has been cancelled
ci / build_manifests (push) Has been cancelled

This commit is contained in:
Ali 2024-04-19 17:33:26 +12:00 committed by GitHub
parent d5c4671320
commit d73b162d16
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 70 additions and 58 deletions

View file

@ -68,9 +68,9 @@
ng-click="$ctrl.changeOrderBy('Name')"
></table-column-header>
</th>
<th>
<th ng-if="!$ctrl.deploymentOptions.hideStacksFunctionality">
<table-column-header
col-title="'StackName'"
col-title="'Stack'"
can-sort="true"
is-sorted="$ctrl.state.orderBy === 'StackName'"
is-sorted-desc="$ctrl.state.orderBy === 'StackName' && $ctrl.state.reverseOrder"

View file

@ -1,10 +1,12 @@
import KubernetesApplicationHelper from 'Kubernetes/helpers/application';
import { getDeploymentOptions } from '@/react/portainer/environments/environment.service';
angular.module('portainer.docker').controller('KubernetesResourcePoolApplicationsDatatableController', [
'$scope',
'$controller',
'$async',
'DatatableService',
function ($scope, $controller, DatatableService) {
function ($scope, $controller, $async, DatatableService) {
angular.extend(this, $controller('GenericDatatableController', { $scope: $scope }));
this.isExternalApplication = function (item) {
@ -12,36 +14,40 @@ angular.module('portainer.docker').controller('KubernetesResourcePoolApplication
};
this.$onInit = function () {
this.setDefaults();
this.prepareTableFromDataset();
return $async(async () => {
this.setDefaults();
this.prepareTableFromDataset();
this.state.orderBy = this.orderBy;
var storedOrder = DatatableService.getDataTableOrder(this.tableKey);
if (storedOrder !== null) {
this.state.reverseOrder = storedOrder.reverse;
this.state.orderBy = storedOrder.orderBy;
}
this.deploymentOptions = await getDeploymentOptions();
var textFilter = DatatableService.getDataTableTextFilters(this.tableKey);
if (textFilter !== null) {
this.state.textFilter = textFilter;
this.onTextFilterChange();
}
this.state.orderBy = this.orderBy;
var storedOrder = DatatableService.getDataTableOrder(this.tableKey);
if (storedOrder !== null) {
this.state.reverseOrder = storedOrder.reverse;
this.state.orderBy = storedOrder.orderBy;
}
var storedFilters = DatatableService.getDataTableFilters(this.tableKey);
if (storedFilters !== null) {
this.filters = storedFilters;
}
if (this.filters && this.filters.state) {
this.filters.state.open = false;
}
var textFilter = DatatableService.getDataTableTextFilters(this.tableKey);
if (textFilter !== null) {
this.state.textFilter = textFilter;
this.onTextFilterChange();
}
var storedSettings = DatatableService.getDataTableSettings(this.tableKey);
if (storedSettings !== null) {
this.settings = storedSettings;
this.settings.open = false;
}
this.onSettingsRepeaterChange();
var storedFilters = DatatableService.getDataTableFilters(this.tableKey);
if (storedFilters !== null) {
this.filters = storedFilters;
}
if (this.filters && this.filters.state) {
this.filters.state.open = false;
}
var storedSettings = DatatableService.getDataTableSettings(this.tableKey);
if (storedSettings !== null) {
this.settings = storedSettings;
this.settings.open = false;
}
this.onSettingsRepeaterChange();
});
};
},
]);