mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
AzureMonitor: select plugin route from cloudname (#27273)
* AzureMonitor: select plugin route from cloudname fixes #27243
This commit is contained in:
parent
42e8cb51ec
commit
06323b8e52
@ -223,15 +223,15 @@ func (e *AzureMonitorDatasource) createRequest(ctx context.Context, dsInfo *mode
|
||||
return nil, errors.New("Unable to find datasource plugin Azure Monitor")
|
||||
}
|
||||
|
||||
cloudName := dsInfo.JsonData.Get("cloudName").MustString("azuremonitor")
|
||||
var azureMonitorRoute *plugins.AppPluginRoute
|
||||
for _, route := range plugin.Routes {
|
||||
if route.Path == "azuremonitor" {
|
||||
if route.Path == cloudName {
|
||||
azureMonitorRoute = route
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
cloudName := dsInfo.JsonData.Get("cloudName").MustString("azuremonitor")
|
||||
proxyPass := fmt.Sprintf("%s/subscriptions", cloudName)
|
||||
|
||||
u, err := url.Parse(dsInfo.Url)
|
||||
|
Loading…
Reference in New Issue
Block a user