[v9.4.x] Plugins: Prefer to use the data source UID when querying (#62789)

Plugins: Prefer to use the data source UID when querying (#62776)

(cherry picked from commit 68862ce3e8)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
This commit is contained in:
Grot (@grafanabot)
2023-02-02 15:02:06 +00:00
committed by GitHub
co-authored by Andres Martinez Gotor
parent 022abcb47d
commit 190c3aad58
3 changed files with 37 additions and 9 deletions
+1 -2
View File
@@ -4,7 +4,6 @@ import (
"context"
"fmt"
"net/http"
"strconv"
"github.com/grafana/grafana/pkg/plugins"
"github.com/grafana/grafana/pkg/services/accesscontrol"
@@ -268,7 +267,7 @@ func (hs *HTTPServer) getFSDataSources(c *contextmodel.ReqContext, enabledPlugin
url := ds.Url
if ds.Access == datasources.DS_ACCESS_PROXY {
url = "/api/datasources/proxy/" + strconv.FormatInt(ds.Id, 10)
url = "/api/datasources/proxy/uid/" + ds.Uid
}
dsDTO := plugins.DataSourceDTO{