diff --git a/public/app/features/alerting/unified/home/Insights.tsx b/public/app/features/alerting/unified/home/Insights.tsx index 44f70e04703..29fed164d73 100644 --- a/public/app/features/alerting/unified/home/Insights.tsx +++ b/public/app/features/alerting/unified/home/Insights.tsx @@ -20,9 +20,9 @@ import { import { config } from '../../../../core/config'; import { SectionFooter } from '../insights/SectionFooter'; import { SectionSubheader } from '../insights/SectionSubheader'; +import { getActiveGrafanaAlertsScene } from '../insights/grafana/Active'; import { getGrafanaInstancesByStateScene } from '../insights/grafana/AlertsByStateScene'; import { getGrafanaEvalSuccessVsFailuresScene } from '../insights/grafana/EvalSuccessVsFailuresScene'; -import { getFiringGrafanaAlertsScene } from '../insights/grafana/Firing'; import { getInstanceStatByStatusScene } from '../insights/grafana/InstanceStatusScene'; import { getGrafanaMissedIterationsScene } from '../insights/grafana/MissedIterationsScene'; import { getMostFiredInstancesScene } from '../insights/grafana/MostFiredInstancesTable'; @@ -192,7 +192,7 @@ function getGrafanaManagedScenes() { new SceneFlexLayout({ children: [ getMostFiredInstancesScene(ashDs, 'Top 10 firing instances'), - getFiringGrafanaAlertsScene(cloudUsageDs, 'Firing rules'), + getActiveGrafanaAlertsScene(cloudUsageDs, 'Active rules'), getPausedGrafanaAlertsScene(cloudUsageDs, 'Paused rules'), ], }), diff --git a/public/app/features/alerting/unified/insights/grafana/Firing.tsx b/public/app/features/alerting/unified/insights/grafana/Active.tsx similarity index 86% rename from public/app/features/alerting/unified/insights/grafana/Firing.tsx rename to public/app/features/alerting/unified/insights/grafana/Active.tsx index cdf154979c8..636780cce3b 100644 --- a/public/app/features/alerting/unified/insights/grafana/Firing.tsx +++ b/public/app/features/alerting/unified/insights/grafana/Active.tsx @@ -7,7 +7,7 @@ import { DataSourceRef } from '@grafana/schema'; import { INSTANCE_ID, PANEL_STYLES } from '../../home/Insights'; import { InsightsRatingModal } from '../RatingModal'; -export function getFiringGrafanaAlertsScene(datasource: DataSourceRef, panelTitle: string) { +export function getActiveGrafanaAlertsScene(datasource: DataSourceRef, panelTitle: string) { const expr = INSTANCE_ID ? `sum by (state) (grafanacloud_grafana_instance_alerting_rule_group_rules{state="active", id="${INSTANCE_ID}"})` : `sum by (state) (grafanacloud_grafana_instance_alerting_rule_group_rules{state="active"})`; @@ -27,17 +27,17 @@ export function getFiringGrafanaAlertsScene(datasource: DataSourceRef, panelTitl ...PANEL_STYLES, body: PanelBuilders.stat() .setTitle(panelTitle) - .setDescription('The number of currently firing alert rules') + .setDescription('The number of currently active alert rules') .setData(query) .setThresholds({ mode: ThresholdsMode.Absolute, steps: [ { - color: 'red', + color: 'green', value: 0, }, { - color: 'red', + color: 'green', value: 80, }, ],