web: 提示版本号不一致的 node

pull/1/head
miraclesu 2017-04-19 12:09:11 +08:00
parent bc442fb8ba
commit ecdb29fe02
4 changed files with 55 additions and 47 deletions

View File

@ -7,8 +7,13 @@ import (
"github.com/gorilla/mux"
"sunteng/cronsun/conf"
"sunteng/cronsun/models"
)
func GetVersion(w http.ResponseWriter, r *http.Request) {
outJSON(w, models.Version)
}
func InitRouters() (s *http.Server, err error) {
jobHandler := &Job{}
nodeHandler := &Node{}
@ -18,6 +23,7 @@ func InitRouters() (s *http.Server, err error) {
r := mux.NewRouter()
subrouter := r.PathPrefix("/v1").Subrouter()
subrouter.Handle("/version", BaseHandler{Handle: GetVersion}).Methods("GET")
// get job list
h := BaseHandler{Handle: jobHandler.GetList}

52
web/ui/dist/build.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long