From ccdaaa6f6f8426fedc8ff6b77732ecdd11c625d9 Mon Sep 17 00:00:00 2001 From: v_yjjiaoyu <1981190393@qq.com> Date: Mon, 11 Nov 2024 11:07:26 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E6=8E=A8=E8=8D=90=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=8F=B7=E6=A8=A1=E7=89=88=E4=BC=98=E5=8C=96=20#11186?= =?UTF-8?q?=20#=20Reviewed,=20transaction=20id:=2023403?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/ExecPipeline.vue | 48 +++++++++++-------- src/frontend/locale/pipeline/en-US.json | 6 ++- src/frontend/locale/pipeline/zh-CN.json | 6 ++- 3 files changed, 36 insertions(+), 24 deletions(-) diff --git a/src/frontend/devops-pipeline/src/components/ExecPipeline.vue b/src/frontend/devops-pipeline/src/components/ExecPipeline.vue index cacd8148edb..51b4aee3727 100644 --- a/src/frontend/devops-pipeline/src/components/ExecPipeline.vue +++ b/src/frontend/devops-pipeline/src/components/ExecPipeline.vue @@ -718,27 +718,35 @@ done ) { if (!isContinue) { - const postData = { - projectId: this.routerParams.projectId, - pipelineId: this.routerParams.pipelineId, - buildId: this.routerParams.buildNo, - stageId, - containerId, - taskId, - isContinue, - element: atom - } + this.$bkInfo({ + title: this.$t('isTaskTermination'), + confirmFn: async () => { + const postData = { + projectId: this.routerParams.projectId, + pipelineId: this.routerParams.pipelineId, + buildId: this.routerParams.buildNo, + stageId, + containerId, + taskId, + isContinue, + element: atom + } - try { - await this.pausePlugin(postData) - await this.requestPipelineExecDetail(this.routerParams) - } catch (err) { - this.$showTips({ - message: err.message || err, - theme: 'error' - }) - done() - } + try { + await this.pausePlugin(postData) + await this.requestPipelineExecDetail(this.routerParams) + } catch (err) { + this.$showTips({ + message: err.message || err, + theme: 'error' + }) + done() + } + }, + cancelFn: () => { + done() + } + }) } else { this.toggleAsidePropertyPanel({ isShow: true, diff --git a/src/frontend/locale/pipeline/en-US.json b/src/frontend/locale/pipeline/en-US.json index 440d6d60074..9a374212ccb 100644 --- a/src/frontend/locale/pipeline/en-US.json +++ b/src/frontend/locale/pipeline/en-US.json @@ -1650,7 +1650,8 @@ "tips5": "- In pipeline orchestration, use the context ${{ ci.build-no }}", "tips6": "- In the script files referenced by the pipeline, use the built-in environment variable ${{BK_CI_BUILD_NO}}", "tips7": "3. Example: If the baseline value is 0 and the strategy is to increment by 1 each time, the build number for the next triggered run will be 1.", - "manualResetRequired": "After modifying the baseline, you can apply it while upgrading the instance, or manually reset the instance build number after the upgrade", + "manualResetRequired": "Changes to the baseline value will not take effect automatically. Please make sure to manually reset it after release.", + "templateManualResetRequired": "After modifying the baseline, you can apply it while upgrading the instance, or manually reset the instance build number after the upgrade", "resetRequiredTips": "A change in the build number baseline value has been detected. Please manually reset the build number.", "goReset": "Go Reset", "baselineValue": "buildNo:", @@ -1665,5 +1666,6 @@ "deleteDraft": "Delete Draft", "sureDeleteDraft": "Are you sure you want to delete this draft?", "deleteDraftPipeline": "The current pipeline has not been published yet. Deleting the draft is equivalent to deleting the pipeline. Are you sure you want to proceed?", - "noDraft": "No drafts available for deletion" + "noDraft": "No drafts available for deletion", + "isTaskTermination": "Are you sure you want to terminate the task execution?" } \ No newline at end of file diff --git a/src/frontend/locale/pipeline/zh-CN.json b/src/frontend/locale/pipeline/zh-CN.json index c0937d87fc2..13ff873a839 100644 --- a/src/frontend/locale/pipeline/zh-CN.json +++ b/src/frontend/locale/pipeline/zh-CN.json @@ -1648,7 +1648,8 @@ "tips5": "- 流水线编排中,使用上下文 ${{ ci.build-no}} 引用", "tips6": "- 流水线引用的脚本文件中,使用内置环境变量 ${{BK_CI_BUILD_NO}} 引用", "tips7": "3. 示例,基线值为 0,策略为每次加 1,则下一次触发运行时构建号为 1", - "manualResetRequired": "修改基线后,可在升级实例同时应用,或升级实例后手动重置实例构建号", + "manualResetRequired": "基线值修改后不会自动生效,请务必在发布后手动重置", + "templateManualResetRequired": "修改基线后,可在升级实例同时应用,或升级实例后手动重置实例构建号", "resetRequiredTips": "检测到构建号基线值发生了变化,请手动重置构建号", "goReset": "去重置", "baselineValue": "基线值:", @@ -1663,5 +1664,6 @@ "deleteDraft": "删除草稿", "sureDeleteDraft": "确认删除该草稿?", "deleteDraftPipeline": "当前流水线尚未发布,删除草稿等同于删除流水线,确认删除吗?", - "noDraft": "暂无可删除的草稿" + "noDraft": "暂无可删除的草稿", + "isTaskTermination": "确认中止任务执行吗?" } \ No newline at end of file