From 930e48008403ce246105a0cc631efba2974494f4 Mon Sep 17 00:00:00 2001 From: Aashish Sharma Date: Wed, 17 May 2023 17:37:41 +0530 Subject: [PATCH] mgr/dashboard: Status column in Cluster > Hosts shows empty Fixes: https://tracker.ceph.com/issues/61215 Signed-off-by: Aashish Sharma --- .../src/app/ceph/cluster/hosts/hosts.component.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.ts index 6089965fc7487..b7cad7e3c3378 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.ts @@ -217,7 +217,8 @@ export class HostsComponent extends ListWithDetails implements OnDestroy, OnInit cellTransformation: CellTemplate.badge, customTemplateConfig: { map: { - maintenance: { class: 'badge-warning' } + maintenance: { class: 'badge-warning' }, + available: { class: 'badge-success' } } } }, @@ -495,6 +496,11 @@ export class HostsComponent extends ListWithDetails implements OnDestroy, OnInit .subscribe( (hostList) => { this.hosts = hostList; + this.hosts.forEach((host: object) => { + if (host['status'] === '') { + host['status'] = 'available'; + } + }); this.transformHostsData(); this.isLoadingHosts = false; }, -- 2.39.5