mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 16:12:27 +08:00
Shared Azure middleware between Azure Monitor and Prometheus datasources (#46002)
* Scopes in Azure middleware * Enable Azure middleware without feature flag * Use common Azure middleware in Azure Monitor * Apply feature flag to JsonData configuration of Azure auth * Enforce feature flag in Prometheus datasource * Prometheus provider tests * Datasource service tests * Fix http client provider tests * Pass sdkhttpclient.Options by reference * Add middleware to httpclient.Options * Remove dependency on Grafana settings * Unit-tests updated * Fix ds_proxy_test * Fix service_test
This commit is contained in:
@ -21,6 +21,7 @@ import (
|
||||
|
||||
"github.com/grafana/grafana-aws-sdk/pkg/awsds"
|
||||
"github.com/grafana/grafana-plugin-sdk-go/backend/gtime"
|
||||
"github.com/grafana/grafana/pkg/tsdb/azuremonitor/azsettings"
|
||||
|
||||
"github.com/grafana/grafana/pkg/infra/log"
|
||||
"github.com/grafana/grafana/pkg/util"
|
||||
@ -302,7 +303,7 @@ type Cfg struct {
|
||||
AWSListMetricsPageLimit int
|
||||
|
||||
// Azure Cloud settings
|
||||
Azure AzureSettings
|
||||
Azure *azsettings.AzureSettings
|
||||
|
||||
// Auth proxy settings
|
||||
AuthProxyEnabled bool
|
||||
@ -824,6 +825,7 @@ func NewCfg() *Cfg {
|
||||
return &Cfg{
|
||||
Logger: log.New("settings"),
|
||||
Raw: ini.Empty(),
|
||||
Azure: &azsettings.AzureSettings{},
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user