mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Adding initial admin console html pages
This commit is contained in:
@@ -21,8 +21,15 @@ func main() {
|
||||
fmt.Println("Current working directory is set to " + pwd)
|
||||
|
||||
var config = flag.String("config", "config.json", "path to config file")
|
||||
var action = flag.String("action", "none", "path to config file")
|
||||
flag.Parse()
|
||||
|
||||
fmt.Println(action)
|
||||
|
||||
if len(action) > 0 {
|
||||
return
|
||||
}
|
||||
|
||||
utils.LoadConfig(*config)
|
||||
api.NewServer()
|
||||
api.InitApi()
|
||||
|
||||
@@ -4,30 +4,20 @@
|
||||
width: 100%;
|
||||
border: $border-gray;
|
||||
bottom: 38px;
|
||||
overflow: auto;
|
||||
@extend %popover-box-shadow;
|
||||
.sidebar--right & {
|
||||
bottom: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
.command-name {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
line-height: 24px;
|
||||
padding: 5px 10px 8px;
|
||||
height: 37px;
|
||||
line-height: 37px;
|
||||
padding: 2px 10px 2px 5px;
|
||||
z-index: 101;
|
||||
font-size: 0.95em;
|
||||
border-bottom: 1px solid #ddd;
|
||||
&:hover {
|
||||
background-color: #e8eaed;
|
||||
}
|
||||
.command__desc {
|
||||
margin-left: 5px;
|
||||
color: #999;
|
||||
line-height: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.command-desc {
|
||||
|
||||
@@ -139,7 +139,6 @@ body.ios {
|
||||
width: 100%;
|
||||
padding: 1em 0 0;
|
||||
position: relative;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
&.hide-scroll::-webkit-scrollbar {
|
||||
width: 0px !important;
|
||||
}
|
||||
|
||||
@@ -635,10 +635,10 @@
|
||||
}
|
||||
}
|
||||
.app__content {
|
||||
padding-top: 50px;
|
||||
padding-top: 45px;
|
||||
margin: 0;
|
||||
.channel__wrap & {
|
||||
padding-top: 50px;
|
||||
padding-top: 45px;
|
||||
}
|
||||
.channel-header {
|
||||
display: none;
|
||||
|
||||
@@ -94,11 +94,6 @@
|
||||
list-style-type:none;
|
||||
}
|
||||
|
||||
.setting-list__hint {
|
||||
color: #555;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.mentions-input {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
top: 66px;
|
||||
}
|
||||
.nav-pills__unread-indicator-bottom {
|
||||
bottom: 10px;
|
||||
bottom: 0px;
|
||||
}
|
||||
|
||||
.nav {
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
@import "partials/sidebar--left";
|
||||
@import "partials/sidebar--right";
|
||||
@import "partials/sidebar--menu";
|
||||
@import "partials/admin-console";
|
||||
@import "partials/signup";
|
||||
@import "partials/files";
|
||||
@import "partials/videos";
|
||||
|
||||
45
web/web.go
45
web/web.go
@@ -52,31 +52,33 @@ func InitWeb() {
|
||||
mainrouter.PathPrefix("/static/").Handler(http.StripPrefix("/static/", http.FileServer(http.Dir(staticDir))))
|
||||
|
||||
mainrouter.Handle("/", api.AppHandlerIndependent(root)).Methods("GET")
|
||||
mainrouter.Handle("/{team:[A-Za-z0-9-]+(__)?[A-Za-z0-9-]+}", api.AppHandler(login)).Methods("GET")
|
||||
mainrouter.Handle("/{team:[A-Za-z0-9-]+(__)?[A-Za-z0-9-]+}/", api.AppHandler(login)).Methods("GET")
|
||||
mainrouter.Handle("/{team:[A-Za-z0-9-]+(__)?[A-Za-z0-9-]+}/login", api.AppHandler(login)).Methods("GET")
|
||||
|
||||
// Bug in gorilla.mux prevents us from using regex here.
|
||||
mainrouter.Handle("/{team}/login/{service}", api.AppHandler(loginWithOAuth)).Methods("GET")
|
||||
mainrouter.Handle("/login/{service:[A-Za-z]+}/complete", api.AppHandlerIndependent(loginCompleteOAuth)).Methods("GET")
|
||||
|
||||
mainrouter.Handle("/{team:[A-Za-z0-9-]+(__)?[A-Za-z0-9-]+}/logout", api.AppHandler(logout)).Methods("GET")
|
||||
mainrouter.Handle("/{team:[A-Za-z0-9-]+(__)?[A-Za-z0-9-]+}/reset_password", api.AppHandler(resetPassword)).Methods("GET")
|
||||
// Bug in gorilla.mux prevents us from using regex here.
|
||||
mainrouter.Handle("/{team}/channels/{channelname}", api.UserRequired(getChannel)).Methods("GET")
|
||||
|
||||
// Anything added here must have an _ in it so it does not conflict with team names
|
||||
|
||||
mainrouter.Handle("/signup_team_complete/", api.AppHandlerIndependent(signupTeamComplete)).Methods("GET")
|
||||
mainrouter.Handle("/signup_user_complete/", api.AppHandlerIndependent(signupUserComplete)).Methods("GET")
|
||||
mainrouter.Handle("/signup_team_confirm/", api.AppHandlerIndependent(signupTeamConfirm)).Methods("GET")
|
||||
|
||||
// Bug in gorilla.mux prevents us from using regex here.
|
||||
mainrouter.Handle("/{team}/signup/{service}", api.AppHandler(signupWithOAuth)).Methods("GET")
|
||||
mainrouter.Handle("/signup/{service:[A-Za-z]+}/complete", api.AppHandlerIndependent(signupCompleteOAuth)).Methods("GET")
|
||||
|
||||
mainrouter.Handle("/verify_email", api.AppHandlerIndependent(verifyEmail)).Methods("GET")
|
||||
mainrouter.Handle("/find_team", api.AppHandlerIndependent(findTeam)).Methods("GET")
|
||||
mainrouter.Handle("/signup_team", api.AppHandlerIndependent(signup)).Methods("GET")
|
||||
mainrouter.Handle("/login/{service:[A-Za-z]+}/complete", api.AppHandlerIndependent(loginCompleteOAuth)).Methods("GET")
|
||||
mainrouter.Handle("/signup/{service:[A-Za-z]+}/complete", api.AppHandlerIndependent(signupCompleteOAuth)).Methods("GET")
|
||||
|
||||
mainrouter.Handle("/admin", api.AppHandlerIndependent(adminConsole)).Methods("GET")
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------------------------
|
||||
// *ANYTHING* team spefic should go below this line
|
||||
// ----------------------------------------------------------------------------------------------
|
||||
|
||||
mainrouter.Handle("/{team:[A-Za-z0-9-]+(__)?[A-Za-z0-9-]+}", api.AppHandler(login)).Methods("GET")
|
||||
mainrouter.Handle("/{team:[A-Za-z0-9-]+(__)?[A-Za-z0-9-]+}/", api.AppHandler(login)).Methods("GET")
|
||||
mainrouter.Handle("/{team:[A-Za-z0-9-]+(__)?[A-Za-z0-9-]+}/login", api.AppHandler(login)).Methods("GET")
|
||||
mainrouter.Handle("/{team:[A-Za-z0-9-]+(__)?[A-Za-z0-9-]+}/logout", api.AppHandler(logout)).Methods("GET")
|
||||
mainrouter.Handle("/{team:[A-Za-z0-9-]+(__)?[A-Za-z0-9-]+}/reset_password", api.AppHandler(resetPassword)).Methods("GET")
|
||||
mainrouter.Handle("/{team}/login/{service}", api.AppHandler(loginWithOAuth)).Methods("GET") // Bug in gorilla.mux prevents us from using regex here.
|
||||
mainrouter.Handle("/{team}/channels/{channelname}", api.UserRequired(getChannel)).Methods("GET") // Bug in gorilla.mux prevents us from using regex here.
|
||||
mainrouter.Handle("/{team}/signup/{service}", api.AppHandler(signupWithOAuth)).Methods("GET") // Bug in gorilla.mux prevents us from using regex here.
|
||||
|
||||
|
||||
|
||||
watchAndParseTemplates()
|
||||
}
|
||||
@@ -640,3 +642,8 @@ func loginCompleteOAuth(c *api.Context, w http.ResponseWriter, r *http.Request)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func adminConsole(c *api.Context, w http.ResponseWriter, r *http.Request) {
|
||||
page := NewHtmlTemplatePage("admin_console", "Admin Console")
|
||||
page.Render(c, w)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user