From 59cb51d1b85409819d0e81bc7f6b6629f9dcfafd Mon Sep 17 00:00:00 2001 From: Afreen Misbah Date: Thu, 23 Jul 2026 00:36:09 +0530 Subject: [PATCH] mgr/dashboard: use descriptive name and type for alert filter param Signed-off-by: Afreen Misbah --- .../overview/health-card/overview-health-card.component.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 602a3ebf3101..ce0386ddeb04 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 @@ -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) -- 2.47.3