1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-07 14:55:27 +02:00

fix(ns): save filter to local storage [EE-5287] (#8723)

* fix(ns): save filter to local storage [EE-5287]

* allow system ns and save per user

---------

Co-authored-by: testa113 <testa113>
This commit is contained in:
Ali 2023-03-30 11:21:05 +13:00 committed by GitHub
parent 308a78db21
commit 7f805ac5be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 42 additions and 19 deletions

View file

@ -105,6 +105,13 @@ angular.module('portainer.app').factory('LocalStorage', [
const activeTab = localStorageService.get('active_tab_' + key);
return activeTab === null ? 0 : activeTab;
},
storeNamespaceFilter: function (environmentId, userID, data) {
// store one filter per environment
localStorageService.set(`kubernetes_namespace_filter_${environmentId}_${userID}`, data);
},
getNamespaceFilter: function (environmentId, userID) {
return localStorageService.get(`kubernetes_namespace_filter_${environmentId}_${userID}`);
},
storeLogoutReason: (reason) => localStorageService.set('logout_reason', reason),
getLogoutReason: () => localStorageService.get('logout_reason'),
cleanLogoutReason: () => localStorageService.remove('logout_reason'),