AzureMonitor: Fix auto-selection of time-grain for metrics. (#49278)
* Update query editor to fix auto time-grain selection * Update new query editor to fix auto time-grain selection * Remove log and fix lint issues * Add test for useMetricMetadata - Add necessary types * More test updates - Update old dataHooks test - Ensure query changes Co-authored-by: Kevin Yu <kevinwcyu@users.noreply.github.com> Co-authored-by: Andres Martinez Gotor <andres.mgotor@gmail.com> Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
This commit is contained in:
@@ -106,6 +106,7 @@ func (e *AzureMonitorDatasource) buildQueries(queries []backend.DataQuery, dsInf
|
||||
|
||||
timeGrain := azJSONModel.TimeGrain
|
||||
timeGrains := azJSONModel.AllowedTimeGrainsMs
|
||||
|
||||
if timeGrain == "auto" {
|
||||
timeGrain, err = azTime.SetAutoTimeGrain(query.Interval.Milliseconds(), timeGrains)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user