Chore: Add app URL to the plugin config (#77455)

This commit is contained in:
Andres Martinez Gotor
2023-11-02 13:26:16 +01:00
committed by GitHub
parent 34eb29c3bf
commit 00a596b2e0
4 changed files with 19 additions and 1 deletions
+5
View File
@@ -10,6 +10,7 @@ import (
"github.com/grafana/grafana-aws-sdk/pkg/awsds"
"github.com/grafana/grafana-azure-sdk-go/azsettings"
"github.com/grafana/grafana-plugin-sdk-go/backend"
"github.com/grafana/grafana-plugin-sdk-go/backend/proxy"
"github.com/grafana/grafana-plugin-sdk-go/experimental/featuretoggles"
@@ -79,6 +80,10 @@ func (s *Service) Get(ctx context.Context, p *plugins.Plugin) []string {
func (s *Service) GetConfigMap(ctx context.Context, _ string, _ *auth.ExternalService) map[string]string {
m := make(map[string]string)
if s.cfg.GrafanaAppURL != "" {
m[backend.AppURL] = s.cfg.GrafanaAppURL
}
// TODO add support via plugin SDK
//if externalService != nil {
// m[oauthtokenretriever.AppURL] = s.cfg.GrafanaAppURL