]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: use descriptive name and type for alert filter param 70409/head
authorAfreen Misbah <afreen@ibm.com>
Wed, 22 Jul 2026 19:06:09 +0000 (00:36 +0530)
committerAfreen Misbah <afreen@ibm.com>
Wed, 22 Jul 2026 19:06:09 +0000 (00:36 +0530)
Signed-off-by: Afreen Misbah <afreen@ibm.com>
src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/health-card/overview-health-card.component.ts

index 602a3ebf3101a7eb8dcf2f9ccea69aead076574e..ce0386ddeb04590889453cd64fe4d8affa3fd054 100644 (file)
@@ -32,7 +32,7 @@ import {
   HardwareCardVM,
   buildHardwareCardVM
 } from '~/app/shared/models/overview';
-import { AlertState } from '~/app/shared/models/prometheus-alerts';
+import { AlertmanagerAlert, AlertState } from '~/app/shared/models/prometheus-alerts';
 import { HardwareService } from '~/app/shared/api/hardware.service';
 import { HealthService } from '~/app/shared/api/health.service';
 import { MgrModuleService } from '~/app/shared/api/mgr-module.service';
@@ -155,8 +155,9 @@ export class OverviewHealthCardComponent {
     map(
       () =>
         this.prometheusAlertService.alerts.filter(
-          (a) =>
-            a.status.state === AlertState.ACTIVE && a.labels.alertname?.startsWith(PG_ALERT_PREFIX)
+          (alert: AlertmanagerAlert) =>
+            alert.status.state === AlertState.ACTIVE &&
+            alert.labels.alertname?.startsWith(PG_ALERT_PREFIX)
         ).length
     ),
     startWith(0)