Пример #1
0
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)
}
Пример #2
0
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)
}
Пример #3
0
func NotFound(r macaron.Render) {
	r.HTML(404, "notfound", nil)
}
Пример #4
0
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)
}