mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
AlertingNG: Enable UI to Save Alert Definitions (#30394)
* transform state to what the api expects * add expr prop to dataquery * Add evalutate field * add refid picker to options * minor fix to enable save * fix import * more fixes after merge * use default datasource if not changed * replace name with title * Change name in ui as well * remove not used loadDataSources function * prettier fixes * look up datasource * correct datasource per query model * revert dataquery change, use expressionid const * fix for type * fix faulty const * description readonly
This commit is contained in:
@@ -146,13 +146,14 @@ export interface AlertDefinitionState {
|
||||
|
||||
export interface AlertDefinition {
|
||||
id: number;
|
||||
name: string;
|
||||
title: string;
|
||||
description: string;
|
||||
condition: AlertCondition;
|
||||
interval: number;
|
||||
}
|
||||
|
||||
export interface AlertCondition {
|
||||
ref: string;
|
||||
refId: string;
|
||||
queriesAndExpressions: any[];
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { DataQuery } from '@grafana/data';
|
||||
import { ExpressionQuery } from '../features/expressions/types';
|
||||
|
||||
export interface QueryGroupOptions {
|
||||
queries: DataQuery[];
|
||||
queries: Array<DataQuery | ExpressionQuery>;
|
||||
dataSource: QueryGroupDataSource;
|
||||
maxDataPoints?: number | null;
|
||||
minInterval?: string | null;
|
||||
@@ -13,7 +14,7 @@ export interface QueryGroupOptions {
|
||||
};
|
||||
}
|
||||
|
||||
interface QueryGroupDataSource {
|
||||
export interface QueryGroupDataSource {
|
||||
name?: string | null;
|
||||
uid?: string;
|
||||
default?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user