forked from mirror/client_golang
/api/v1/rules: alert value as string (#585)
Signed-off-by: Alexander Saltykov <alexander-s@yandex-team.ru>
This commit is contained in:
parent
7e60220fd3
commit
301aa8906b
|
@ -327,7 +327,7 @@ type Alert struct {
|
||||||
Annotations model.LabelSet
|
Annotations model.LabelSet
|
||||||
Labels model.LabelSet
|
Labels model.LabelSet
|
||||||
State AlertState
|
State AlertState
|
||||||
Value float64
|
Value string
|
||||||
}
|
}
|
||||||
|
|
||||||
// TargetsResult contains the result from querying the targets endpoint.
|
// TargetsResult contains the result from querying the targets endpoint.
|
||||||
|
|
|
@ -493,7 +493,7 @@ func TestAPIs(t *testing.T) {
|
||||||
"severity": "page",
|
"severity": "page",
|
||||||
},
|
},
|
||||||
"state": "firing",
|
"state": "firing",
|
||||||
"value": 1,
|
"value": "1e+00",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"annotations": map[string]interface{}{
|
"annotations": map[string]interface{}{
|
||||||
|
@ -537,7 +537,7 @@ func TestAPIs(t *testing.T) {
|
||||||
"severity": "page",
|
"severity": "page",
|
||||||
},
|
},
|
||||||
State: AlertStateFiring,
|
State: AlertStateFiring,
|
||||||
Value: 1,
|
Value: "1e+00",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Annotations: model.LabelSet{
|
Annotations: model.LabelSet{
|
||||||
|
|
Loading…
Reference in New Issue