diff --git a/src/frontend/devops-pipeline/src/components/AtomPropertyPanel/AtomContent.vue b/src/frontend/devops-pipeline/src/components/AtomPropertyPanel/AtomContent.vue index 2e2a3eea22a1..c2c3208b419b 100644 --- a/src/frontend/devops-pipeline/src/components/AtomPropertyPanel/AtomContent.vue +++ b/src/frontend/devops-pipeline/src/components/AtomPropertyPanel/AtomContent.vue @@ -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) { diff --git a/src/frontend/devops-pipeline/src/components/ExecPipeline.vue b/src/frontend/devops-pipeline/src/components/ExecPipeline.vue index cacd8148edb5..51b4aee37270 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/devops-pipeline/src/components/PipelineEditTabs/ShowVariable.vue b/src/frontend/devops-pipeline/src/components/PipelineEditTabs/ShowVariable.vue index 0a9cc32a4e90..17d6e674275c 100644 --- a/src/frontend/devops-pipeline/src/components/PipelineEditTabs/ShowVariable.vue +++ b/src/frontend/devops-pipeline/src/components/PipelineEditTabs/ShowVariable.vue @@ -50,6 +50,7 @@ v-else :params="params" :disabled="!editable" + :pipeline-model="pipelineModel" :container="container" :update-container-params="handleContainerChange" :is-direct-show-version="isDirectShowVersion" @@ -85,6 +86,10 @@ isDirectShowVersion: { type: Boolean, default: false + }, + pipelineModel: { + type: Boolean, + default: false } }, data () { diff --git a/src/frontend/devops-pipeline/src/components/PipelineEditTabs/components/pipeline-version.vue b/src/frontend/devops-pipeline/src/components/PipelineEditTabs/components/pipeline-version.vue index c40fba661c0d..0b09f96f35b8 100644 --- a/src/frontend/devops-pipeline/src/components/PipelineEditTabs/components/pipeline-version.vue +++ b/src/frontend/devops-pipeline/src/components/PipelineEditTabs/components/pipeline-version.vue @@ -65,7 +65,7 @@ {{ `${$t('buildNoBaseline.baselineValue')}${renderBuildNo.buildNo}(${getLabelByBuildType(renderBuildNo.buildNoType)})` }} {{ `${$t('buildNoBaseline.currentValue')}${buildNo.currentBuildNo}` }}
- - - + + + + + + {{ $t('buildNoBaseline.templateManualResetRequired') }} + +
+

+ {{ tip }} +

+
+
{{ $t('buildNoBaseline.baselineValue') }} - {{ `${buildNo.buildNo} (${currentBuildNoType})` }} + + {{ `${buildNo.buildNo} (${currentBuildNoType})` }} + +

+ + {{ errors.first('buildNo') }} +

-
+
+ {{ $t('buildNoBaseline.strategy') }} + + {{ currentBuildNoType }} + +
+
{{ $t('buildNoBaseline.currentValue') }}

{{ errors.first('currentBuildNo') }} + + + {{ buildNo.buildNo }} +

@@ -100,12 +170,14 @@ import VuexInput from '@/components/atomFormField/VuexInput' import { allVersionKeyList, getVersionConfig } from '@/utils/pipelineConst' import { mapGetters } from 'vuex' + import Logo from '@/components/Logo' export default { components: { EnumInput, VuexInput, - FormField + FormField, + Logo }, props: { isPreview: { @@ -130,6 +202,22 @@ handleVersionChange: { type: Function, default: () => () => { } + }, + handleCheckChange: { + type: Function, + default: () => () => { } + }, + isInstance: Boolean, + isInitInstance: Boolean, + resetBuildNo: Boolean + }, + data () { + return { + baselineTooltipContent: { + allowHTML: true, + width: 610, + content: '#baseline-tooltip-content' + } } }, computed: { @@ -152,6 +240,21 @@ currentBuildNoType () { const buildNoItem = this.buildNoRules.find(item => item.value === this.buildNo.buildNoType) return buildNoItem ? buildNoItem.label : undefined + }, + buildNoBaselineTips () { + return Array(7).fill(0).map((_, i) => this.$t(`buildNoBaseline.tips${i + 1}`)) + }, + formType () { + return this.isTemplateEdit ? 'vertical' : 'inline' + }, + isLockedNo () { + return this.buildNo.buildNoType !== 'CONSISTENT' + }, + isTemplateEdit () { + return !this.isPreview && !this.isInstance + }, + isPreviewAndLockedNo () { + return (this.isLockedNo && this.isPreview) || this.disabled } } } @@ -164,6 +267,8 @@ grid-gap: 10px; .pipeline-execute-version-label { + display: flex; + align-items: center; font-size: 12px; font-weight: 700; @@ -171,6 +276,11 @@ font-weight: normal; color: #979ba5; } + + .instance_reset { + font-weight: normal; + margin-left: 18px; + } } .execute-build-version { @@ -178,6 +288,7 @@ grid-template-columns: repeat(3, 1fr); grid-gap: 16px; width: 222px; + margin-right: 20px; .execute-build-version-input:not(:last-child) { position: relative; @@ -195,10 +306,18 @@ display: grid; grid-gap: 8px; width: fit-content; + .baseline-tips { + svg { + vertical-align: middle; + } + .baseline-tips-text { + font-size: 12px; + color: #979BA5; + } + } } - .preview-buildno{ - margin-left: 20px; - + .preview-buildno { + margin-left: 0; .preview-buildno-params { display: flex; @@ -210,7 +329,7 @@ .build-label, .build-value { font-size: 12px; - padding: 0 8px; + padding: 0 12px; border: 1px solid #dcdee5; cursor: not-allowed; height: 32px; @@ -222,6 +341,7 @@ } .build-value { + min-width: 153px; margin-right: 16px; border-left: none; border-radius: 0 2px 2px 0; @@ -232,12 +352,25 @@ position: relative; display: flex; - .is-danger{ + .is-danger { position: absolute; white-space: nowrap; top: 70%; left: 0; } + + .reset-build-no { + display: flex; + align-items: center; + color: #3A84FF; + svg { + margin: 0 8px 0 16px; + } + } + } + + .build-input { + margin-right: 16px; } } } diff --git a/src/frontend/devops-pipeline/src/components/atomFormField/AtomAceEditor/index.vue b/src/frontend/devops-pipeline/src/components/atomFormField/AtomAceEditor/index.vue index 797665e71e58..6bca104faed8 100755 --- a/src/frontend/devops-pipeline/src/components/atomFormField/AtomAceEditor/index.vue +++ b/src/frontend/devops-pipeline/src/components/atomFormField/AtomAceEditor/index.vue @@ -146,7 +146,6 @@ diff --git a/src/frontend/devops-ticket/src/views/credential_list.vue b/src/frontend/devops-ticket/src/views/credential_list.vue index 61520b282944..09268140a600 100755 --- a/src/frontend/devops-ticket/src/views/credential_list.vue +++ b/src/frontend/devops-ticket/src/views/credential_list.vue @@ -42,6 +42,27 @@ prop="credentialRemark" show-overflow-tooltip > + + + + \ No newline at end of file