diff --git a/pkg/api/index.go b/pkg/api/index.go index ddc2429baf5..e5375945c6b 100644 --- a/pkg/api/index.go +++ b/pkg/api/index.go @@ -85,7 +85,7 @@ func setIndexViewData(c *middleware.Context) (*dtos.IndexViewData, error) { if plugin.Pinned { data.MainNavLinks = append(data.MainNavLinks, &dtos.NavLink{ Text: plugin.Name, - Url: setting.AppSubUrl + "/apps/edit/" + plugin.Id, + Url: "/apps/edit/" + plugin.Id, Img: plugin.Info.Logos.Small, }) } diff --git a/pkg/plugins/app_plugin.go b/pkg/plugins/app_plugin.go index b8a3eee2bc0..3176352f269 100644 --- a/pkg/plugins/app_plugin.go +++ b/pkg/plugins/app_plugin.go @@ -26,13 +26,18 @@ type AppPlugin struct { Enabled bool `json:"-"` } -func (p *AppPlugin) Load(decoder *json.Decoder, pluginDir string) error { - if err := decoder.Decode(&p); err != nil { +func (app *AppPlugin) Load(decoder *json.Decoder, pluginDir string) error { + if err := decoder.Decode(&app); err != nil { return err } - p.PluginDir = pluginDir - p.initFrontendPlugin() - Apps[p.Id] = p + if app.Css != nil { + app.Css.Dark = evalRelativePluginUrlPath(app.Css.Dark, app.Id) + app.Css.Light = evalRelativePluginUrlPath(app.Css.Light, app.Id) + } + + app.PluginDir = pluginDir + app.initFrontendPlugin() + Apps[app.Id] = app return nil }