mirror of
https://github.com/grafana/grafana.git
synced 2026-07-30 00:08:10 -05:00
style(alerting): give better info about actual value
This commit is contained in:
@@ -3,6 +3,7 @@ package alerting
|
||||
import (
|
||||
"time"
|
||||
|
||||
"fmt"
|
||||
"github.com/grafana/grafana/pkg/bus"
|
||||
"github.com/grafana/grafana/pkg/log"
|
||||
m "github.com/grafana/grafana/pkg/models"
|
||||
@@ -107,6 +108,10 @@ func (this *Scheduler) HandleResponses() {
|
||||
NewState: response.State,
|
||||
}
|
||||
|
||||
if cmd.NewState != m.AlertStateOk {
|
||||
cmd.Info = fmt.Sprintf("Actual value: %1.2f", response.ActualValue)
|
||||
}
|
||||
|
||||
if err := bus.Dispatch(&cmd); err != nil {
|
||||
log.Error(1, "failed to save state", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user