switch to using featureEnabled for enterprise features (#41559)

* switch to using featureEnabled for enterprise features
This commit is contained in:
Dan Cech
2022-01-07 15:11:23 -05:00
committed by GitHub
parent 9eb82f9fff
commit 34f757ba5a
34 changed files with 109 additions and 148 deletions
+1 -3
View File
@@ -250,15 +250,13 @@ func (hs *HTTPServer) getFrontendSettingsMap(c *models.ReqContext) (map[string]i
"latestVersion": hs.updateChecker.LatestGrafanaVersion(),
"hasUpdate": hs.updateChecker.GrafanaUpdateAvailable(),
"env": setting.Env,
"isEnterprise": hs.License.HasValidLicense(),
},
"licenseInfo": map[string]interface{}{
"hasLicense": hs.License.HasLicense(),
"hasValidLicense": hs.License.HasValidLicense(),
"expiry": hs.License.Expiry(),
"stateInfo": hs.License.StateInfo(),
"licenseUrl": hs.License.LicenseURL(hasAccess(accesscontrol.ReqGrafanaAdmin, accesscontrol.LicensingPageReaderAccess)),
"edition": hs.License.Edition(),
"enabledFeatures": hs.License.EnabledFeatures(),
},
"featureToggles": hs.Cfg.FeatureToggles,
"rendererAvailable": hs.RenderService.IsAvailable(),