From 64f4eaac950c01b46d912379b2d419b3b7d6cdcb Mon Sep 17 00:00:00 2001 From: v_yfqnyang Date: Thu, 16 Jan 2025 10:08:52 +0000 Subject: [PATCH] =?UTF-8?q?--story=3D121558541=20=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=A4=B9=E5=88=A0=E9=99=A4=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E6=96=87=E6=A1=88=20(merge=20request=20!2203)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Squash merge branch 'feat/template-file-tips' into 'master' --story=121558541 模板文件夹删除提示文案 # Reviewed, transaction id: 29461 TAPD: --story=121558541 --- bcs-ui/frontend/src/i18n/en-US.yaml | 2 ++ bcs-ui/frontend/src/i18n/zh-CN.yaml | 2 ++ .../views/cluster-manage/cluster/index.vue | 14 ++++++++-- .../views/cluster-manage/node-list/node.vue | 16 ++++++++++-- .../add-templatefile-version.vue | 26 +++++++++++++------ .../template-file/space-list.vue | 1 + 6 files changed, 49 insertions(+), 12 deletions(-) diff --git a/bcs-ui/frontend/src/i18n/en-US.yaml b/bcs-ui/frontend/src/i18n/en-US.yaml index 6e05435678..7ddfc5be92 100644 --- a/bcs-ui/frontend/src/i18n/en-US.yaml +++ b/bcs-ui/frontend/src/i18n/en-US.yaml @@ -3873,6 +3873,8 @@ templateFile: helmdesc: >- The current file has been upgraded to a Helm template. After saving, switching back to a non-Helm template will no longer be supported. + spaceSubTitle: The template folder and its template files will be removed + noChanges: No changes tag: draft: draft baseOn: base on diff --git a/bcs-ui/frontend/src/i18n/zh-CN.yaml b/bcs-ui/frontend/src/i18n/zh-CN.yaml index 747be6b174..08d719d5f1 100644 --- a/bcs-ui/frontend/src/i18n/zh-CN.yaml +++ b/bcs-ui/frontend/src/i18n/zh-CN.yaml @@ -3093,6 +3093,8 @@ templateFile: uploadTips: '支持.tgz, .tar.gz类型压缩包,文件小于{0}M' createSpace: 新建文件夹 helmdesc: 当前文件已升级为 Helm 模板,保存后将不再支持切换回非 Helm 模板。 + spaceSubTitle: 模板文件夹及其中的模板文件将被删除 + noChanges: 未变更 tag: draft: 草稿 baseOn: 基于 diff --git a/bcs-ui/frontend/src/views/cluster-manage/cluster/index.vue b/bcs-ui/frontend/src/views/cluster-manage/cluster/index.vue index f3caf8800c..d53338667a 100644 --- a/bcs-ui/frontend/src/views/cluster-manage/cluster/index.vue +++ b/bcs-ui/frontend/src/views/cluster-manage/cluster/index.vue @@ -115,8 +115,8 @@ :loading="logLoading" :height="'calc(100vh - 92px)'" :rolling-loading="false" - :show-step-retry-fn="item => item?.step?.allowRetry" - :show-step-skip-fn="item => item?.step?.allowSkip" + :show-step-retry-fn="handleStepRetry" + :show-step-skip-fn="handleStepSkip" @refresh="handleShowLog(logSideDialogConf.row)" @auto-refresh="handleAutoRefresh" @download="getDownloadTaskRecords" @@ -565,6 +565,14 @@ export default defineComponent({ }, }); }; + // 重试按钮显示逻辑 + function handleStepRetry(item) { + return item?.step?.status === 'FAILED' && item?.step?.allowRetry; + } + // 跳过按钮显示逻辑 + function handleStepSkip(item) { + return item?.step?.status === 'FAILED' && item?.step?.allowSkip; + } // 集群节点数 const clusterNodesMap = ref>({}); @@ -715,6 +723,8 @@ export default defineComponent({ logSideDialogConf, handleAutoRefresh, getDownloadTaskRecords, + handleStepRetry, + handleStepSkip, }; }, }); diff --git a/bcs-ui/frontend/src/views/cluster-manage/node-list/node.vue b/bcs-ui/frontend/src/views/cluster-manage/node-list/node.vue index 1759d1c761..93239a2160 100644 --- a/bcs-ui/frontend/src/views/cluster-manage/node-list/node.vue +++ b/bcs-ui/frontend/src/views/cluster-manage/node-list/node.vue @@ -686,8 +686,8 @@ :loading="logSideDialogConf.loading" :height="'calc(100vh - 92px)'" :rolling-loading="false" - :show-step-retry-fn="item => item?.step?.allowRetry" - :show-step-skip-fn="item => item?.step?.allowSkip" + :show-step-retry-fn="handleStepRetry" + :show-step-skip-fn="handleStepSkip" @refresh="handleShowLog(logSideDialogConf.row)" @auto-refresh="handleAutoRefresh" @download="getDownloadTaskRecords" @@ -1740,6 +1740,16 @@ export default defineComponent({ }, }); }; + // 重试按钮显示逻辑 + function handleStepRetry(item) { + return item?.step?.status === 'FAILED' && item?.step?.allowRetry; + } + // 跳过按钮显示逻辑 + function handleStepSkip(item) { + return item?.step?.status === 'FAILED' && item?.step?.allowSkip; + } + + // 批量允许调度 const showBatchMenu = ref(false); const handleBatchEnableNodes = () => { @@ -2157,6 +2167,8 @@ export default defineComponent({ handleAutoRefresh, getDownloadTaskRecords, handleSkip, + handleStepRetry, + handleStepSkip, }; }, }); diff --git a/bcs-ui/frontend/src/views/deploy-manage/template-file/add-templatefile-version.vue b/bcs-ui/frontend/src/views/deploy-manage/template-file/add-templatefile-version.vue index a3b291fe9d..b8de7d941f 100644 --- a/bcs-ui/frontend/src/views/deploy-manage/template-file/add-templatefile-version.vue +++ b/bcs-ui/frontend/src/views/deploy-manage/template-file/add-templatefile-version.vue @@ -105,13 +105,20 @@ :original-version="versionDetail.version" :is-draft="fileMetadata?.isDraft" />
- - {{ $t('generic.button.confirmSave') }} - +
+ + {{ $t('generic.button.confirmSave') }} + +
{{ $t('generic.button.cancel') }}
@@ -129,7 +136,7 @@