Chore: Clean up intervalv2 functions (#82074)
* clean up intervalv2 functions * use roundInterval from grafana-plugin-sdk-go * use from grafana-plugin-sdk-go * have intervalv2 in publicdashboards and remove tsdb/intervalv2 * legacydata cleanup * remove unused variables * Update pkg/tsdb/legacydata/interval/interval.go Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com> --------- Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>
This commit is contained in:
co-authored by
Arati R.
parent
3d73cd5c8e
commit
b0dfeb1911
@@ -8,8 +8,8 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/grafana/grafana-plugin-sdk-go/backend"
|
||||
"github.com/grafana/grafana-plugin-sdk-go/backend/gtime"
|
||||
|
||||
"github.com/grafana/grafana/pkg/tsdb/intervalv2"
|
||||
"github.com/grafana/grafana/pkg/tsdb/loki/kinds/dataquery"
|
||||
)
|
||||
|
||||
@@ -32,8 +32,8 @@ const (
|
||||
)
|
||||
|
||||
func interpolateVariables(expr string, interval time.Duration, timeRange time.Duration, queryType dataquery.LokiQueryType, step time.Duration) string {
|
||||
intervalText := intervalv2.FormatDuration(interval)
|
||||
stepText := intervalv2.FormatDuration(step)
|
||||
intervalText := gtime.FormatInterval(interval)
|
||||
stepText := gtime.FormatInterval(step)
|
||||
intervalMsText := strconv.FormatInt(int64(interval/time.Millisecond), 10)
|
||||
|
||||
rangeMs := timeRange.Milliseconds()
|
||||
|
||||
Reference in New Issue
Block a user