From: Afreen Misbah Date: Thu, 25 Jun 2026 18:59:11 +0000 (+0530) Subject: mgr/dashboard: fix hardware health card icon rendering X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7ec4b48e8af5a30ecf990eef5a130190fbe608a4;p=ceph.git mgr/dashboard: fix hardware health card icon rendering Hardware category icons were rendering as empty SVGs because of wrong reference Signed-off-by: Afreen Misbah --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/health-card/overview-health-card.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/health-card/overview-health-card.component.html index bdb7045b7ec..3e4bf0f5783 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/health-card/overview-health-card.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/health-card/overview-health-card.component.html @@ -303,19 +303,17 @@ @if (hwEnabled && hwSections) {
- @for (section of sections; track $index; let isLast = $last) { -
- @for (row of section; track row.key) { -
- - - - {{ row.label }} - - + @for (section of hwSections; track $index; let isLast = $last) { +
+ @for (row of section; track row.key) { +
+ + + + {{ row.label }} + + @if (row.error > 0) { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/health-card/overview-health-card.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/health-card/overview-health-card.component.ts index 7d8855e204e..f3ff1cac477 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/health-card/overview-health-card.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/health-card/overview-health-card.component.ts @@ -52,10 +52,20 @@ type HwKey = keyof typeof HardwareNameMapping; type HwRowVM = { key: HwKey; label: string; + icon: string; ok: number; error: number; }; +const HW_ICON_MAP: Record = { + memory: 'dataEnrichment', + storage: 'vmdkDisk', + processors: 'chip', + network: 'network1', + power: 'plug', + fans: 'ibmStreamSets', +}; + @Component({ selector: 'cd-overview-health-card', imports: [ @@ -154,6 +164,7 @@ export class OverviewHealthCardComponent { return (Object.keys(HardwareNameMapping) as HwKey[]).map((key) => ({ key, label: HardwareNameMapping[key], + icon: HW_ICON_MAP[key], ok: Number(category?.[key]?.ok ?? 0), error: Number(category?.[key]?.error ?? 0) }));