Skip to content

Commit

Permalink
feat: pac ui编辑流水线 issue TencentBlueKing#8125
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 20644
  • Loading branch information
terlinhe committed Oct 15, 2024
1 parent 7d3a050 commit f3e2772
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 80 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,21 +157,6 @@
:handle-change="handleChange"
>
</request-selector>
<request-selector
v-if="isBuildResourceParam(param.type)"
:popover-min-width="250"
:url="getBuildResourceUrl(param.containerType)"
param-id="name"
:disabled="disabled"
name="defaultValue"
v-validate="{ required: valueRequired }"
:data-vv-scope="'pipelineParam'"
:value="param.defaultValue"
:handle-change="handleChange"
:replace-key="param.replaceKey"
:search-url="param.searchUrl"
>
</request-selector>
<request-selector
v-if="isSubPipelineParam(param.type)"
:popover-min-width="250"
Expand Down Expand Up @@ -204,43 +189,6 @@
></vuex-input>
</form-field>

<template v-if="isBuildResourceParam(param.type)">
<form-field
:hide-colon="true"
:label="$t('editPage.buildEnv')"
:is-error="errors.has(`pipelineParam.os`)"
:error-msg="errors.first(`pipelineParam.os`)"
>
<selector
:popover-min-width="510"
:disabled="disabled"
:list="baseOSList"
:handle-change="(name, value) => handleBuildResourceChange(name, value, param)"
name="os"
placeholder=""
:value="param.containerType.os"
></selector>
</form-field>

<form-field
:hide-colon="true"
:label="$t('editPage.addMetaData')"
:is-error="errors.has(`pipelineParam.buildType`)"
:error-msg="errors.first(`pipelineParam.buildType`)"
>
<selector
:popover-min-width="510"
:disabled="disabled"
:list="getBuildTypeList(param.containerType.os)"
setting-key="type"
:handle-change="(name, value) => handleBuildResourceChange(name, value, param)"
name="buildType"
placeholder=""
:value="param.containerType.buildType"
></selector>
</form-field>
</template>

<template v-if="isArtifactoryParam(param.type)">
<form-field
:hide-colon="true"
Expand Down Expand Up @@ -299,7 +247,6 @@
getRepoOption,
isArtifactoryParam,
isBooleanParam,
isBuildResourceParam,
isCodelibParam,
isEnumParam,
isFileParam,
Expand Down Expand Up @@ -410,7 +357,6 @@
isSvnParam,
isGitParam,
isCodelibParam,
isBuildResourceParam,
isArtifactoryParam,
isSubPipelineParam,
isFileParam,
Expand All @@ -435,15 +381,6 @@
getBuildTypeList (os) {
return this.getBuildResourceTypeList(os)
},
handleBuildResourceChange (name, value, param) {
const resetBuildType = name === 'os' ? { buildType: this.getBuildTypeList(value)[0].type } : {}
this.handleChange('containerType', Object.assign({
...param.containerType,
[name]: value
}, resetBuildType))
this.handleChange('defaultValue', '')
},
setSelectorDefaultVal ({ type, defaultValue = '' }) {
if (typeof this.param.defaultValue === 'string' && (isMultipleParam(this.param.type) || isEnumParam(this.param.type))) { // 选项清除时,修改对应的默认值
const dv = this.param.defaultValue.split(',').filter(v => this.param.options.map(k => k.key).includes(v))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,23 +138,6 @@ export const DEFAULT_PARAM = {
required: true,
readOnly: false
},
[CONTAINER_TYPE]: {
id: 'buildResource',
name: 'buildResource',
defaultValue: '',
defalutValueLabel: 'defaultValue',
defaultValueLabelTips: 'defaultValueDesc',
containerType: {
os: 'LINUX',
buildType: 'DOCKER'
},
desc: '',
options: [],
type: CONTAINER_TYPE,
typeDesc: 'buildResource',
required: true,
readOnly: false
},
[SUB_PIPELINE]: {
id: 'subPipeline',
name: 'subPipeline',
Expand Down

0 comments on commit f3e2772

Please sign in to comment.