Alerting: introduce AlertQuery in definitions package (#63825)
* copy AlertQuery from ngmodels to the definition package * replaces usages of ngmodels.AlertQuery in API models * create a converter between models of AlertQuery --------- Co-authored-by: Alex Moreno <alexander.moreno@grafana.com>
This commit is contained in:
co-authored by
Alex Moreno
parent
36e8ca7f13
commit
52a0f59706
@@ -1021,13 +1021,13 @@ func createTestAlertRule(title string, orgID int64) definitions.ProvisionedAlert
|
||||
OrgID: orgID,
|
||||
Title: title,
|
||||
Condition: "A",
|
||||
Data: []models.AlertQuery{
|
||||
Data: []definitions.AlertQuery{
|
||||
{
|
||||
RefID: "A",
|
||||
Model: json.RawMessage(testModel),
|
||||
RelativeTimeRange: models.RelativeTimeRange{
|
||||
From: models.Duration(60),
|
||||
To: models.Duration(0),
|
||||
RelativeTimeRange: definitions.RelativeTimeRange{
|
||||
From: definitions.Duration(60),
|
||||
To: definitions.Duration(0),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user