From: Afreen Misbah Date: Wed, 22 Jul 2026 19:06:09 +0000 (+0530) Subject: mgr/dashboard: use descriptive name and type for alert filter param X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=59cb51d1b85409819d0e81bc7f6b6629f9dcfafd;p=ceph.git mgr/dashboard: use descriptive name and type for alert filter param Signed-off-by: Afreen Misbah --- 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)