mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2026-02-18 14:05:37 +08:00
部分中文转换为多语言代号
This commit is contained in:
@@ -5,6 +5,7 @@ package logs
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/configutils"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/langs/codes"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/nodeconfigs"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
|
||||
)
|
||||
@@ -23,7 +24,7 @@ func (this *DeleteAllAction) RunPost(params struct {
|
||||
ClusterId int64
|
||||
NodeId int64
|
||||
}) {
|
||||
defer this.CreateLogInfo("批量删除节点运行日志")
|
||||
defer this.CreateLogInfo(codes.NodeLog_LogDeleteNodeLogsBatch)
|
||||
|
||||
// 目前仅允许通过关键词删除,防止误删
|
||||
if len(params.Keyword) == 0 {
|
||||
|
||||
@@ -5,6 +5,7 @@ package logs
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/helpers"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/langs/codes"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
|
||||
"github.com/iwind/TeaGo/types"
|
||||
"strings"
|
||||
@@ -22,7 +23,7 @@ func (this *FixAction) RunPost(params struct {
|
||||
logIdStrings = append(logIdStrings, types.String(logId))
|
||||
}
|
||||
|
||||
defer this.CreateLogInfo("设置日志 %s 为已修复", strings.Join(logIdStrings, ", "))
|
||||
defer this.CreateLogInfo(codes.NodeLog_LogFixNodeLogs, strings.Join(logIdStrings, ", "))
|
||||
|
||||
_, err := this.RPC().NodeLogRPC().FixNodeLogs(this.AdminContext(), &pb.FixNodeLogsRequest{NodeLogIds: params.LogIds})
|
||||
if err != nil {
|
||||
|
||||
@@ -5,6 +5,7 @@ package logs
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/helpers"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/langs/codes"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
|
||||
)
|
||||
|
||||
@@ -14,7 +15,7 @@ type FixAllAction struct {
|
||||
|
||||
func (this *FixAllAction) RunPost(params struct {
|
||||
}) {
|
||||
defer this.CreateLogInfo("设置所有日志为已修复")
|
||||
defer this.CreateLogInfo(codes.NodeLog_LogFixAllLogs)
|
||||
|
||||
_, err := this.RPC().NodeLogRPC().FixAllNodeLogs(this.AdminContext(), &pb.FixAllNodeLogsRequest{})
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user