mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
only preload app plugins (#42434)
This commit is contained in:
parent
868428528f
commit
9c9e79da4f
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user