remove unused functions
This commit is contained in:
@@ -681,95 +681,6 @@ const getDefaultExpressionsForRecording = (refOne: string): Array<AlertQuery<Exp
|
||||
];
|
||||
};
|
||||
|
||||
function getDefaultReduceExpression({
|
||||
inputRefId,
|
||||
reduceRefId,
|
||||
}: {
|
||||
inputRefId: string;
|
||||
reduceRefId: string;
|
||||
}): AlertQuery<ExpressionQuery> {
|
||||
const reduceExpression: ExpressionQuery = {
|
||||
refId: reduceRefId,
|
||||
type: ExpressionQueryType.reduce,
|
||||
datasource: {
|
||||
uid: ExpressionDatasourceUID,
|
||||
type: ExpressionDatasourceRef.type,
|
||||
},
|
||||
conditions: [
|
||||
{
|
||||
type: 'query',
|
||||
evaluator: {
|
||||
params: [],
|
||||
type: EvalFunction.IsAbove,
|
||||
},
|
||||
operator: {
|
||||
type: 'and',
|
||||
},
|
||||
query: {
|
||||
params: [],
|
||||
},
|
||||
reducer: {
|
||||
params: [],
|
||||
type: 'last',
|
||||
},
|
||||
},
|
||||
],
|
||||
reducer: 'last',
|
||||
expression: inputRefId,
|
||||
};
|
||||
|
||||
return {
|
||||
refId: reduceRefId,
|
||||
datasourceUid: ExpressionDatasourceUID,
|
||||
queryType: '',
|
||||
model: reduceExpression,
|
||||
};
|
||||
}
|
||||
|
||||
function getDefaultThresholdExpression({
|
||||
inputRefId,
|
||||
thresholdRefId,
|
||||
}: {
|
||||
inputRefId: string;
|
||||
thresholdRefId: string;
|
||||
}): AlertQuery<ExpressionQuery> {
|
||||
const thresholdExpression: ExpressionQuery = {
|
||||
refId: thresholdRefId,
|
||||
type: ExpressionQueryType.threshold,
|
||||
datasource: {
|
||||
uid: ExpressionDatasourceUID,
|
||||
type: ExpressionDatasourceRef.type,
|
||||
},
|
||||
conditions: [
|
||||
{
|
||||
type: 'query',
|
||||
evaluator: {
|
||||
params: [0],
|
||||
type: EvalFunction.IsAbove,
|
||||
},
|
||||
operator: {
|
||||
type: 'and',
|
||||
},
|
||||
query: {
|
||||
params: [],
|
||||
},
|
||||
reducer: {
|
||||
params: [],
|
||||
type: 'last',
|
||||
},
|
||||
},
|
||||
],
|
||||
expression: inputRefId,
|
||||
};
|
||||
|
||||
return {
|
||||
refId: thresholdRefId,
|
||||
datasourceUid: ExpressionDatasourceUID,
|
||||
queryType: '',
|
||||
model: thresholdExpression,
|
||||
};
|
||||
}
|
||||
|
||||
const dataQueriesToGrafanaQueries = async (
|
||||
queries: DataQuery[],
|
||||
relativeTimeRange: RelativeTimeRange,
|
||||
|
||||
Reference in New Issue
Block a user