func Host(r macaron.Render) { var ss = map[string]*sheep.SHEEP{} for i, s := range sheep.SHEEPS { ss[i] = s.Obj() } a := PARAHOST{Sheeps: ss, MapStatus: sheep.MAPSTATUS} r.HTML(200, "host", a) }
func Dashboard(r macaron.Render) { var ss = map[string]*sheep.SHEEP{} for i, s := range sheep.SHEEPS { ss[i] = s.Obj() } a := PARADASHBOARD{Sheeps: ss, Requset: REQ / 3} r.HTML(200, "dashboard", a) }
func NotFound(r macaron.Render) { r.HTML(404, "notfound", nil) }
func Setting(r macaron.Render) { url := fmt.Sprintf("%s:%d", cfg.HOST, cfg.PORT) a := PARASETTING{Cfg: map[string]interface{}{"Client Port": cfg.DEFAULTCPORT, "Version": cfg.VER, "Url": url, "Heartbeat Period": cfg.PERIOD, "Log path": cfg.LOGPATH, "Retry times": cfg.RETRY, "Algorithm": cfg.ALGORITHM, "Assign Script": cfg.ASSIGNSCRIPT, "Assign Type": cfg.ASSIGNTYPE}} r.HTML(200, "setting", a) }