mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Elasticsearch: Use interval provided by data request in backend (#60480)
* Elasticsearch: Remove interval caulation and use interval provises by grafana * Remove redundant code * Adjust snapshot tests * Update test * Fix lint
This commit is contained in:
@@ -26,7 +26,8 @@ func parseQuery(tsdbQuery []backend.DataQuery) ([]*Query, error) {
|
||||
return nil, err
|
||||
}
|
||||
alias := model.Get("alias").MustString("")
|
||||
interval := model.Get("interval").MustString("")
|
||||
intervalMs := model.Get("intervalMs").MustInt64(0)
|
||||
interval := q.Interval
|
||||
|
||||
queries = append(queries, &Query{
|
||||
TimeField: timeField,
|
||||
@@ -35,6 +36,7 @@ func parseQuery(tsdbQuery []backend.DataQuery) ([]*Query, error) {
|
||||
Metrics: metrics,
|
||||
Alias: alias,
|
||||
Interval: interval,
|
||||
IntervalMs: intervalMs,
|
||||
RefID: q.RefID,
|
||||
MaxDataPoints: q.MaxDataPoints,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user