Skip to content

Commit

Permalink
Merge pull request #11236 from useryuyu/issue_11186
Browse files Browse the repository at this point in the history
feat:推荐版本号模版优化 #11186
  • Loading branch information
bkci-bot authored Dec 6, 2024
2 parents 24d6821 + 72fb83c commit 2ce2145
Show file tree
Hide file tree
Showing 14 changed files with 416 additions and 148 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -580,38 +580,43 @@
]),
changePluginPause (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
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
}
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) {
Expand Down
48 changes: 28 additions & 20 deletions src/frontend/devops-pipeline/src/components/ExecPipeline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
v-else
:params="params"
:disabled="!editable"
:pipeline-model="pipelineModel"
:container="container"
:update-container-params="handleContainerChange"
:is-direct-show-version="isDirectShowVersion"
Expand Down Expand Up @@ -85,6 +86,10 @@
isDirectShowVersion: {
type: Boolean,
default: false
},
pipelineModel: {
type: Boolean,
default: false
}
},
data () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
{{ `${$t('buildNoBaseline.baselineValue')}${renderBuildNo.buildNo}(${getLabelByBuildType(renderBuildNo.buildNoType)})` }}
<span
class="dafault-value-current"
v-if="disabled"
v-if="pipelineModel"
>
{{ `${$t('buildNoBaseline.currentValue')}${buildNo.currentBuildNo}` }}
<span
Expand Down Expand Up @@ -307,6 +307,10 @@
isDirectShowVersion: {
type: Boolean,
default: false
},
pipelineModel: {
type: Boolean,
default: false
}
},
data () {
Expand Down
Loading

0 comments on commit 2ce2145

Please sign in to comment.