From 38984a502d922aa4df0695d4d79d1668b888c775 Mon Sep 17 00:00:00 2001 From: ssongliu Date: Wed, 15 Feb 2023 17:10:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AE=B9=E5=99=A8=E5=BC=B9=E6=A1=86?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E6=8A=BD=E5=B1=89=EF=BC=8C=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E9=83=A8=E5=88=86=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../codemirror-dialog/codemirror.vue | 15 ++- .../src/components/container-log/index.vue | 14 +-- frontend/src/lang/modules/en.ts | 118 ++++++++++-------- frontend/src/lang/modules/zh.ts | 2 +- frontend/src/store/index.ts | 2 +- .../views/container/compose/edit/index.vue | 14 ++- .../src/views/container/compose/index.vue | 3 - .../src/views/container/container/index.vue | 2 +- .../views/container/container/log/index.vue | 21 ++-- .../container/container/monitor/index.vue | 75 +++++------ .../container/container/reName/index.vue | 14 ++- .../container/container/terminal/index.vue | 73 +++++------ .../src/views/container/image/build/index.vue | 2 +- frontend/src/views/container/image/index.vue | 2 +- .../src/views/container/image/load/index.vue | 21 ++-- .../src/views/container/image/tag/index.vue | 2 +- .../views/container/template/detail/index.vue | 51 ++++++++ .../src/views/container/template/index.vue | 40 +----- frontend/src/views/database/mysql/index.vue | 2 +- .../views/database/mysql/password/index.vue | 68 +++++----- .../database/mysql/root-password/index.vue | 12 +- .../views/database/mysql/setting/index.vue | 37 +++--- .../database/mysql/setting/slow-log/index.vue | 8 +- .../mysql/setting/variables/index.vue | 2 +- .../views/database/redis/setting/index.vue | 2 +- .../host/file-management/download/index.vue | 21 ++-- .../views/host/file-management/move/index.vue | 11 +- .../src/views/host/terminal/command/index.vue | 2 +- frontend/src/views/log/operation/index.vue | 13 +- frontend/src/views/log/system/index.vue | 2 +- .../views/setting/backup-account/index.vue | 4 +- frontend/src/views/setting/panel/index.vue | 12 +- .../views/setting/panel/password/index.vue | 1 + frontend/src/views/setting/safe/index.vue | 5 +- frontend/src/views/setting/snapshot/index.vue | 1 + .../website/nginx/performance/index.vue | 10 +- .../website/website/nginx/source/index.vue | 2 +- 37 files changed, 366 insertions(+), 320 deletions(-) create mode 100644 frontend/src/views/container/template/detail/index.vue diff --git a/frontend/src/components/codemirror-dialog/codemirror.vue b/frontend/src/components/codemirror-dialog/codemirror.vue index ac9614d8b..72ce11588 100644 --- a/frontend/src/components/codemirror-dialog/codemirror.vue +++ b/frontend/src/components/codemirror-dialog/codemirror.vue @@ -1,9 +1,7 @@ diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 49ef629ba..767bd0c89 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -6,7 +6,7 @@ export default { create: 'Create ', add: 'Add ', save: 'Save ', - set: 'Reset', + set: 'Setting', sync: 'Sync ', delete: 'Delete ', edit: 'Edit', @@ -33,7 +33,8 @@ export default { init: 'Init', verify: 'Verify', saveAndEnable: 'Save and enable', - import: 'import', + import: 'Import', + search: 'Search', }, search: { timeStart: 'Time start', @@ -63,7 +64,7 @@ export default { title: 'Title', tableSetting: 'Table setting', autoRefresh: 'Auto refresh', - refreshRate: 'Refresh rate', + refreshRate: 'Rate', }, loadingText: { Upgrading: 'System upgrade, please wait...', @@ -152,17 +153,17 @@ export default { serviceNotStarted: 'The {0} service is not currently started', }, status: { - running: 'running', - stopped: 'stopped', - success: 'success', - failed: 'failed', - error: 'error', - created: 'created', - restarting: 'restarting', - uploading: 'uploading', - removing: 'removing', - paused: 'paused', - exited: 'exited', + running: 'Running', + stopped: 'Stopped', + success: 'Success', + failed: 'Failed', + error: 'Error', + created: 'Created', + restarting: 'Restarting', + uploading: 'Uploading', + removing: 'Removing', + paused: 'Paused', + exited: 'Exited', enabled: 'Enabled', disabled: 'Disabled', }, @@ -174,6 +175,7 @@ export default { project: 'Project', config: 'Config', firewall: 'Firewall', + ssl: 'SSL', database: 'Database', container: 'Container', cronjob: 'Cronjob', @@ -253,19 +255,20 @@ export default { permissionForIP: 'IP', permissionAll: 'All of them (unsafe)', rootPassword: 'Root password', - backupList: 'Backup list', + backupList: 'Backup', backList: 'Return', - loadBackup: 'Import the backup', - setting: 'MySQL Settings', + loadBackup: 'Import', + setting: 'Settings', remoteAccess: 'Remote access', - changePassword: 'Password change', + remoteConnHelper: + 'Remote connection to mysql as user root may have security risks. Therefore, perform this operation with caution.', + changePassword: 'Password', changePasswordHelper: 'The database has been associated with an application. Changing the password will change the database password of the application at the same time. The change takes effect after the application restarts.', - baseSetting: 'infrastructure', - remoteConnHelper: - 'Remote connection to mysql as user root may have security risks. Therefore, perform this operation with caution.', confChange: 'Configuration change', + + portSetting: 'Port setting', portHelper: 'This port is the exposed port of the container. You need to save the modification separately and restart the container!', @@ -394,7 +397,7 @@ export default { newName: 'New name', custom: 'Custom', - emptyUser: 'When empty, you will log in with the default user of container', + emptyUser: 'When empty, you will log in as default', containerTerminal: 'Container terminal', port: 'Port', @@ -433,6 +436,7 @@ export default { import: 'Import', build: 'Build', imageBuild: 'Image build', + pathSelect: 'Path', label: 'Label', push: 'Push', fileName: 'FileName', @@ -572,6 +576,7 @@ export default { yestoday: 'Yestoday', lastNDay: 'Last {0} day', memory: 'Memory', + cache: 'Cache', disk: 'Disk', network: 'Network', up: 'Up', @@ -590,9 +595,10 @@ export default { expand: 'Expand all', fold: 'All contract', batchInput: 'Batch input', - quickCommand: 'quick command', + quickCommand: 'Quick command', groupDeleteHelper: 'After the group is removed, all connections in the group will be migrated to the default group. Confirm the information', + command: 'Command', quickCmd: 'Quick command', addHost: 'Add Host', localhost: 'Localhost', @@ -607,7 +613,7 @@ export default { key: 'Private Key', emptyTerminal: 'No terminal is currently connected', }, - operations: { + logs: { operation: 'Operation logs', login: 'Login logs', system: 'System logs', @@ -639,48 +645,48 @@ export default { status: 'status', }, file: { - dir: 'folder', + dir: 'Folder', upload: 'Upload', - download: 'download', - fileName: 'file name', + download: 'Download', + fileName: 'File name', search: 'Find', - mode: 'permission', - owner: 'owner', - file: 'file', - remoteFile: 'remote download', + mode: 'Permission', + owner: 'Owner', + file: 'File', + remoteFile: 'Remote download', share: 'Share', - sync: 'data synchronization', - size: 'size', - updateTime: 'modification time', + sync: 'Data synchronization', + size: 'Size', + updateTime: 'Modification time', open: 'Open', rename: 'Rename', - role: 'permission', - info: 'attribute', - linkFile: 'soft link file', - terminal: 'terminal', + role: 'Permission', + info: 'Attribute', + linkFile: 'Soft link file', + terminal: 'Terminal', shareList: 'Share list', - zip: 'compressed', - user: 'user', - group: 'user group', - path: 'path', - public: 'public', + zip: 'Compressed', + user: 'User', + group: 'User group', + path: 'Path', + public: 'Public', setRole: 'Set permissions', link: 'whether to link', rRole: 'Read', wRole: 'Write', - xRole: 'executable', - name: 'name', - compress: 'compression', + xRole: 'Executable', + name: 'Name', + compress: 'Compression', deCompress: 'Decompression', - compressType: 'compression format', - compressDst: 'compression path', + compressType: 'Compression format', + compressDst: 'Compression path', replace: 'Overwrite existing files', compressSuccess: 'Compressed successfully', deCompressSuccess: 'Decompression succeeded', deCompressDst: 'Decompression path', linkType: 'Link Type', - softLink: 'soft link', - hardLink: 'hard link', + softLink: 'Soft link', + hardLink: 'Hard link', linkPath: 'Link Path', selectFile: 'Select file', downloadSuccess: 'Download succeeded', @@ -689,13 +695,15 @@ export default { moveStart: 'Move successfully', move: 'Move', copy: 'Copy', - calculate: 'calculate', + calculate: 'Calculate', canNotDeCompress: 'Cannot decompress this file', uploadSuccess: 'Upload successful!', downloadProcess: 'Download progress', downloading: 'Downloading...', infoDetail: 'File Properties', type: 'Type', + list: 'File List', + sub: 'Include subdirectory', }, setting: { all: 'All', @@ -831,9 +839,9 @@ export default { appName: 'Application Name', status: 'status', container: 'container', - restart: 'restart', - up: 'start', - down: 'stop', + restart: 'Restart', + up: 'Start', + down: 'Stop', name: 'name', description: 'Description', delete: 'delete', @@ -859,7 +867,7 @@ export default { checkTitle: 'Prompt', website: 'website', database: 'database', - defaultConfig: 'default configuration', + defaultConfig: 'Default configuration', defaultConfigHelper: 'It has been restored to the default configuration, it will take effect after saving', forceDelete: 'force delete', forceDeleteHelper: diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index bab87fb12..63ade0a7c 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -463,7 +463,6 @@ export default { import: '导入', imageBuild: '构建镜像', build: '构建镜像', - edit: '编辑', pathSelect: '路径选择', label: '标签', push: '推送', @@ -592,6 +591,7 @@ export default { yestoday: '昨天', lastNDay: '近 {0} 天', memory: '内存', + cache: '缓存', disk: '磁盘', network: '网络', up: '上行', diff --git a/frontend/src/store/index.ts b/frontend/src/store/index.ts index 221f359c4..db133abdb 100644 --- a/frontend/src/store/index.ts +++ b/frontend/src/store/index.ts @@ -38,7 +38,7 @@ export const GlobalStore = defineStore({ setCsrfToken(token: string) { this.csrfToken = token; }, - updateLanguage(language: string) { + updateLanguage(language: any) { this.language = language; }, setThemeConfig(themeConfig: ThemeConfigProp) { diff --git a/frontend/src/views/container/compose/edit/index.vue b/frontend/src/views/container/compose/edit/index.vue index 524976bc2..480730278 100644 --- a/frontend/src/views/container/compose/edit/index.vue +++ b/frontend/src/views/container/compose/edit/index.vue @@ -1,9 +1,7 @@ - + diff --git a/frontend/src/views/container/template/index.vue b/frontend/src/views/container/template/index.vue index 3bf32dedc..95e44a7b9 100644 --- a/frontend/src/views/container/template/index.vue +++ b/frontend/src/views/container/template/index.vue @@ -69,33 +69,7 @@ - - - - - - + @@ -104,12 +78,10 @@ import LayoutContent from '@/layout/layout-content.vue'; import ComplexTable from '@/components/complex-table/index.vue'; import TableSetting from '@/components/table-setting/index.vue'; -import { Codemirror } from 'vue-codemirror'; -import { javascript } from '@codemirror/lang-javascript'; -import { oneDark } from '@codemirror/theme-one-dark'; import { reactive, onMounted, ref } from 'vue'; import { dateFormatSimple } from '@/utils/util'; import { Container } from '@/api/interface/container'; +import DetailDialog from '@/views/container/template/detail/index.vue'; import OperatorDialog from '@/views/container/template/operator/index.vue'; import { deleteComposeTemplate, loadDockerStatus, searchComposeTemplate } from '@/api/modules/container'; import { useDeleteData } from '@/hooks/use-delete-data'; @@ -119,9 +91,6 @@ import router from '@/routers'; const loading = ref(); const data = ref(); const selects = ref([]); -const detailVisiable = ref(false); -const detailInfo = ref(); -const extensions = [javascript(), oneDark]; const paginationConfig = reactive({ currentPage: 1, @@ -130,6 +99,8 @@ const paginationConfig = reactive({ }); const searchName = ref(); +const detailRef = ref(); + const dockerStatus = ref(); const loadStatus = async () => { const res = await loadDockerStatus(); @@ -161,8 +132,7 @@ const search = async () => { }; const onOpenDetail = async (row: Container.TemplateInfo) => { - detailInfo.value = row.content; - detailVisiable.value = true; + detailRef.value.acceptParams({ content: row.content }); }; const dialogRef = ref(); diff --git a/frontend/src/views/database/mysql/index.vue b/frontend/src/views/database/mysql/index.vue index a2021ceab..fe9370e5b 100644 --- a/frontend/src/views/database/mysql/index.vue +++ b/frontend/src/views/database/mysql/index.vue @@ -97,7 +97,7 @@ show-overflow-tooltip /> - -
- - - - - - -
-
- - - - - - - - - - -
+ + + +
+ + + + + + +
+
+ + + + + + + + + + +
+
+