Backend: Migrate to using non-global configuration (#31856)

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
Arve Knudsen
2021-03-10 12:41:29 +01:00
committed by GitHub
parent bac1721546
commit 47f13abf7a
19 changed files with 241 additions and 260 deletions
+4 -4
View File
@@ -130,22 +130,22 @@ func (pm *PluginManager) Init() error {
}
for _, panel := range Panels {
staticRoutes := panel.InitFrontendPlugin()
staticRoutes := panel.InitFrontendPlugin(pm.Cfg)
StaticRoutes = append(StaticRoutes, staticRoutes...)
}
for _, ds := range DataSources {
staticRoutes := ds.InitFrontendPlugin()
staticRoutes := ds.InitFrontendPlugin(pm.Cfg)
StaticRoutes = append(StaticRoutes, staticRoutes...)
}
for _, app := range Apps {
staticRoutes := app.InitApp(Panels, DataSources)
staticRoutes := app.InitApp(Panels, DataSources, pm.Cfg)
StaticRoutes = append(StaticRoutes, staticRoutes...)
}
if Renderer != nil {
staticRoutes := Renderer.InitFrontendPlugin()
staticRoutes := Renderer.InitFrontendPlugin(pm.Cfg)
StaticRoutes = append(StaticRoutes, staticRoutes...)
}