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

feat(k8s): remove cluster status panel (#5570)

This commit is contained in:
Anthony Lapenna 2021-09-28 13:48:06 +13:00 committed by GitHub
parent f0a88b7367
commit 46ffca92fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 0 additions and 139 deletions

View file

@ -15,7 +15,6 @@ class KubernetesClusterController {
KubernetesNodeService,
KubernetesMetricsService,
KubernetesApplicationService,
KubernetesComponentStatusService,
KubernetesEndpointService
) {
this.$async = $async;
@ -26,32 +25,16 @@ class KubernetesClusterController {
this.KubernetesNodeService = KubernetesNodeService;
this.KubernetesMetricsService = KubernetesMetricsService;
this.KubernetesApplicationService = KubernetesApplicationService;
this.KubernetesComponentStatusService = KubernetesComponentStatusService;
this.KubernetesEndpointService = KubernetesEndpointService;
this.onInit = this.onInit.bind(this);
this.getNodes = this.getNodes.bind(this);
this.getNodesAsync = this.getNodesAsync.bind(this);
this.getApplicationsAsync = this.getApplicationsAsync.bind(this);
this.getComponentStatus = this.getComponentStatus.bind(this);
this.getComponentStatusAsync = this.getComponentStatusAsync.bind(this);
this.getEndpointsAsync = this.getEndpointsAsync.bind(this);
this.hasResourceUsageAccess = this.hasResourceUsageAccess.bind(this);
}
async getComponentStatusAsync() {
try {
this.componentStatuses = await this.KubernetesComponentStatusService.get();
this.hasUnhealthyComponentStatus = _.find(this.componentStatuses, { Healthy: false }) ? true : false;
} catch (err) {
this.Notifications.error('Failure', err, 'Unable to retrieve cluster component statuses');
}
}
getComponentStatus() {
return this.$async(this.getComponentStatusAsync);
}
async getEndpointsAsync() {
try {
const endpoints = await this.KubernetesEndpointService.get();
@ -152,14 +135,12 @@ class KubernetesClusterController {
this.state = {
applicationsLoading: true,
viewReady: false,
hasUnhealthyComponentStatus: false,
useServerMetrics,
};
await this.getNodes();
if (this.isAdmin) {
await this.getEndpoints();
await this.getComponentStatus();
await this.getApplications();
}