Skip to content

Commit

Permalink
Merge pull request #10398 from lockiechen/hotfix_pac_github_8125
Browse files Browse the repository at this point in the history
feat:变量名为PipelineId时变量不生效 issue #8125
  • Loading branch information
bkci-bot authored May 24, 2024
2 parents c3b5720 + 97999e2 commit 3e5bf97
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
import {
RESOURCE_ACTION
} from '@/utils/permission'
import { pipelineTabIdMap } from '@/utils/pipelineConst'
import { mapActions, mapGetters, mapState } from 'vuex'
export default {
Expand Down Expand Up @@ -174,6 +175,9 @@
params: {
...this.$route.params,
version
},
query: {
tab: pipelineTabIdMap[this.$route.params.type] ?? 'pipeline'
}
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
:pipeline-id="pipelineId"
/>
</div>
<aside class="pipeline-history-right-aside">
<aside v-show="!(isSwitchPipeline || switchingVersion)" class="pipeline-history-right-aside">
<VersionDiffEntry
v-if="!isReleaseVersion"
:text="false"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,15 @@
<script>
import exportDialog from '@/components/ExportDialog'
import CopyPipelineDialog from '@/components/PipelineActionDialog/CopyPipelineDialog'
import { UPDATE_PIPELINE_INFO } from '@/store/modules/atom/constants'
import { mapActions, mapState, mapGetters } from 'vuex'
import DisableDialog from '@/components/PipelineActionDialog/DisableDialog'
import { UPDATE_PIPELINE_INFO } from '@/store/modules/atom/constants'
import { mapActions, mapGetters, mapState } from 'vuex'
import SaveAsTemplateDialog from '@/components/PipelineActionDialog/SaveAsTemplateDialog'
import ImportPipelinePopup from '@/components/pipelineList/ImportPipelinePopup'
import pipelineActionMixin from '@/mixins/pipeline-action-mixin'
import { TEMPLATE_RESOURCE_ACTION, RESOURCE_ACTION } from '@/utils/permission'
import { RESOURCE_ACTION, TEMPLATE_RESOURCE_ACTION } from '@/utils/permission'
import { pipelineTabIdMap } from '@/utils/pipelineConst'
import RemoveConfirmDialog from '@/views/PipelineList/RemoveConfirmDialog'
export default {
components: {
Expand Down Expand Up @@ -116,6 +117,17 @@
{
label: this.pipelineInfo?.hasCollect ? 'uncollect' : 'collect',
handler: this.toggleCollect
},
{
label: 'rename',
handler: () => {
this.$router.push({
name: 'pipelinesEdit',
query: {
tab: pipelineTabIdMap.setting
}
})
}
}
],
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
<bk-form form-type="vertical" :label-width="300" class="new-ui-form">
<bk-form-item :label="$t('pipelineName')" :required="true">
<vuex-input
v-bk-focus
:disabled="!editable"
:placeholder="$t('pipelineNameInputTips')"
name="pipelineName"
:value="pipelineSetting.pipelineName"
v-validate.initial="'required|max:128'"
:max-length="128"
:handle-change="handleBaseInfoChange" />
:handle-change="handleBaseInfoChange"
/>
</bk-form-item>

<bk-form-item :required="false">
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/devops-pipeline/src/router/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ const routes = [
component: PipelineListAuth
},
{
path: ':viewId/:type?',
path: ':viewId?/:type?',
name: 'PipelineManageList',
component: PipelineManageList,
meta: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const getters = {
}

const mutations = {
[SET_EXECUTE_PARAMS]: (state, { pipelineId, ...params }) => {
[SET_EXECUTE_PARAMS]: (state, { pipelineId, params }) => {
const oldVal = state.executeParams.get(pipelineId)
state.executeParams.set(pipelineId, {
...oldVal,
Expand Down
24 changes: 16 additions & 8 deletions src/frontend/devops-pipeline/src/views/subpages/preview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,13 @@
this.getParamsValue(values)
this.setExecuteParams({
pipelineId: this.pipelineId,
...this.paramsValues,
...this.versionParamValues,
...this.buildValues,
...this.constantValues,
...this.otherValues
params: {
...this.paramsValues,
...this.versionParamValues,
...this.buildValues,
...this.constantValues,
...this.otherValues
}
})
} else {
this.$bkMessage({
Expand All @@ -265,7 +267,9 @@
this.paramsValues = getParamsValuesMap(this.paramList, valueKey)
this.setExecuteParams({
pipelineId: this.pipelineId,
...this.paramsValues
params: {
...this.paramsValues
}
})
},
async handleValidate () {
Expand Down Expand Up @@ -298,7 +302,9 @@
this[`${type}Values`][name] = value
this.setExecuteParams({
pipelineId: this.pipelineId,
...this[`${type}Values`]
params: {
...this[`${type}Values`]
}
})
},
handleBuildChange (...args) {
Expand All @@ -315,7 +321,9 @@
this.setExecuteParams({
pipelineId: this.pipelineId,
buildNo: this.buildNo
params: {
buildNo: this.buildNo
}
})
},
async init () {
Expand Down

0 comments on commit 3e5bf97

Please sign in to comment.