From f6968c8a7a3c6f2a10527ddd6f049b312b677c5d Mon Sep 17 00:00:00 2001 From: bryanmontalvan <68972382+bryanmontalvan@users.noreply.github.com> Date: Tue, 2 Aug 2022 21:39:05 -0400 Subject: [PATCH] mgr/dashboard: Start of status card This commit is the bare-bones work of the status card. The only logic written in this commit is the Cluster health status icon. Signed-off-by: bryanmontalvan --- .../dashboard/dashboard.component.html | 38 ++++++++++++++++++- .../dashboard/dashboard.component.ts | 12 +++++- 2 files changed, 47 insertions(+), 3 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/new-dashboard/dashboard/dashboard.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/new-dashboard/dashboard/dashboard.component.html index 8316d59d974ec..0b72e8c275a0e 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/new-dashboard/dashboard/dashboard.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/new-dashboard/dashboard/dashboard.component.html @@ -13,10 +13,44 @@ - - Text +
+ + +

Cluster

+ +

Data Health

+
+
+
+

Notifications

+ + + + + 1 + + + + 1 + + + + 1 + + + + 1 + +
; + healthData: any; constructor( private summaryService: SummaryService, private configService: ConfigurationService, @@ -36,7 +38,8 @@ export class DashboardComponent implements OnInit, OnDestroy { private clusterService: ClusterService, private osdService: OsdService, private authStorageService: AuthStorageService, - private featureToggles: FeatureTogglesService + private featureToggles: FeatureTogglesService, + private healthService: HealthService ) { this.permissions = this.authStorageService.getPermissions(); this.enabledFeature$ = this.featureToggles.get(); @@ -47,6 +50,7 @@ export class DashboardComponent implements OnInit, OnDestroy { this.osdSettings$ = this.osdService.getOsdSettings(); this.capacity$ = this.clusterService.getCapacity(); + this.getHealth(); } ngOnDestroy() { @@ -67,4 +71,10 @@ export class DashboardComponent implements OnInit, OnDestroy { version[0] + ' ' + version.slice(2, version.length).join(' '); }); } + + getHealth() { + this.healthService.getMinimalHealth().subscribe((data: any) => { + this.healthData = data; + }); + } } -- 2.39.5