mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: show state history (#42362)
This commit is contained in:
@@ -124,6 +124,7 @@ export interface PostableGrafanaRuleDefinition {
|
||||
data: AlertQuery[];
|
||||
}
|
||||
export interface GrafanaRuleDefinition extends PostableGrafanaRuleDefinition {
|
||||
id?: string;
|
||||
uid: string;
|
||||
namespace_uid: string;
|
||||
namespace_id: number;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Prometheus internal models */
|
||||
|
||||
import { DataSourceInstanceSettings } from '@grafana/data';
|
||||
import { AlertState, DataSourceInstanceSettings } from '@grafana/data';
|
||||
import {
|
||||
PromAlertingRuleState,
|
||||
PromRuleType,
|
||||
@@ -140,3 +140,35 @@ export interface SilenceFilterState {
|
||||
queryString?: string;
|
||||
silenceState?: string;
|
||||
}
|
||||
|
||||
interface EvalMatch {
|
||||
metric: string;
|
||||
tags?: any;
|
||||
value: number;
|
||||
}
|
||||
|
||||
export interface StateHistoryItemData {
|
||||
noData: boolean;
|
||||
evalMatches?: EvalMatch[];
|
||||
}
|
||||
|
||||
export interface StateHistoryItem {
|
||||
id: number;
|
||||
alertId: number;
|
||||
alertName: string;
|
||||
dashboardId: number;
|
||||
panelId: number;
|
||||
userId: number;
|
||||
newState: AlertState;
|
||||
prevState: AlertState;
|
||||
created: number;
|
||||
updated: number;
|
||||
time: number;
|
||||
timeEnd: number;
|
||||
text: string;
|
||||
tags: any[];
|
||||
login: string;
|
||||
email: string;
|
||||
avatarUrl: string;
|
||||
data: StateHistoryItemData;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user