mirror of https://github.com/grafana/grafana.git
Expression: Fix a bug of the display name of the threshold expression result (#85912)
* replace ReferenceVar with RefID when creating the math command for the ThresholdCommand * Fix the Hysteresis test
This commit is contained in:
parent
10c6ab5a17
commit
a94ab259c6
|
|
@ -15,7 +15,7 @@ import (
|
|||
|
||||
func TestHysteresisExecute(t *testing.T) {
|
||||
number := func(label string, value float64) mathexp.Number {
|
||||
n := mathexp.NewNumber("A", data.Labels{"label": label})
|
||||
n := mathexp.NewNumber("B", data.Labels{"label": label})
|
||||
n.SetValue(&value)
|
||||
return n
|
||||
}
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ func (tc *ThresholdCommand) Execute(ctx context.Context, now time.Time, vars mat
|
|||
return mathexp.Results{}, err
|
||||
}
|
||||
|
||||
mathCommand, err := NewMathCommand(tc.ReferenceVar, mathExpression)
|
||||
mathCommand, err := NewMathCommand(tc.RefID, mathExpression)
|
||||
if err != nil {
|
||||
return mathexp.Results{}, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue