refactor.

Rename externalPlugin to apiPlugin
Rename bundle to app
Move js, css, menuItem and staticRoot to be properties os App
Add "app" field to panel, datasource and api plugin models. If populated
then the plugin is only enabled if the specific app is enabled for the Org.
If app is "", then the plugin is enabled for all orgs and can't be disabled.
This commit is contained in:
woodsaj
2015-12-17 23:53:58 +08:00
parent 0697274695
commit c35b51a268
15 changed files with 215 additions and 181 deletions

View File

@ -157,8 +157,8 @@ func Register(r *macaron.Macaron) {
// PluginBundles
r.Group("/plugins", func() {
r.Get("/", wrap(GetPluginBundles))
r.Post("/", bind(m.UpdatePluginBundleCmd{}), wrap(UpdatePluginBundle))
r.Get("/", wrap(GetAppPlugins))
r.Post("/", bind(m.UpdateAppPluginCmd{}), wrap(UpdateAppPlugin))
}, reqOrgAdmin)
r.Get("/frontend/settings/", GetFrontendSettings)
@ -196,7 +196,7 @@ func Register(r *macaron.Macaron) {
// rendering
r.Get("/render/*", reqSignedIn, RenderToPng)
InitExternalPluginRoutes(r)
InitApiPluginRoutes(r)
r.NotFound(NotFoundHandler)
}