mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-04 05:00:25 +08:00
24 lines
503 B
Go
24 lines
503 B
Go
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{}) {
|
|
resp, err := this.RPC().NodeTaskRPC().ExistsNodeTasks(this.AdminContext(), &pb.ExistsNodeTasksRequest{})
|
|
if err != nil {
|
|
this.ErrorPage(err)
|
|
return
|
|
}
|
|
|
|
this.Data["isDoing"] = resp.ExistTasks
|
|
this.Data["hasError"] = resp.ExistError
|
|
|
|
this.Success()
|
|
}
|