mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08:00
Remove old WITH clause in alert printing
This commit is contained in:
parent
4dc8c4f94c
commit
a6935024e1
|
@ -107,7 +107,7 @@ func (node *AlertStmt) String() string {
|
||||||
s += fmt.Sprintf("\n\tFOR %s", strutil.DurationToString(node.Duration))
|
s += fmt.Sprintf("\n\tFOR %s", strutil.DurationToString(node.Duration))
|
||||||
}
|
}
|
||||||
if len(node.Labels) > 0 {
|
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 {
|
if len(node.Annotations) > 0 {
|
||||||
s += fmt.Sprintf("\n\tANNOTATIONS %s", node.Labels)
|
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))
|
s += fmt.Sprintf("\n\tFOR %s", strutil.DurationToString(rule.holdDuration))
|
||||||
}
|
}
|
||||||
if len(rule.labels) > 0 {
|
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 {
|
if len(rule.annotations) > 0 {
|
||||||
s += fmt.Sprintf("\n\tANNOTATIONS %s", rule.annotations)
|
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))
|
s += fmt.Sprintf("\n FOR %s", strutil.DurationToString(rule.holdDuration))
|
||||||
}
|
}
|
||||||
if len(rule.labels) > 0 {
|
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 {
|
if len(rule.annotations) > 0 {
|
||||||
s += fmt.Sprintf("\n ANNOTATIONS %s", rule.annotations)
|
s += fmt.Sprintf("\n ANNOTATIONS %s", rule.annotations)
|
||||||
|
|
Loading…
Reference in a new issue