/api/v1/rules: alert value as string (#585)

Signed-off-by: Alexander Saltykov <alexander-s@yandex-team.ru>
This commit is contained in:
Alex Salt 2019-05-28 14:57:09 +03:00 committed by Krasi Georgiev
parent 7e60220fd3
commit 301aa8906b
2 changed files with 3 additions and 3 deletions

View File

@ -327,7 +327,7 @@ type Alert struct {
Annotations model.LabelSet
Labels model.LabelSet
State AlertState
Value float64
Value string
}
// TargetsResult contains the result from querying the targets endpoint.

View File

@ -493,7 +493,7 @@ func TestAPIs(t *testing.T) {
"severity": "page",
},
"state": "firing",
"value": 1,
"value": "1e+00",
},
},
"annotations": map[string]interface{}{
@ -537,7 +537,7 @@ func TestAPIs(t *testing.T) {
"severity": "page",
},
State: AlertStateFiring,
Value: 1,
Value: "1e+00",
},
},
Annotations: model.LabelSet{