mirror of
https://github.com/grafana/grafana.git
synced 2025-01-08 23:23:45 -06:00
Azure Monitor: Fix app insights source to allow for new __timeFrom and __timeTo (#21879)
* Fix app insights source to allow for new __timeFrom and __timeTo * Try fixing the switch
This commit is contained in:
parent
cd42b31da5
commit
0e7c746a87
@ -60,9 +60,9 @@ func (m *kqlMacroEngine) evaluateMacro(name string, args []string) (string, erro
|
||||
timeColumn = args[0]
|
||||
}
|
||||
return fmt.Sprintf("['%s'] >= datetime('%s') and ['%s'] <= datetime('%s')", timeColumn, m.timeRange.GetFromAsTimeUTC().Format(time.RFC3339), timeColumn, m.timeRange.GetToAsTimeUTC().Format(time.RFC3339)), nil
|
||||
case "__from":
|
||||
case "__timeFrom", "__from":
|
||||
return fmt.Sprintf("datetime('%s')", m.timeRange.GetFromAsTimeUTC().Format(time.RFC3339)), nil
|
||||
case "__to":
|
||||
case "__timeTo", "__to":
|
||||
return fmt.Sprintf("datetime('%s')", m.timeRange.GetToAsTimeUTC().Format(time.RFC3339)), nil
|
||||
case "__interval":
|
||||
var interval time.Duration
|
||||
|
Loading…
Reference in New Issue
Block a user