Skip to content

Commit

Permalink
Merge pull request #11297 from useryuyu/issue_111296
Browse files Browse the repository at this point in the history
fix: 执行前暂停的插件弹窗问题处理 #11296
  • Loading branch information
bkci-bot authored Dec 6, 2024
2 parents bf100ab + 4ae63c1 commit 375fa6a
Showing 1 changed file with 44 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -579,45 +579,52 @@
'updateRefreshQualityLoading'
]),
handleExecutePluginPause (isContinue, loadingKey) {
const postData = {
projectId: this.projectId,
pipelineId: this.pipelineId,
buildId: this.$route.params.buildNo,
taskId: this.element.id,
isContinue,
stageId: this.stage.id,
containerId: this.container.id,
element: this.element
}
const editingElementPos = {
...this.editingElementPos
}
this[loadingKey] = true
this.togglePropertyPanel({
isShow: false,
showPanelType: ''
})
this.pausePlugin(postData).then(() => {
return this.requestPipelineExecDetail(this.$route.params)
}).catch((err) => {
this.$showTips({
message: err.message || err,
theme: 'error'
})
this.togglePropertyPanel({
isShow: true,
editingElementPos,
showPanelType: 'PAUSE'
})
}).finally(() => {
this[loadingKey] = false
})
},
changePluginPause (isContinue, loadingKey) {
this.$bkInfo({
title: this.$t('isTaskTermination'),
confirmFn: async () => {
const postData = {
projectId: this.projectId,
pipelineId: this.pipelineId,
buildId: this.$route.params.buildNo,
taskId: this.element.id,
isContinue,
stageId: this.stage.id,
containerId: this.container.id,
element: this.element
}
const editingElementPos = {
...this.editingElementPos
if (isContinue && loadingKey === 'isExeContinue') {
this.handleExecutePluginPause(isContinue, loadingKey)
} else {
this.$bkInfo({
title: this.$t('isTaskTermination'),
confirmFn: async () => {
this.handleExecutePluginPause(isContinue, loadingKey)
}
this[loadingKey] = true
this.togglePropertyPanel({
isShow: false,
showPanelType: ''
})
this.pausePlugin(postData).then(() => {
return this.requestPipelineExecDetail(this.$route.params)
}).catch((err) => {
this.$showTips({
message: err.message || err,
theme: 'error'
})
this.togglePropertyPanel({
isShow: true,
editingElementPos,
showPanelType: 'PAUSE'
})
}).finally(() => {
this[loadingKey] = false
})
}
})
})
}
},
setAtomValidate (addErrors, removeErrors) {
if (addErrors && addErrors.length) {
Expand Down

0 comments on commit 375fa6a

Please sign in to comment.