diff options
author | Asaad Mahmood <Unknowngi@live.com> | 2015-10-19 22:59:01 +0500 |
---|---|---|
committer | Asaad Mahmood <Unknowngi@live.com> | 2015-10-19 22:59:01 +0500 |
commit | 5135986a3b13c0a4474dbbca683d89ffbc1dead5 (patch) | |
tree | 42e511c01a0e707356091fd4d09911eb18b8ca20 /web/web.go | |
parent | 2d42aefeafd2a0bea6419a6ef79c0c9b1fd313eb (diff) | |
parent | fd69910fab332642a7793e64064169e89eb0c3de (diff) | |
download | chat-5135986a3b13c0a4474dbbca683d89ffbc1dead5.tar.gz chat-5135986a3b13c0a4474dbbca683d89ffbc1dead5.tar.bz2 chat-5135986a3b13c0a4474dbbca683d89ffbc1dead5.zip |
Merge branch 'master' of https://github.com/mattermost/platform into ui-improvements
Diffstat (limited to 'web/web.go')
-rw-r--r-- | web/web.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/web/web.go b/web/web.go index 00e00b3b9..f10c4f2a1 100644 --- a/web/web.go +++ b/web/web.go @@ -64,6 +64,9 @@ func InitWeb() { mainrouter.Handle("/signup/{service:[A-Za-z]+}/complete", api.AppHandlerIndependent(signupCompleteOAuth)).Methods("GET") mainrouter.Handle("/admin_console", api.UserRequired(adminConsole)).Methods("GET") + mainrouter.Handle("/admin_console/", api.UserRequired(adminConsole)).Methods("GET") + mainrouter.Handle("/admin_console/{tab:[A-Za-z0-9-_]+}", api.UserRequired(adminConsole)).Methods("GET") + mainrouter.Handle("/admin_console/{tab:[A-Za-z0-9-_]+}/{team:[A-Za-z0-9-]*}", api.UserRequired(adminConsole)).Methods("GET") mainrouter.Handle("/hooks/{id:[A-Za-z0-9]+}", api.ApiAppHandler(incomingWebhook)).Methods("POST") @@ -699,7 +702,14 @@ func adminConsole(c *api.Context, w http.ResponseWriter, r *http.Request) { return } + params := mux.Vars(r) + activeTab := params["tab"] + teamId := params["team"] + page := NewHtmlTemplatePage("admin_console", "Admin Console") + + page.Props["ActiveTab"] = activeTab + page.Props["TeamId"] = teamId page.Render(c, w) } |