2021-05-23 20:44:51 +08:00
|
|
|
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
|
|
|
|
|
|
2022-03-23 17:31:53 +08:00
|
|
|
package logs
|
2021-05-23 20:44:51 +08:00
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
|
|
|
|
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
|
|
|
|
|
)
|
|
|
|
|
|
2022-03-23 17:31:53 +08:00
|
|
|
type FixAllAction struct {
|
2021-05-23 20:44:51 +08:00
|
|
|
actionutils.ParentAction
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-23 17:31:53 +08:00
|
|
|
func (this *FixAllAction) RunPost(params struct {
|
2021-05-23 20:44:51 +08:00
|
|
|
}) {
|
2022-03-23 17:31:53 +08:00
|
|
|
defer this.CreateLogInfo("设置所有日志为已修复")
|
|
|
|
|
|
|
|
|
|
_, err := this.RPC().NodeLogRPC().FixAllNodeLogs(this.AdminContext(), &pb.FixAllNodeLogsRequest{})
|
2021-05-23 20:44:51 +08:00
|
|
|
if err != nil {
|
|
|
|
|
this.ErrorPage(err)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.Success()
|
|
|
|
|
}
|