update dependency grafana/grafana-plugin-sdk-go to v0.281.0 (#112726)

* go get github.com/grafana/grafana-plugin-sdk-go@v0.281.0

* make update-workspace

* updated failing unit test

* disable deprecation warnings

* datasources: allow underscore-prefixed local time range

* updated go.work.sum
This commit is contained in:
Gábor Farkas
2025-10-22 09:02:11 +02:00
committed by GitHub
parent 0098a68983
commit 8ab7a20265
57 changed files with 847 additions and 863 deletions
+6 -3
View File
@@ -331,9 +331,12 @@ func (s *ServiceImpl) handleQuerySingleDatasource(ctx context.Context, user iden
}
func getTimeRange(query *simplejson.Json, globalFrom string, globalTo string) (string, string, error) {
tr, ok := query.CheckGet("timeRange")
if !ok { // timeRange json node does not exist, use global from/to
return globalFrom, globalTo, nil
tr, ok := query.CheckGet("_timeRange")
if !ok { // timeRange json node does not exist
tr, ok = query.CheckGet("timeRange") // try the old name for backward compatibility
if !ok { // timeRange json node does not exist, use global from/to
return globalFrom, globalTo, nil
}
}
from, err := tr.Get("from").String()
if err != nil {