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

fix(metrics): disable metric server api calls if metric server is disabled on k8s endpoint EE-1273 EE-1274 (#5377)

* - metric server api call disabled on cluster view
- metric server api call disabled on node view
- metric server api call disabled on namespace view

* enforcing resource access to function to ensure similarity to ee implementation
This commit is contained in:
zees-dev 2021-08-13 16:46:18 +12:00 committed by GitHub
parent 7b6a31181e
commit 5fe90db36a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 29 additions and 17 deletions

View file

@ -244,7 +244,9 @@ class KubernetesResourcePoolController {
return app;
});
await this.getResourceUsage(this.pool.Namespace.Name);
if (this.state.useServerMetrics) {
await this.getResourceUsage(this.pool.Namespace.Name);
}
} catch (err) {
this.Notifications.error('Failure', err, 'Unable to retrieve applications.');
} finally {