From cd89caa0c4dd6e039bab8c29fcc5bb08132fa11b Mon Sep 17 00:00:00 2001 From: ssongliu Date: Thu, 23 Feb 2023 09:31:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=AE=B9=E5=99=A8?= =?UTF-8?q?=E9=83=A8=E5=88=86=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/service/app_utils.go | 2 +- .../codemirror-dialog/codemirror.vue | 5 +++ frontend/src/lang/modules/en.ts | 2 +- frontend/src/lang/modules/zh.ts | 2 +- .../views/container/compose/create/index.vue | 6 ++-- .../src/views/container/compose/index.vue | 2 -- .../src/views/container/image/build/index.vue | 2 +- .../views/container/image/delete/index.vue | 34 +++++++------------ frontend/src/views/container/image/index.vue | 24 ++++++++----- .../src/views/container/image/push/index.vue | 2 +- .../src/views/container/image/save/index.vue | 2 +- frontend/src/views/container/repo/index.vue | 14 ++++---- .../views/database/redis/password/index.vue | 2 +- .../views/setting/backup-account/index.vue | 10 +++--- frontend/src/views/setting/panel/index.vue | 7 ++-- 15 files changed, 60 insertions(+), 56 deletions(-) diff --git a/backend/app/service/app_utils.go b/backend/app/service/app_utils.go index 4a58d45be..7604f7a06 100644 --- a/backend/app/service/app_utils.go +++ b/backend/app/service/app_utils.go @@ -500,7 +500,7 @@ func handleErr(install model.AppInstall, err error, out string) error { } func getAppFromRepo(downloadPath, version string) error { - downloadUrl := fmt.Sprintf(downloadPath) + downloadUrl := downloadPath appDir := constant.AppResourceDir global.LOG.Infof("download file from %s", downloadUrl) diff --git a/frontend/src/components/codemirror-dialog/codemirror.vue b/frontend/src/components/codemirror-dialog/codemirror.vue index 72ce11588..b08d5a95e 100644 --- a/frontend/src/components/codemirror-dialog/codemirror.vue +++ b/frontend/src/components/codemirror-dialog/codemirror.vue @@ -18,6 +18,11 @@ v-model="detailInfo" :readOnly="true" /> + diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 160137047..3355fdf03 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -813,7 +813,7 @@ export default { monitor: 'Monitor', enableMonitor: 'Enable', - storeDays: 'Expiration time (day)', + storeDays: 'Expiration days', cleanMonitor: 'Clearing monitoring records', message: 'Message', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index ee1f24dab..a147abe16 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -818,7 +818,7 @@ export default { monitor: '监控', enableMonitor: '监控状态', - storeDays: 'Retention days (days)', + storeDays: '保存天数', cleanMonitor: '清空监控记录', message: '通知', diff --git a/frontend/src/views/container/compose/create/index.vue b/frontend/src/views/container/compose/create/index.vue index 9836ec84a..51584c6f9 100644 --- a/frontend/src/views/container/compose/create/index.vue +++ b/frontend/src/views/container/compose/create/index.vue @@ -59,8 +59,10 @@ - - - + { const buttons = [ { - label: 'Tag', + label: i18n.global.t('container.tag'), click: (row: Container.ImageInfo) => { let params = { repos: repos.value, @@ -188,7 +190,11 @@ const buttons = [ }, { label: i18n.global.t('commons.button.delete'), - click: (row: Container.ImageInfo) => { + click: async (row: Container.ImageInfo) => { + if (row.tags.length <= 1) { + await useDeleteData(imageRemove, { names: [row.id] }, 'commons.msg.delete'); + return; + } let params = { id: row.id, tags: row.tags, diff --git a/frontend/src/views/container/image/push/index.vue b/frontend/src/views/container/image/push/index.vue index fe24ddaaf..c9d6db83f 100644 --- a/frontend/src/views/container/image/push/index.vue +++ b/frontend/src/views/container/image/push/index.vue @@ -12,7 +12,7 @@ - + diff --git a/frontend/src/views/container/image/save/index.vue b/frontend/src/views/container/image/save/index.vue index 2e67a2fa8..00bd22cdd 100644 --- a/frontend/src/views/container/image/save/index.vue +++ b/frontend/src/views/container/image/save/index.vue @@ -6,7 +6,7 @@ - + - - - + @@ -80,7 +82,7 @@ import TableSetting from '@/components/table-setting/index.vue'; import OperatorDialog from '@/views/container/repo/operator/index.vue'; import DeleteDialog from '@/views/container/repo/delete/index.vue'; import { reactive, onMounted, ref } from 'vue'; -import { dateFormatSimple } from '@/utils/util'; +import { dateFormat } from '@/utils/util'; import { Container } from '@/api/interface/container'; import { deleteImageRepo, loadDockerStatus, searchImageRepo } from '@/api/modules/container'; import i18n from '@/lang'; diff --git a/frontend/src/views/database/redis/password/index.vue b/frontend/src/views/database/redis/password/index.vue index 5e8a02992..62bc9c756 100644 --- a/frontend/src/views/database/redis/password/index.vue +++ b/frontend/src/views/database/redis/password/index.vue @@ -3,7 +3,7 @@ - + diff --git a/frontend/src/views/setting/backup-account/index.vue b/frontend/src/views/setting/backup-account/index.vue index 9590b6024..f6b8bf828 100644 --- a/frontend/src/views/setting/backup-account/index.vue +++ b/frontend/src/views/setting/backup-account/index.vue @@ -60,7 +60,7 @@ {{ s3Data.bucket }} - {{ dateFormatSimple(s3Data.createdAt) }} + {{ dateFormat(0, 0, s3Data.createdAt) }} @@ -96,7 +96,7 @@ {{ ossData.bucket }} - {{ dateFormatSimple(ossData.createdAt) }} + {{ dateFormat(0, 0, ossData.createdAt) }} @@ -133,7 +133,7 @@ {{ minioData.bucket }} - {{ dateFormatSimple(minioData.createdAt) }} + {{ dateFormat(0, 0, minioData.createdAt) }} @@ -172,7 +172,7 @@ {{ sftpData.bucket }} - {{ dateFormatSimple(sftpData.createdAt) }} + {{ dateFormat(0, 0, sftpData.createdAt) }} @@ -188,7 +188,7 @@