增加清空节点同步任务、清空DNS同步任务功能

This commit is contained in:
刘祥超
2023-07-02 17:29:00 +08:00
parent 60eef31490
commit 3fa2cdfe44
8 changed files with 81 additions and 7 deletions

View File

@@ -0,0 +1,25 @@
// Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package tasks
import (
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/TeaOSLab/EdgeCommon/pkg/langs/codes"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
)
type DeleteAllAction struct {
actionutils.ParentAction
}
func (this *DeleteAllAction) RunPost(params struct{}) {
defer this.CreateLogInfo(codes.NodeTask_LogDeleteAllNodeTasks)
_, err := this.RPC().NodeTaskRPC().DeleteAllNodeTasks(this.AdminContext(), &pb.DeleteAllNodeTasksRequest{})
if err != nil {
this.ErrorPage(err)
return
}
this.Success()
}