(cherry picked from commit 9c9e79da4f)
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
This commit is contained in:
co-authored by
Will Browne
parent
90dedf4f50
commit
e13cd9f676
@@ -155,7 +155,7 @@ func (hs *HTTPServer) getFrontendSettingsMap(c *models.ReqContext) (map[string]i
|
||||
return nil, err
|
||||
}
|
||||
|
||||
pluginsToPreload := []*PreloadPlugin{}
|
||||
pluginsToPreload := make([]*PreloadPlugin, 0)
|
||||
for _, app := range enabledPlugins[plugins.App] {
|
||||
if app.Preload {
|
||||
pluginsToPreload = append(pluginsToPreload, &PreloadPlugin{
|
||||
@@ -176,14 +176,6 @@ func (hs *HTTPServer) getFrontendSettingsMap(c *models.ReqContext) (map[string]i
|
||||
if isDefault, _ := dsM["isDefault"].(bool); isDefault {
|
||||
defaultDS = n
|
||||
}
|
||||
|
||||
module, _ := dsM["module"].(string)
|
||||
if preload, _ := dsM["preload"].(bool); preload && module != "" {
|
||||
pluginsToPreload = append(pluginsToPreload, &PreloadPlugin{
|
||||
Path: module,
|
||||
Version: dsM["info"].(map[string]interface{})["version"].(string),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
panels := map[string]interface{}{}
|
||||
@@ -192,13 +184,6 @@ func (hs *HTTPServer) getFrontendSettingsMap(c *models.ReqContext) (map[string]i
|
||||
continue
|
||||
}
|
||||
|
||||
if panel.Preload {
|
||||
pluginsToPreload = append(pluginsToPreload, &PreloadPlugin{
|
||||
Path: panel.Module,
|
||||
Version: panel.Info.Version,
|
||||
})
|
||||
}
|
||||
|
||||
panels[panel.ID] = map[string]interface{}{
|
||||
"id": panel.ID,
|
||||
"module": panel.Module,
|
||||
|
||||
Reference in New Issue
Block a user