Footer: Display Grafana edition (#21717)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
This commit is contained in:
Emil Tullstedt
2020-01-27 09:24:44 +01:00
committed by GitHub
co-authored by Torkel Ödegaard
parent 84ef0ebb17
commit 3fabbbff4d
9 changed files with 60 additions and 27 deletions
+3
View File
@@ -194,6 +194,7 @@ func (hs *HTTPServer) getFrontendSettingsMap(c *m.ReqContext) (map[string]interf
"version": setting.BuildVersion,
"commit": setting.BuildCommit,
"buildstamp": setting.BuildStamp,
"edition": hs.License.Edition(),
"latestVersion": plugins.GrafanaLatestVersion,
"hasUpdate": plugins.GrafanaHasUpdate,
"env": setting.Env,
@@ -202,6 +203,8 @@ func (hs *HTTPServer) getFrontendSettingsMap(c *m.ReqContext) (map[string]interf
"licenseInfo": map[string]interface{}{
"hasLicense": hs.License.HasLicense(),
"expiry": hs.License.Expiry(),
"stateInfo": hs.License.StateInfo(),
"licenseUrl": hs.License.LicenseURL(c.SignedInUser),
},
"featureToggles": hs.Cfg.FeatureToggles,
}
+1 -1
View File
@@ -357,7 +357,7 @@ func (hs *HTTPServer) setIndexViewData(c *m.ReqContext) (*dtos.IndexViewData, er
Children: []*dtos.NavLink{},
})
hs.HooksService.RunIndexDataHooks(&data)
hs.HooksService.RunIndexDataHooks(&data, c)
sort.SliceStable(data.NavTree, func(i, j int) bool {
return data.NavTree[i].SortWeight < data.NavTree[j].SortWeight