mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2026-01-02 17:16:36 +08:00
增加健康检查定时任务/健康检查可以发送消息
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
package settings
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
|
||||
"github.com/iwind/TeaGo/actions"
|
||||
)
|
||||
|
||||
type HealthRunPopupAction struct {
|
||||
actionutils.ParentAction
|
||||
}
|
||||
|
||||
func (this *HealthRunPopupAction) Init() {
|
||||
this.Nav("", "", "")
|
||||
}
|
||||
|
||||
func (this *HealthRunPopupAction) RunGet(params struct{}) {
|
||||
|
||||
this.Show()
|
||||
}
|
||||
|
||||
func (this *HealthRunPopupAction) RunPost(params struct {
|
||||
ClusterId int64
|
||||
|
||||
Must *actions.Must
|
||||
}) {
|
||||
resp, err := this.RPC().NodeClusterRPC().ExecuteNodeClusterHealthCheck(this.AdminContext(), &pb.ExecuteNodeClusterHealthCheckRequest{ClusterId: params.ClusterId})
|
||||
if err != nil {
|
||||
this.Fail(err.Error())
|
||||
}
|
||||
|
||||
this.Data["results"] = resp.Results
|
||||
this.Success()
|
||||
}
|
||||
Reference in New Issue
Block a user