]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
fix for quorum in API
authorAfreen Misbah <afreen@ibm.com>
Mon, 23 Feb 2026 10:23:13 +0000 (15:53 +0530)
committerAfreen Misbah <afreen@ibm.com>
Mon, 23 Feb 2026 17:22:15 +0000 (22:52 +0530)
Signed-off-by: Afreen Misbah <afreen@ibm.com>
src/pybind/mgr/dashboard/controllers/health.py
src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/health-card/overview-health-card.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/health-card/overview-health-card.component.scss
src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/overview.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/overview.component.ts
src/pybind/mgr/dashboard/frontend/src/styles/ceph-custom/_spacings.scss

index 5d3257b61dd07d215d71bf0e32e957ee3df830c7..abc6dfee823c8b8ad4b97c4edb82112c4853e8d3 100644 (file)
@@ -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):
index 7230aa877ec966ba8b9efa8af39704b5ad65d4eb..df65726d9df6e2f0b4091d5912274588c0b1829c 100644 (file)
   }
   <!-- SYSTEM TAB -->
   @if(vm?.overallSystemSev) {
-    <div [ngClass]="{'overview-health-card-tab-selected': activeSection === 'system'}">
-      <cd-icon
-        [type]="vm?.overallSystemSev"></cd-icon>
+    <div class="overview-health-card-tab"
+         [ngClass]="{'overview-health-card-tab-selected': activeSection === 'system'}">
+      <div class="cds-mb-1"><cd-icon
+        [type]="vm?.overallSystemSev"></cd-icon></div>
       <cds-tooltip-definition
         [highContrast]="true"
         [openOnHover]="true"
         class="cds-ml-2"
         [caret]="true"
         (click)="toggleSection('system')"
-        description="Click to view health incidents"
+        description=""
         i18n-description>
         <span
+          class="cds-mr-1"
+          [ngClass]="{'cds--type-heading-compact-01': activeSection === 'system'}"
           i18n>
           Systems
         </span>
           <div class="overview-health-card-tab-content-item cds-pr-8">
             <span>
               <cd-icon [type]="vm?.mon?.severity"></cd-icon>
-              <span class="cds--type-body-compact-01 cds-ml-2">Monitor</span>
+              <span class="cds--type-body-compact-01 cds-ml-3">Monitor</span>
             </span>
-            <p class="cds--type-label-01 cds-mt-3 overview-health-card-secondary-text">Quorum: {{vm?.mon?.value}}</p>
+            <p class="cds--type-label-01 cds-mt-3 cds-mb-0 overview-health-card-secondary-text">Quorum: {{vm?.mon?.value}}</p>
           </div>
           <div class="overview-health-card-tab-content-item cds-pr-8">
             <span>
               <cd-icon [type]="vm?.mgr?.severity"></cd-icon>
-              <span class="cds--type-body-compact-01 cds-ml-2">Manager</span>
+              <span class="cds--type-body-compact-01 cds-ml-3">Manager</span>
             </span>
-            <p class="cds--type-label-01 cds-mt-3 overview-health-card-secondary-text">{{vm?.mgr?.value}}</p>
+            <p class="cds--type-label-01 cds-mt-3 cds-mb-0 overview-health-card-secondary-text">{{vm?.mgr?.value}}</p>
           </div>
           <div class="overview-health-card-tab-content-item cds-pr-8">
             <span>
               <cd-icon [type]="vm?.osd?.severity"></cd-icon>
-              <span class="cds--type-body-compact-01 cds-ml-2"
+              <span class="cds--type-body-compact-01 cds-ml-3"
                     i18n>OSD</span>
             </span>
-            <p class="cds--type-label-01 cds-mt-3 overview-health-card-secondary-text">{{vm?.osd?.value}}</p>
+            <p class="cds--type-label-01 cds-mt-3 cds-mb-0 overview-health-card-secondary-text">{{vm?.osd?.value}}</p>
           </div>
           <div>
             <span>
               <cd-icon [type]="vm?.hosts?.severity"></cd-icon>
-              <span class="cds--type-body-compact-01 cds-ml-2">Nodes</span>
+              <span class="cds--type-body-compact-01 cds-ml-3">Nodes</span>
             </span>
-            <p class="cds--type-label-01 cds-mt-3 overview-health-card-secondary-text">{{vm?.hosts?.value}}</p>
+            <p class="cds--type-label-01 cds-mt-3 cds-mb-0 overview-health-card-secondary-text">{{vm?.hosts?.value}}</p>
           </div>
         </div>
       </div>
index b1d754f658daff9ac64a1d1a659f65290f6b91d9..2357bba13b14bfa8a0a41fcaa5c5c7afc03d6907 100644 (file)
     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
index b6b0c4d0c2d942f4929f038174c4b31e337f93c7..c718314637512a3b82da5b5e23c7f5a5cdee8988 100644 (file)
@@ -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();
   });
 });
index 35b381dcbdff1e522317f969024f135e7c15490e..ba2612c64896f2f47055ce52b5c87ea4eee3cd82 100644 (file)
@@ -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
     })),
index f82e8b37e72fef2367a62455b3a38b6ef3842de9..fa40ae54ad1577952de4e4e0af06ab4149915400 100644 (file)
   margin-left: layout.$spacing-05;
 }
 
+.cds-mr-1 {
+  margin-right: layout.$spacing-01;
+}
+
 .cds-mr-2 {
   margin-right: layout.$spacing-02;
 }