From: Afreen Misbah Date: Mon, 23 Feb 2026 19:33:15 +0000 (+0530) Subject: mgr/dashboard: Css fixes for health card and alerts card X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0abb6837ace384c2004c73a56f2f105aa953a632;p=ceph.git mgr/dashboard: Css fixes for health card and alerts card Signed-off-by: Afreen Misbah --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/alerts-card/overview-alerts-card.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/alerts-card/overview-alerts-card.component.html index 58d0451d12b..f500e96e45a 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/alerts-card/overview-alerts-card.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/alerts-card/overview-alerts-card.component.html @@ -1,4 +1,4 @@ - + @if (vm$ | async; as vm) {

@if(vm?.overallSystemSev) {
+ [class.overview-health-card-tab-selected]="activeSection === 'system'">
Systems @@ -137,35 +137,20 @@ i18n>Some cluster components are degraded and may require attention.

-
- - - Monitor + @for (item of healthItems; track item.key; let isLast = $last) { +
+ + + + {{ item.label }} + -

Quorum: {{vm?.mon?.value}}

-
-
- - - Manager - -

{{vm?.mgr?.value}}

-
-
- - - OSD - -

{{vm?.osd?.value}}

-
-
- - - Nodes - -

{{vm?.hosts?.value}}

+

+ {{ vm?.[item.key]?.value }} +

+ }
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/health-card/overview-health-card.component.scss b/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/health-card/overview-health-card.component.scss index 2357bba13b1..2d6309aeaeb 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/health-card/overview-health-card.component.scss +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/health-card/overview-health-card.component.scss @@ -42,6 +42,12 @@ max-block-size: fit-content; } + &-icon-and-text { + display: inline-flex; + align-items: center; + gap: var(--cds-spacing-03); + } + // Overrides .clipboard-btn { padding: var(--cds-spacing-02); @@ -63,4 +69,8 @@ color: var(--cds-link-primary); border-block-end: 1px dotted var(--cds-link-primary); } + + &-icon-and-text cd-icon svg { + display: block; + } } 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 6f4c74fa652..49372345ae1 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 @@ -35,6 +35,13 @@ type OverviewHealthData = { type TabSection = 'system' | 'hardware' | 'resiliency'; +interface HealthItemConfig { + key: 'mon' | 'mgr' | 'osd' | 'hosts'; + label: string; + prefix?: string; + i18n?: boolean; +} + @Component({ selector: 'cd-overview-health-card', imports: [ @@ -64,6 +71,12 @@ export class OverviewHealthCardComponent { @Output() viewIncidents = new EventEmitter(); activeSection: TabSection | null = null; + healthItems: HealthItemConfig[] = [ + { key: 'mon', label: $localize`Monitor` }, + { key: 'mgr', label: $localize`Manager` }, + { key: 'osd', label: $localize`OSD` }, + { key: 'hosts', label: $localize`Nodes` } + ]; toggleSection(section: TabSection) { this.activeSection = this.activeSection === section ? null : section; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/overview.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/overview.component.html index aa451678508..1e7f9864170 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/overview.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/overview.component.html @@ -2,6 +2,7 @@ @let health = (healthCardVm$ | async);