From: Afreen Misbah Date: Mon, 23 Feb 2026 10:23:13 +0000 (+0530) Subject: fix for quorum in API X-Git-Tag: testing/wip-vshankar-testing-20260224.100235~4^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=db08d851bc99b6c6a1cbb7cbbd3865ba743b75b9;p=ceph-ci.git fix for quorum in API Signed-off-by: Afreen Misbah --- diff --git a/src/pybind/mgr/dashboard/controllers/health.py b/src/pybind/mgr/dashboard/controllers/health.py index 5d3257b61dd..abc6dfee823 100644 --- a/src/pybind/mgr/dashboard/controllers/health.py +++ b/src/pybind/mgr/dashboard/controllers/health.py @@ -391,7 +391,7 @@ class Health(BaseController): if self._has_permissions(Permission.READ, Scope.MONITOR): summary['monmap'] = { 'num_mons': data.get('monmap', {}).get('num_mons'), - 'quorum': data.get('monmap', {}).get('quorum') + 'quorum': data.get('quorum', {}) } if self._has_permissions(Permission.READ, Scope.OSD): 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 7230aa877ec..df65726d9df 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 @@ -103,9 +103,10 @@ } @if(vm?.overallSystemSev) { -
- +
+
Systems @@ -137,31 +140,31 @@
- Monitor + Monitor -

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

+

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

- Manager + Manager -

{{vm?.mgr?.value}}

+

{{vm?.mgr?.value}}

- OSD -

{{vm?.osd?.value}}

+

{{vm?.osd?.value}}

- Nodes + Nodes -

{{vm?.hosts?.value}}

+

{{vm?.hosts?.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 b1d754f658d..2357bba13b1 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 @@ -20,6 +20,10 @@ color: var(--cds-text-secondary); } + &-tab { + display: flex; + } + &-tab-selected { border-block-end: 2px solid var(--cds-border-interactive) !important; @@ -35,6 +39,7 @@ &-tab-content-item { border-right: 1px solid var(--cds-border-subtle); + max-block-size: fit-content; } // Overrides diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/overview.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/overview.component.spec.ts index b6b0c4d0c2d..c7183146375 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/overview.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/overview.component.spec.ts @@ -116,7 +116,7 @@ describe('OverviewComponent', () => { ); expect(vm.hosts).toEqual( expect.objectContaining({ - value: '1 offline, 4 available', + value: '0 / 5 available', severity: expect.any(String) }) ); @@ -188,9 +188,6 @@ describe('OverviewComponent', () => { // ngOnDestroy // ----------------------------- it('should complete destroy$', () => { - // NOTE: your component now uses DestroyRef + takeUntilDestroyed, - // so there is no (component as any).destroy$ anymore. - // The simplest test here is to just ensure it can be destroyed without error. expect(() => fixture.destroy()).not.toThrow(); }); }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/overview.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/overview.component.ts index 35b381dcbdf..ba2612c6489 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/overview.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/overview.component.ts @@ -143,7 +143,7 @@ export class OverviewComponent { ); readonly storageVm$ = this.healthData$.pipe( - map((data) => ({ + map((data: HealthSnapshotMap) => ({ total: data.pgmap?.bytes_total ?? 0, used: data.pgmap?.bytes_used ?? 0 })), diff --git a/src/pybind/mgr/dashboard/frontend/src/styles/ceph-custom/_spacings.scss b/src/pybind/mgr/dashboard/frontend/src/styles/ceph-custom/_spacings.scss index f82e8b37e72..fa40ae54ad1 100644 --- a/src/pybind/mgr/dashboard/frontend/src/styles/ceph-custom/_spacings.scss +++ b/src/pybind/mgr/dashboard/frontend/src/styles/ceph-custom/_spacings.scss @@ -74,6 +74,10 @@ margin-left: layout.$spacing-05; } +.cds-mr-1 { + margin-right: layout.$spacing-01; +} + .cds-mr-2 { margin-right: layout.$spacing-02; }