From a6181187925641552b0d754dde949418a4e76a8c Mon Sep 17 00:00:00 2001 From: ssongliu Date: Thu, 23 Feb 2023 17:31:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E4=B8=BB=E6=9C=BA?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=BF=9E=E6=8E=A5=E5=A4=B1=E8=B4=A5=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/service/host.go | 2 +- backend/init/migration/migrations/init.go | 2 +- frontend/src/lang/modules/en.ts | 8 ++--- frontend/src/lang/modules/zh.ts | 10 +++--- frontend/src/views/cronjob/index.vue | 3 +- frontend/src/views/cronjob/record/index.vue | 21 ++++++----- frontend/src/views/home/index.vue | 4 +-- .../host/terminal/terminal/host-create.vue | 14 ++++++-- .../views/host/terminal/terminal/index.vue | 36 +++++++++++-------- frontend/src/views/website/website/index.vue | 2 +- 10 files changed, 60 insertions(+), 42 deletions(-) diff --git a/backend/app/service/host.go b/backend/app/service/host.go index bafc6ce6f..81e2816ea 100644 --- a/backend/app/service/host.go +++ b/backend/app/service/host.go @@ -92,7 +92,7 @@ func (u *HostService) SearchForTree(search dto.SearchForTree) ([]dto.HostTree, e } func (u *HostService) Create(req dto.HostOperate) (*dto.HostInfo, error) { - host, _ := hostRepo.Get(commonRepo.WithByName(req.Name)) + host, _ := hostRepo.Get(hostRepo.WithByAddr(req.Addr)) if host.ID != 0 { return nil, constant.ErrRecordExist } diff --git a/backend/init/migration/migrations/init.go b/backend/init/migration/migrations/init.go index c58c99dce..3cf4e413c 100644 --- a/backend/init/migration/migrations/init.go +++ b/backend/init/migration/migrations/init.go @@ -215,7 +215,7 @@ var AddTableWebsite = &gormigrate.Migration{ return err } item := &model.WebsiteGroup{ - Name: "默认分组", + Name: "默认", Default: true, } if err := tx.Create(item).Error; err != nil { diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 334981343..c44b7dd83 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -235,10 +235,8 @@ export default { kubepiInfo: 'Modern open source Kubernetes panel', goInstall: 'Go install', - allNetworkCard: 'All', networkCard: 'NetworkCard', disk: 'Disk', - allDisk: 'All', }, tabs: { more: 'More', @@ -742,6 +740,7 @@ export default { sessionTimeoutHelper: 'If you do not operate the panel for more than {0} seconds, the panel automatically logs out', syncTime: 'Server time', + second: ' S', changePassword: 'Password change', oldPassword: 'Original password', newPassword: 'New password', @@ -811,7 +810,7 @@ export default { upgrade: 'Upgrade', upgrading: 'Please wait while the upgrade is underway...', upgradeHelper: 'The upgrade requires a service restart. Do you want to continue?', - noUpgrade: 'This is the latest version. You do not need to update it', + noUpgrade: 'It is currently the latest version', newVersion: 'Latest version', upgradeCheck: 'Check for updates', upgradeNotes: 'Release note', @@ -837,7 +836,7 @@ export default { about: 'About', project: 'Project Address', issue: 'Feedback', - chat: 'Community Discussion', + doc: 'Official document', star: 'Star', description: '1Panel, A modern open source Linux panel.', }, @@ -1052,7 +1051,6 @@ export default { data: 'data', ever: 'permanent', nextYear: 'One year later', - allGroup: 'All Groups', noLog: 'There are currently no logs...', defaultServer: 'Default Site', noDefaulServer: 'Not set', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index 6ae05deac..c849d9a1b 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -247,8 +247,6 @@ export default { networkCard: '网卡', disk: '磁盘', - allNetworkCard: '所有网卡', - allDisk: '所有磁盘', }, tabs: { more: '更多', @@ -613,7 +611,7 @@ export default { connTestOk: '连接信息可用', connTestFailed: '连接不可用,请检查连接信息!', hostList: '主机信息', - createConn: '创建连接', + createConn: '新建连接', createGroup: '创建分组', expand: '全部展开', fold: '全部收缩', @@ -748,6 +746,7 @@ export default { sessionTimeoutError: '最小超时时间为 300 秒', sessionTimeoutHelper: '如果用户超过 {0} 秒未操作面板,面板将自动退出登录', syncTime: '服务器时间', + second: ' 秒', changePassword: '密码修改', oldPassword: '原密码', newPassword: '新密码', @@ -798,7 +797,7 @@ export default { upgrade: '升级', upgrading: '正在升级中,请稍候...', upgradeHelper: '升级操作需要重启服务,是否继续?', - noUpgrade: '当前已是最新版本,无需更新', + noUpgrade: '当前已经是最新版本', newVersion: '最新版本', upgradeCheck: '检查更新', upgradeNotes: '更新内容', @@ -842,7 +841,7 @@ export default { about: '关于', project: '项目地址', issue: '问题反馈', - chat: '参与讨论', + doc: '官方文档', star: '点亮 Star', description: '1Panel,一款现代化的开源 Linux 面板。', }, @@ -1056,7 +1055,6 @@ export default { data: '数据', ever: '永久', nextYear: '一年后', - allGroup: '所有分组', noLog: '当前没有日志...', defaultServer: '默认站点', noDefaulServer: '未设置', diff --git a/frontend/src/views/cronjob/index.vue b/frontend/src/views/cronjob/index.vue index 50ed89f71..a547d603c 100644 --- a/frontend/src/views/cronjob/index.vue +++ b/frontend/src/views/cronjob/index.vue @@ -173,7 +173,7 @@ const search = async () => { loading.value = false; data.value = res.data.items || []; for (const item of data.value) { - if (item.targetDir !== '-') { + if (item.targetDir !== '-' || item.targetDir !== '') { item.targetDir = i18n.global.t('setting.' + item.targetDir); } } @@ -191,6 +191,7 @@ const onOpenDialog = async ( title: string, rowData: Partial = { specType: 'perMonth', + type: 'shell', week: 1, day: 3, hour: 1, diff --git a/frontend/src/views/cronjob/record/index.vue b/frontend/src/views/cronjob/record/index.vue index 4f93266e2..df702d41b 100644 --- a/frontend/src/views/cronjob/record/index.vue +++ b/frontend/src/views/cronjob/record/index.vue @@ -4,7 +4,7 @@
- {{ dialogData.rowData.name }}-{{ $t('cronjob.' + dialogData.rowData.type) }} + {{ $t('cronjob.' + dialogData.rowData.type) }} - {{ dialogData.rowData.name }} {{ $t('commons.status.running') }} @@ -75,7 +75,7 @@
-