feat(apps): lots of more work on apps, changed app_plugin to app_settings in order to to confuse the app plugin model (definition) and app org settings

This commit is contained in:
Torkel Ödegaard
2016-01-10 21:37:11 +01:00
parent ab79348af5
commit c1e94e61d0
23 changed files with 272 additions and 220 deletions

View File

@ -41,8 +41,8 @@ func Register(r *macaron.Macaron) {
r.Get("/admin/orgs", reqGrafanaAdmin, Index)
r.Get("/admin/orgs/edit/:id", reqGrafanaAdmin, Index)
r.Get("/org/apps", reqSignedIn, Index)
r.Get("/org/apps/edit/*", reqSignedIn, Index)
r.Get("/apps", reqSignedIn, Index)
r.Get("/apps/edit/*", reqSignedIn, Index)
r.Get("/dashboard/*", reqSignedIn, Index)
r.Get("/dashboard-solo/*", reqSignedIn, Index)
@ -119,8 +119,9 @@ func Register(r *macaron.Macaron) {
r.Patch("/invites/:code/revoke", wrap(RevokeInvite))
// apps
r.Get("/apps", wrap(GetAppPlugins))
r.Post("/apps", bind(m.UpdateAppPluginCmd{}), wrap(UpdateAppPlugin))
r.Get("/apps", wrap(GetOrgAppsList))
r.Get("/apps/:appId/settings", wrap(GetAppSettingsById))
r.Post("/apps/:appId/settings", bind(m.UpdateAppSettingsCmd{}), wrap(UpdateAppSettings))
}, reqOrgAdmin)
// create new org