服务看板改成异步

This commit is contained in:
刘祥超
2021-08-30 11:26:23 +08:00
parent 4dc54f95b6
commit 19178f963e
4 changed files with 37 additions and 6 deletions

View File

@@ -41,6 +41,12 @@ func (this *IndexAction) RunGet(params struct {
"name": server.Name,
}
this.Show()
}
func (this *IndexAction) RunPost(params struct {
ServerId int64
}) {
resp, err := this.RPC().ServerStatBoardRPC().ComposeServerStatBoard(this.AdminContext(), &pb.ComposeServerStatBoardRequest{ServerId: params.ServerId})
if err != nil {
this.ErrorPage(err)
@@ -151,6 +157,5 @@ func (this *IndexAction) RunGet(params struct {
}
this.Data["metricCharts"] = chartMaps
}
this.Show()
this.Success()
}

View File

@@ -13,7 +13,7 @@ func init() {
Helper(helpers.NewUserMustAuth(configloaders.AdminModuleCodeServer)).
Helper(serverutils.NewServerHelper()).
Prefix("/servers/server/boards").
Get("", new(IndexAction)).
GetPost("", new(IndexAction)).
EndAll()
})
}