Skip to content

Commit

Permalink
AzureMonitor: select plugin route from cloudname (grafana#27273)
Browse files Browse the repository at this point in the history
* AzureMonitor: select plugin route from cloudname
fixes grafana#27243
  • Loading branch information
kylebrandt authored and pull[bot] committed Aug 31, 2020
1 parent 329767d commit c238aae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/tsdb/azuremonitor/azuremonitor-datasource.go
Expand Up @@ -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)
Expand Down

0 comments on commit c238aae

Please sign in to comment.