Cfg: Adds experimental scope grafana.ini settings (#83174)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
This commit is contained in:
@@ -262,4 +262,7 @@ type FrontendSettingsDTO struct {
|
||||
Whitelabeling *FrontendSettingsWhitelabelingDTO `json:"whitelabeling,omitempty"`
|
||||
|
||||
LocalFileSystemAvailable bool `json:"localFileSystemAvailable"`
|
||||
// Experimental Scope settings
|
||||
ListScopesEndpoint string `json:"listScopesEndpoint"`
|
||||
ListDashboardScopesEndpoint string `json:"listDashboardScopesEndpoint"`
|
||||
}
|
||||
|
||||
@@ -356,6 +356,12 @@ func (hs *HTTPServer) getFrontendSettings(c *contextmodel.ReqContext) (*dtos.Fro
|
||||
// Set the kubernetes namespace
|
||||
frontendSettings.Namespace = hs.namespacer(c.SignedInUser.OrgID)
|
||||
|
||||
// experimental scope features
|
||||
if hs.Features.IsEnabled(c.Req.Context(), featuremgmt.FlagScopeFilters) {
|
||||
frontendSettings.ListScopesEndpoint = hs.Cfg.ScopesListScopesURL
|
||||
frontendSettings.ListDashboardScopesEndpoint = hs.Cfg.ScopesListDashboardsURL
|
||||
}
|
||||
|
||||
return frontendSettings, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user