Finish all the work of dashboard.

This commit is contained in:
zicla
2018-12-02 21:06:06 +08:00
parent 927427f353
commit b361c50c9a
5 changed files with 55 additions and 13 deletions

View File

@ -35,6 +35,7 @@ func (this *DashboardController) RegisterRoutes() map[string]func(writer http.Re
//每个Controller需要主动注册自己的路由。
routeMap["/api/dashboard/page"] = this.Wrap(this.Page, USER_ROLE_ADMINISTRATOR)
routeMap["/api/dashboard/active/ip/top10"] = this.Wrap(this.ActiveIpTop10, USER_ROLE_ADMINISTRATOR)
return routeMap
}
@ -93,3 +94,9 @@ func (this *DashboardController) Page(writer http.ResponseWriter, request *http.
return this.Success(pager)
}
func (this *DashboardController) ActiveIpTop10(writer http.ResponseWriter, request *http.Request) *WebResult {
list := this.dashboardDao.ActiveIpTop10()
return this.Success(list)
}