mirror of https://github.com/portainer/portainer
fix(cache): cache fixes [EE-6293] (#10681)
* fix(cache): default cache to on for new users [EE-6293] * clear cache to transition terminating namespace * add rq requests back to the namespace view --------- Co-authored-by: testa113 <testa113>pull/10684/head
parent
2f91315ac7
commit
04c1c7d8fb
|
@ -65,6 +65,7 @@ func (handler *Handler) userCreate(w http.ResponseWriter, r *http.Request) *http
|
|||
user = &portainer.User{
|
||||
Username: payload.Username,
|
||||
Role: portainer.UserRole(payload.Role),
|
||||
UseCache: true,
|
||||
}
|
||||
|
||||
settings, err := handler.DataStore.Settings().Settings()
|
||||
|
|
|
@ -2,6 +2,7 @@ import angular from 'angular';
|
|||
import { confirm } from '@@/modals/confirm';
|
||||
import { ModalType } from '@@/modals';
|
||||
import { buildConfirmButton } from '@@/modals/utils';
|
||||
import { dispatchCacheRefreshEvent } from '@/portainer/services/http-request.helper';
|
||||
|
||||
class KubernetesResourcePoolsController {
|
||||
/* @ngInject */
|
||||
|
@ -75,7 +76,11 @@ class KubernetesResourcePoolsController {
|
|||
|
||||
async getResourcePoolsAsync() {
|
||||
try {
|
||||
this.resourcePools = await this.KubernetesResourcePoolService.get();
|
||||
this.resourcePools = await this.KubernetesResourcePoolService.get('', { getQuota: true });
|
||||
// make sure table refreshes with fresh data when namespaces are in a terminating state
|
||||
if (this.resourcePools.some((namespace) => namespace.Namespace.Status === 'Terminating')) {
|
||||
dispatchCacheRefreshEvent();
|
||||
}
|
||||
} catch (err) {
|
||||
this.Notifications.error('Failure', err, 'Unable to retreive namespaces');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue