mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-10 08:20:24 +08:00
可以批量删除同步任务
This commit is contained in:
24
internal/web/actions/default/clusters/tasks/deleteBatch.go
Normal file
24
internal/web/actions/default/clusters/tasks/deleteBatch.go
Normal file
@@ -0,0 +1,24 @@
|
||||
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()
|
||||
}
|
||||
Reference in New Issue
Block a user