|
@@ -46,6 +46,14 @@ func (hs *HTTPServer) getFrontendSettingsMap(c *m.ReqContext) (map[string]interf
|
|
|
return nil, err
|
|
return nil, err
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ pluginsToPreload := []string{}
|
|
|
|
|
+
|
|
|
|
|
+ for _, app := range enabledPlugins.Apps {
|
|
|
|
|
+ if app.Preload {
|
|
|
|
|
+ pluginsToPreload = append(pluginsToPreload, app.Module)
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
for _, ds := range orgDataSources {
|
|
for _, ds := range orgDataSources {
|
|
|
url := ds.Url
|
|
url := ds.Url
|
|
|
|
|
|
|
@@ -66,6 +74,10 @@ func (hs *HTTPServer) getFrontendSettingsMap(c *m.ReqContext) (map[string]interf
|
|
|
continue
|
|
continue
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if meta.Preload {
|
|
|
|
|
+ pluginsToPreload = append(pluginsToPreload, meta.Module)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
dsMap["meta"] = meta
|
|
dsMap["meta"] = meta
|
|
|
|
|
|
|
|
if ds.IsDefault {
|
|
if ds.IsDefault {
|
|
@@ -137,6 +149,10 @@ func (hs *HTTPServer) getFrontendSettingsMap(c *m.ReqContext) (map[string]interf
|
|
|
continue
|
|
continue
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if panel.Preload {
|
|
|
|
|
+ pluginsToPreload = append(pluginsToPreload, panel.Module)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
panels[panel.Id] = map[string]interface{}{
|
|
panels[panel.Id] = map[string]interface{}{
|
|
|
"module": panel.Module,
|
|
"module": panel.Module,
|
|
|
"baseUrl": panel.BaseUrl,
|
|
"baseUrl": panel.BaseUrl,
|
|
@@ -169,6 +185,7 @@ func (hs *HTTPServer) getFrontendSettingsMap(c *m.ReqContext) (map[string]interf
|
|
|
"viewersCanEdit": setting.ViewersCanEdit,
|
|
"viewersCanEdit": setting.ViewersCanEdit,
|
|
|
"editorsCanAdmin": hs.Cfg.EditorsCanAdmin,
|
|
"editorsCanAdmin": hs.Cfg.EditorsCanAdmin,
|
|
|
"disableSanitizeHtml": hs.Cfg.DisableSanitizeHtml,
|
|
"disableSanitizeHtml": hs.Cfg.DisableSanitizeHtml,
|
|
|
|
|
+ "pluginsToPreload": pluginsToPreload,
|
|
|
"buildInfo": map[string]interface{}{
|
|
"buildInfo": map[string]interface{}{
|
|
|
"version": setting.BuildVersion,
|
|
"version": setting.BuildVersion,
|
|
|
"commit": setting.BuildCommit,
|
|
"commit": setting.BuildCommit,
|