2021-01-17 16:47:29 +08:00
|
|
|
package tasks
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
|
|
|
|
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type CheckAction struct {
|
|
|
|
|
actionutils.ParentAction
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (this *CheckAction) RunPost(params struct{}) {
|
2021-11-27 17:06:36 +08:00
|
|
|
resp, err := this.RPC().NodeTaskRPC().ExistsNodeTasks(this.AdminContext(), &pb.ExistsNodeTasksRequest{
|
|
|
|
|
ExcludeTypes: []string{"ipItemChanged"},
|
|
|
|
|
})
|
2021-01-17 16:47:29 +08:00
|
|
|
if err != nil {
|
|
|
|
|
this.ErrorPage(err)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.Data["isDoing"] = resp.ExistTasks
|
|
|
|
|
this.Data["hasError"] = resp.ExistError
|
|
|
|
|
|
|
|
|
|
this.Success()
|
|
|
|
|
}
|