Remove old WITH clause in alert printing

This commit is contained in:
Fabian Reinartz 2016-01-26 15:45:27 +01:00
parent 4dc8c4f94c
commit a6935024e1
2 changed files with 3 additions and 3 deletions

View File

@ -107,7 +107,7 @@ func (node *AlertStmt) String() string {
s += fmt.Sprintf("\n\tFOR %s", strutil.DurationToString(node.Duration))
}
if len(node.Labels) > 0 {
s += fmt.Sprintf("\n\tWITH %s", node.Labels)
s += fmt.Sprintf("\n\tLABELS %s", node.Labels)
}
if len(node.Annotations) > 0 {
s += fmt.Sprintf("\n\tANNOTATIONS %s", node.Labels)

View File

@ -258,7 +258,7 @@ func (rule *AlertingRule) String() string {
s += fmt.Sprintf("\n\tFOR %s", strutil.DurationToString(rule.holdDuration))
}
if len(rule.labels) > 0 {
s += fmt.Sprintf("\n\tWITH %s", rule.labels)
s += fmt.Sprintf("\n\tLABELS %s", rule.labels)
}
if len(rule.annotations) > 0 {
s += fmt.Sprintf("\n\tANNOTATIONS %s", rule.annotations)
@ -280,7 +280,7 @@ func (rule *AlertingRule) HTMLSnippet(pathPrefix string) template.HTML {
s += fmt.Sprintf("\n FOR %s", strutil.DurationToString(rule.holdDuration))
}
if len(rule.labels) > 0 {
s += fmt.Sprintf("\n WITH %s", rule.labels)
s += fmt.Sprintf("\n LABELS %s", rule.labels)
}
if len(rule.annotations) > 0 {
s += fmt.Sprintf("\n ANNOTATIONS %s", rule.annotations)