增加健康检查定时任务/健康检查可以发送消息

This commit is contained in:
GoEdgeLab
2020-10-20 16:45:10 +08:00
parent bbe6253346
commit 957b5b620c
5 changed files with 9 additions and 9 deletions

View File

@@ -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()
}