增加节点同步状态提示和任务列表

This commit is contained in:
GoEdgeLab
2021-01-17 16:47:29 +08:00
parent 9a6620d80b
commit b6ae2292c3
23 changed files with 557 additions and 245 deletions

View File

@@ -0,0 +1,24 @@
package tasks
import (
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
)
type DeleteAction struct {
actionutils.ParentAction
}
func (this *DeleteAction) RunPost(params struct {
TaskId int64
}) {
defer this.CreateLogInfo("删除同步任务 %d", params.TaskId)
_, err := this.RPC().NodeTaskRPC().DeleteNodeTask(this.AdminContext(), &pb.DeleteNodeTaskRequest{NodeTaskId: params.TaskId})
if err != nil {
this.ErrorPage(err)
return
}
this.Success()
}