From d9a0ea1fe71f47c2572d80a3e7d704d120f5e07d Mon Sep 17 00:00:00 2001 From: ssongliu Date: Tue, 31 Jan 2023 23:28:37 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E4=BA=8C=E7=BA=A7=E5=AF=BC=E8=88=AA=E6=A0=8F=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/lang/modules/en.ts | 6 +- frontend/src/lang/modules/zh.ts | 10 +- frontend/src/routers/modules/container.ts | 173 ++++++++-------- frontend/src/routers/modules/database.ts | 43 ++-- frontend/src/routers/modules/log.ts | 61 +++--- frontend/src/routers/modules/setting.ts | 147 +++++++------- frontend/src/views/app-store/apps/index.vue | 2 +- frontend/src/views/app-store/index.vue | 1 - .../src/views/container/compose/index.vue | 27 +-- .../container/container/create/index.vue | 2 +- .../src/views/container/container/index.vue | 96 +++++---- frontend/src/views/container/image/index.vue | 35 ++-- frontend/src/views/container/index.vue | 110 ++++------ .../src/views/container/network/index.vue | 53 +++-- frontend/src/views/container/repo/index.vue | 44 ++-- .../src/views/container/setting/index.vue | 13 +- .../src/views/container/template/index.vue | 48 +++-- frontend/src/views/container/volume/index.vue | 42 ++-- frontend/src/views/cronjob/index.vue | 64 +++--- frontend/src/views/database/index.vue | 44 ++-- frontend/src/views/database/mysql/index.vue | 189 +++++++++--------- frontend/src/views/database/redis/index.vue | 34 ++-- .../views/database/redis/terminal/index.vue | 4 +- frontend/src/views/home/index.vue | 16 +- frontend/src/views/host/monitor/index.vue | 16 +- frontend/src/views/log/index.vue | 60 ++---- frontend/src/views/log/login/index.vue | 35 ++-- frontend/src/views/log/operation/index.vue | 35 ++-- frontend/src/views/log/system/index.vue | 33 +-- frontend/src/views/setting/about/index.vue | 14 +- .../views/setting/backup-account/index.vue | 63 +++--- frontend/src/views/setting/expired.vue | 1 + frontend/src/views/setting/index.vue | 89 +++------ frontend/src/views/setting/monitor/index.vue | 26 ++- frontend/src/views/setting/panel/index.vue | 14 +- frontend/src/views/setting/safe/index.vue | 14 +- frontend/src/views/setting/snapshot/index.vue | 13 +- 37 files changed, 844 insertions(+), 833 deletions(-) diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 61f0e0cec..277c74d4a 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -364,6 +364,7 @@ export default { rdbInfo: 'Rule list has 0 value, please confirm and try again!', }, container: { + createContainer: 'Create container', containerList: 'Container list', operatorHelper: '{0} will be performed on the selected container. Do you want to continue?', start: 'Start', @@ -387,7 +388,6 @@ export default { emptyUser: 'When empty, you will log in with the default user of container', containerTerminal: 'Container terminal', - containerCreate: 'Container create', port: 'Port', exposePort: 'Expose port', exposeAll: 'Expose all', @@ -454,6 +454,7 @@ export default { createVolume: 'Create volume', repo: 'Repo', + createRepo: 'Create repo', name: 'Name', protocol: 'protocol', httpRepo: 'The http repository needs to restart the docker service to add credit', @@ -467,7 +468,9 @@ export default { registrieHelper: 'One in a row, for example:\n172.16.10.111:8081 \n172.16.10.112:8081', compose: 'Compose', + createCompose: 'Create compose', composeTemplate: 'Compose template', + createComposeTemplate: 'Create compose template', description: 'Description', content: 'Content', containerNumber: 'Container number', @@ -773,6 +776,7 @@ export default { upgradeNotes: 'Release note', upgradeNow: 'Upgrade now', + monitor: 'Monitor', enableMonitor: 'Enable', storeDays: 'Expiration time (day)', cleanMonitor: 'Clearing monitoring records', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index 9ad622f98..2fd05ef8c 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -4,7 +4,7 @@ export default { false: '否', example: '例如:', button: { - create: '新建', + create: '创建', add: '添加', save: '保存', set: '设置', @@ -381,6 +381,7 @@ export default { rdbInfo: '规则列表存在 0 值,请确认后重试!', }, container: { + createContainer: '创建容器', containerList: '容器列表', operatorHelper: '将对选中容器进行 {0} 操作,是否继续?', start: '启动', @@ -404,7 +405,6 @@ export default { containerTerminal: '容器终端', emptyUser: '为空时,将使用容器默认的用户登录', - containerCreate: '容器创建', port: '端口', exposePort: '暴露端口', exposeAll: '暴露所有', @@ -462,7 +462,7 @@ export default { imageNameHelper: '镜像名称及 Tag,例:nginx:latest', network: '网络', - createNetwork: '添加网络', + createNetwork: '创建网络', networkName: '网络名', driver: '模式', option: '参数', @@ -477,6 +477,7 @@ export default { createVolume: '创建存储卷', repo: '仓库', + createRepo: '创建仓库', name: '名称', protocol: '协议', downloadUrl: '下载地址', @@ -487,7 +488,9 @@ export default { registrieHelper: '一行一个,例:\n172.16.10.111:8081 \n172.16.10.112:8081', compose: '编排', + createCompose: '创建编排', composeTemplate: '编排模版', + createComposeTemplate: '创建编排模版', description: '描述', content: '内容', containerNumber: '容器数量', @@ -788,6 +791,7 @@ export default { mfaHelper2: '使用手机应用扫描以下二维码,获取 6 位验证码', mfaHelper3: '输入手机应用上的 6 位数字', + monitor: '监控', enableMonitor: '监控状态', storeDays: '过期时间 (天)', cleanMonitor: '清空监控记录', diff --git a/frontend/src/routers/modules/container.ts b/frontend/src/routers/modules/container.ts index 068997eb2..054267975 100644 --- a/frontend/src/routers/modules/container.ts +++ b/frontend/src/routers/modules/container.ts @@ -4,94 +4,103 @@ const containerRouter = { sort: 5, path: '/containers', component: Layout, - redirect: '/containers', + redirect: '/containers/container', meta: { icon: 'p-docker', title: 'menu.container', }, children: [ { - path: '', - name: 'Container', - component: () => import('@/views/container/container/index.vue'), - props: true, - hidden: true, - meta: { - activeMenu: '/containers', - }, - }, - { - path: 'composeDetail/:filters?', - name: 'ComposeDetail', - component: () => import('@/views/container/compose/detail/index.vue'), - props: true, - hidden: true, - meta: { - activeMenu: '/containers', - }, - }, - { - path: 'image', - name: 'Image', - component: () => import('@/views/container/image/index.vue'), - hidden: true, - meta: { - activeMenu: '/containers', - }, - }, - { - path: 'network', - name: 'Network', - component: () => import('@/views/container/network/index.vue'), - hidden: true, - meta: { - activeMenu: '/containers', - }, - }, - { - path: 'volume', - name: 'Volume', - component: () => import('@/views/container/volume/index.vue'), - hidden: true, - meta: { - activeMenu: '/containers', - }, - }, - { - path: 'repo', - name: 'Repo', - component: () => import('@/views/container/repo/index.vue'), - hidden: true, - meta: { - activeMenu: '/containers', - }, - }, - { - path: 'compose', - name: 'Compose', - component: () => import('@/views/container/compose/index.vue'), - hidden: true, - meta: { - activeMenu: '/containers', - }, - }, - { - path: 'template', - name: 'ComposeTemplate', - component: () => import('@/views/container/template/index.vue'), - hidden: true, - meta: { - activeMenu: '/containers', - }, - }, - { - path: 'setting', - name: 'ContainerSetting', - component: () => import('@/views/container/setting/index.vue'), - hidden: true, - meta: { - activeMenu: '/containers', - }, + path: '/containers', + name: 'Containers', + redirect: '/containers/container', + component: () => import('@/views/container/index.vue'), + meta: {}, + children: [ + { + path: 'container', + name: 'Container', + component: () => import('@/views/container/container/index.vue'), + props: true, + hidden: true, + meta: { + activeMenu: '/containers', + }, + }, + { + path: 'composeDetail/:filters?', + name: 'ComposeDetail', + component: () => import('@/views/container/compose/detail/index.vue'), + props: true, + hidden: true, + meta: { + activeMenu: '/containers', + }, + }, + { + path: 'image', + name: 'Image', + component: () => import('@/views/container/image/index.vue'), + hidden: true, + meta: { + activeMenu: '/containers', + }, + }, + { + path: 'network', + name: 'Network', + component: () => import('@/views/container/network/index.vue'), + hidden: true, + meta: { + activeMenu: '/containers', + }, + }, + { + path: 'volume', + name: 'Volume', + component: () => import('@/views/container/volume/index.vue'), + hidden: true, + meta: { + activeMenu: '/containers', + }, + }, + { + path: 'repo', + name: 'Repo', + component: () => import('@/views/container/repo/index.vue'), + hidden: true, + meta: { + activeMenu: '/containers', + }, + }, + { + path: 'compose', + name: 'Compose', + component: () => import('@/views/container/compose/index.vue'), + hidden: true, + meta: { + activeMenu: '/containers', + }, + }, + { + path: 'template', + name: 'ComposeTemplate', + component: () => import('@/views/container/template/index.vue'), + hidden: true, + meta: { + activeMenu: '/containers', + }, + }, + { + path: 'setting', + name: 'ContainerSetting', + component: () => import('@/views/container/setting/index.vue'), + hidden: true, + meta: { + activeMenu: '/containers', + }, + }, + ], }, ], }; diff --git a/frontend/src/routers/modules/database.ts b/frontend/src/routers/modules/database.ts index d0f2b49c5..ed577cf75 100644 --- a/frontend/src/routers/modules/database.ts +++ b/frontend/src/routers/modules/database.ts @@ -4,29 +4,38 @@ const databaseRouter = { sort: 4, path: '/databases', component: Layout, - redirect: '/databases', + redirect: '/databases/mysql', meta: { icon: 'p-database', title: 'menu.database', }, children: [ { - path: '', - name: 'Mysql', - component: () => import('@/views/database/mysql/index.vue'), - hidden: true, - meta: { - activeMenu: '/databases', - }, - }, - { - path: 'redis', - name: 'Redis', - component: () => import('@/views/database/redis/index.vue'), - hidden: true, - meta: { - activeMenu: '/databases', - }, + path: '/databases', + name: 'Databases', + redirect: '/databases/mysql', + component: () => import('@/views/database/index.vue'), + meta: {}, + children: [ + { + path: 'mysql', + name: 'Mysql', + component: () => import('@/views/database/mysql/index.vue'), + hidden: true, + meta: { + activeMenu: '/databases', + }, + }, + { + path: 'redis', + name: 'Redis', + component: () => import('@/views/database/redis/index.vue'), + hidden: true, + meta: { + activeMenu: '/databases', + }, + }, + ], }, ], }; diff --git a/frontend/src/routers/modules/log.ts b/frontend/src/routers/modules/log.ts index 22f758931..e60b74478 100644 --- a/frontend/src/routers/modules/log.ts +++ b/frontend/src/routers/modules/log.ts @@ -4,38 +4,47 @@ const logsRouter = { sort: 7, path: '/logs', component: Layout, - redirect: '/logs', + redirect: '/logs/operation', meta: { title: 'menu.logs', icon: 'p-log', }, children: [ { - path: '', - name: 'OperationLog', - component: () => import('@/views/log/operation/index.vue'), - hidden: true, - meta: { - activeMenu: '/logs', - }, - }, - { - path: 'login', - name: 'LoginLog', - component: () => import('@/views/log/login/index.vue'), - hidden: true, - meta: { - activeMenu: '/logs', - }, - }, - { - path: 'system', - name: 'SystemLog', - component: () => import('@/views/log/system/index.vue'), - hidden: true, - meta: { - activeMenu: '/logs', - }, + path: '/logs', + name: 'Log', + redirect: '/logs/operation', + component: () => import('@/views/log/index.vue'), + meta: {}, + children: [ + { + path: 'operation', + name: 'OperationLog', + component: () => import('@/views/log/operation/index.vue'), + hidden: true, + meta: { + activeMenu: '/logs', + }, + }, + { + path: 'login', + name: 'LoginLog', + component: () => import('@/views/log/login/index.vue'), + hidden: true, + meta: { + activeMenu: '/logs', + }, + }, + { + path: 'system', + name: 'SystemLog', + component: () => import('@/views/log/system/index.vue'), + hidden: true, + meta: { + activeMenu: '/logs', + }, + }, + ], }, ], }; diff --git a/frontend/src/routers/modules/setting.ts b/frontend/src/routers/modules/setting.ts index 2a5de4aa2..8882567f3 100644 --- a/frontend/src/routers/modules/setting.ts +++ b/frontend/src/routers/modules/setting.ts @@ -4,81 +4,90 @@ const settingRouter = { sort: 8, path: '/settings', component: Layout, - redirect: '/setting', + redirect: '/settings/panel', meta: { title: 'menu.settings', icon: 'p-config', }, children: [ { - path: '/setting', - name: 'Panel', - component: () => import('@/views/setting/panel/index.vue'), - hidden: true, - meta: { - requiresAuth: true, - key: 'Setting', - }, - }, - { - path: '/setting/backupaccount', - name: 'BackupAccount', - component: () => import('@/views/setting/backup-account/index.vue'), - hidden: true, - meta: { - requiresAuth: true, - key: 'Setting', - }, - }, - { - path: '/setting/about', - name: 'About', - component: () => import('@/views/setting/about/index.vue'), - hidden: true, - meta: { - requiresAuth: true, - key: 'Setting', - }, - }, - { - path: '/setting/monitor', - name: 'Monitor', - component: () => import('@/views/setting/monitor/index.vue'), - hidden: true, - meta: { - requiresAuth: true, - key: 'Setting', - }, - }, - { - path: '/setting/safe', - name: 'Safe', - component: () => import('@/views/setting/safe/index.vue'), - hidden: true, - meta: { - requiresAuth: true, - key: 'Setting', - }, - }, - { - path: '/setting/snapshot', - name: 'Snapshot', - hidden: true, - component: () => import('@/views/setting/snapshot/index.vue'), - meta: { - requiresAuth: true, - key: 'Setting', - }, - }, - { - path: '/expired', - name: 'Expired', - hidden: true, - component: () => import('@/views/setting/expired.vue'), - meta: { - requiresAuth: true, - key: 'Expired', - }, + path: '/settings', + name: 'Setting', + redirect: '/settings/panel', + component: () => import('@/views/setting/index.vue'), + meta: {}, + children: [ + { + path: 'panel', + name: 'Panel', + component: () => import('@/views/setting/panel/index.vue'), + hidden: true, + meta: { + requiresAuth: true, + activeMenu: 'Setting', + }, + }, + { + path: 'backupaccount', + name: 'BackupAccount', + component: () => import('@/views/setting/backup-account/index.vue'), + hidden: true, + meta: { + requiresAuth: true, + activeMenu: 'Setting', + }, + }, + { + path: 'about', + name: 'About', + component: () => import('@/views/setting/about/index.vue'), + hidden: true, + meta: { + requiresAuth: true, + activeMenu: 'Setting', + }, + }, + { + path: 'monitor', + name: 'Monitor', + component: () => import('@/views/setting/monitor/index.vue'), + hidden: true, + meta: { + requiresAuth: true, + activeMenu: 'Setting', + }, + }, + { + path: 'safe', + name: 'Safe', + component: () => import('@/views/setting/safe/index.vue'), + hidden: true, + meta: { + requiresAuth: true, + activeMenu: 'Setting', + }, + }, + { + path: 'snapshot', + name: 'Snapshot', + hidden: true, + component: () => import('@/views/setting/snapshot/index.vue'), + meta: { + requiresAuth: true, + activeMenu: 'Setting', + }, + }, + { + path: 'expired', + name: 'Expired', + hidden: true, + component: () => import('@/views/setting/expired.vue'), + meta: { + requiresAuth: true, + activeMenu: 'Expired', + }, + }, + ], }, ], }; diff --git a/frontend/src/views/app-store/apps/index.vue b/frontend/src/views/app-store/apps/index.vue index 25467b7d7..f75caea05 100644 --- a/frontend/src/views/app-store/apps/index.vue +++ b/frontend/src/views/app-store/apps/index.vue @@ -33,7 +33,7 @@