mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2026-02-26 03:45:37 +08:00
部分中文转换为多语言代号
This commit is contained in:
@@ -3,6 +3,7 @@ package database
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/langs/codes"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/systemconfigs"
|
||||
"github.com/iwind/TeaGo/actions"
|
||||
@@ -42,7 +43,7 @@ func (this *CleanSettingAction) RunPost(params struct {
|
||||
Must *actions.Must
|
||||
CSRF *actionutils.CSRF
|
||||
}) {
|
||||
defer this.CreateLogInfo("修改数据库自动清理设置")
|
||||
defer this.CreateLogInfo(codes.Database_LogUpdateCleanDays)
|
||||
|
||||
days := params.Days
|
||||
if days < 0 {
|
||||
|
||||
@@ -2,6 +2,7 @@ package database
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/langs/codes"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
|
||||
)
|
||||
|
||||
@@ -12,7 +13,7 @@ type DeleteTableAction struct {
|
||||
func (this *DeleteTableAction) RunPost(params struct {
|
||||
Table string
|
||||
}) {
|
||||
defer this.CreateLogInfo("删除数据表 %s", params.Table)
|
||||
defer this.CreateLogInfo(codes.Database_LogDeleteTable, params.Table)
|
||||
|
||||
_, err := this.RPC().DBRPC().DeleteDBTable(this.AdminContext(), &pb.DeleteDBTableRequest{DbTable: params.Table})
|
||||
if err != nil {
|
||||
|
||||
@@ -2,6 +2,7 @@ package database
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/langs/codes"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
|
||||
)
|
||||
|
||||
@@ -12,7 +13,7 @@ type TruncateTableAction struct {
|
||||
func (this *TruncateTableAction) RunPost(params struct {
|
||||
Table string
|
||||
}) {
|
||||
defer this.CreateLogInfo("清空数据表 %s 数据", params.Table)
|
||||
defer this.CreateLogInfo(codes.Database_LogTruncateTable, params.Table)
|
||||
|
||||
_, err := this.RPC().DBRPC().TruncateDBTable(this.AdminContext(), &pb.TruncateDBTableRequest{DbTable: params.Table})
|
||||
if err != nil {
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/configutils"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/langs/codes"
|
||||
"github.com/go-sql-driver/mysql"
|
||||
"github.com/iwind/TeaGo/Tea"
|
||||
"github.com/iwind/TeaGo/actions"
|
||||
@@ -99,7 +100,7 @@ func (this *UpdateAction) RunPost(params struct {
|
||||
|
||||
Must *actions.Must
|
||||
}) {
|
||||
defer this.CreateLogInfo("修改API节点数据库设置")
|
||||
defer this.CreateLogInfo(codes.Database_LogUpdateAPINodeDatabaseConfig)
|
||||
|
||||
params.Must.
|
||||
Field("host", params.Host).
|
||||
|
||||
Reference in New Issue
Block a user