Files
EdgeAdmin/internal/web/actions/default/clusters/tasks/deleteBatch.go

25 lines
537 B
Go
Raw Normal View History

2021-02-02 20:52:46 +08:00
package tasks
import (
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
)
type DeleteBatchAction struct {
actionutils.ParentAction
}
func (this *DeleteBatchAction) RunPost(params struct {
TaskIds []int64
}) {
defer this.CreateLogInfo("批量删除节点同步任务")
_, err := this.RPC().NodeTaskRPC().DeleteNodeTasks(this.AdminContext(), &pb.DeleteNodeTasksRequest{NodeTaskIds: params.TaskIds})
if err != nil {
this.ErrorPage(err)
return
}
this.Success()
}