mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 18:12:13 +08:00
grafana-ruler: add new alert query fields (#104933)
This commit is contained in:
@ -96,6 +96,12 @@ type AlertQuery struct {
|
||||
// JSON is the raw JSON query and includes the above properties as well as custom properties.
|
||||
Model json.RawMessage `json:"model"`
|
||||
|
||||
// DatasourceType is the type of the data source.
|
||||
DatasourceType string `json:"-"`
|
||||
|
||||
// IsMTQuery ...
|
||||
IsMTQuery bool `json:"-"`
|
||||
|
||||
modelProps map[string]any
|
||||
}
|
||||
|
||||
|
@ -469,7 +469,7 @@ func (alertRule *AlertRule) Diff(rule *AlertRule, ignore ...string) cmputil.Diff
|
||||
ops = append(
|
||||
ops,
|
||||
cmp.Reporter(&reporter),
|
||||
cmpopts.IgnoreFields(AlertQuery{}, "modelProps"),
|
||||
cmpopts.IgnoreFields(AlertQuery{}, "modelProps", "DatasourceType", "IsMTQuery"),
|
||||
jsonCmp,
|
||||
cmpopts.EquateEmpty(),
|
||||
)
|
||||
|
Reference in New Issue
Block a user