mirror of https://github.com/prometheus/prometheus
Merge pull request #1350 from prometheus/rulefix
Remove old WITH clause in alert printingpull/1354/head
commit
c1fdfc5a8b
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue