diff --git a/src/frontend/devops-environment/src/components/devops/environment/basic-information.vue b/src/frontend/devops-environment/src/components/devops/environment/basic-information.vue index 08bf401e743..3396e94caf6 100755 --- a/src/frontend/devops-environment/src/components/devops/environment/basic-information.vue +++ b/src/frontend/devops-environment/src/components/devops/environment/basic-information.vue @@ -64,6 +64,42 @@ +
+
{{ $t('environment.nodeInfo.dockerMaxConcurrency') }}
+
+
+ +
+
{{ nodeDetails.dockerParallelTaskCount || '--' }}
+
+
+
+ {{ $t('environment.save') }} + {{ $t('environment.cancel') }} +
+
+ {{ $t('environment.edit') }} +
+
+
{{ $t('environment.status') }}
{ + this.$refs.dockerParallelTaskCount.focus() + }) + } + break default: break } }, - async saveHandle () { + async saveHandle (type) { const valid = await this.$validator.validate() - if (valid) { - this.saveParallelTaskCount(this.parallelTaskCount) + if (!valid) return + switch (type) { + case 'parallelTaskCount': + this.saveParallelTaskCount(this.parallelTaskCount, 'parallelTaskCount') + break + case 'dockerParallelTaskCount': + this.saveParallelTaskCount(this.dockerParallelTaskCount, 'dockerParallelTaskCount') + break + default: + break } }, - async saveParallelTaskCount (parallelTaskCount) { + async saveParallelTaskCount (count, type) { let message, theme + const fn = type === 'dockerParallelTaskCount' + ? 'environment/saveDockerParallelTaskCount' + : 'environment/saveParallelTaskCount' + const params = { + projectId: this.projectId, + nodeHashId: this.nodeHashId, + count: count + } + try { - await this.$store.dispatch('environment/saveParallelTaskCount', { - projectId: this.projectId, - nodeHashId: this.nodeHashId, - parallelTaskCount - }) + await this.$store.dispatch(fn, params) message = this.$t('environment.successfullySaved') theme = 'success' this.requestNodeDetail() @@ -206,6 +266,8 @@ message = err.message ? err.message : err theme = 'error' } finally { + this.isEditCount = false + this.isEditDockerCount = false this.$bkMessage({ message, theme @@ -219,7 +281,6 @@ nodeHashId: this.nodeHashId }) this.$store.commit('environment/updateNodeDetail', { res }) - this.isEditCount = false } catch (e) { this.handleError( e, @@ -260,7 +321,7 @@ align-items: center; border-bottom: 1px solid #DDE4EB; .item-label { - width: 180px; + width: 188px; padding: 12px 20px; border-right: 1px solid #DDE4EB; } diff --git a/src/frontend/devops-environment/src/store/actions.js b/src/frontend/devops-environment/src/store/actions.js index 87759424dd8..67b378c18ee 100755 --- a/src/frontend/devops-environment/src/store/actions.js +++ b/src/frontend/devops-environment/src/store/actions.js @@ -225,8 +225,8 @@ const actions = { /** * 设置agent构建并发数 */ - saveParallelTaskCount ({ commit }, { projectId, nodeHashId, parallelTaskCount }) { - return vue.$ajax.post(`${prefix}/user/environment/thirdPartyAgent/projects/${projectId}/nodes/${nodeHashId}/parallelTaskCount?parallelTaskCount=${parallelTaskCount}`).then(response => { + saveParallelTaskCount ({ commit }, { projectId, nodeHashId, count }) { + return vue.$ajax.post(`${prefix}/user/environment/thirdPartyAgent/projects/${projectId}/nodes/${nodeHashId}/parallelTaskCount?parallelTaskCount=${count}`).then(response => { return response }) }, @@ -286,7 +286,16 @@ const actions = { }, enableNode (_, { projectId, envHashId, nodeHashId, enableNode }) { return vue.$ajax.put(`${prefix}/user/environment/${projectId}/${envHashId}/enableNode/${nodeHashId}?enableNode=${enableNode}`) + }, + /** + * 设置docker构建并发数 + */ + saveDockerParallelTaskCount ({ commit }, { projectId, nodeHashId, count }) { + return vue.$ajax.post(`${prefix}/user/environment/thirdPartyAgent/projects/${projectId}/nodes/${nodeHashId}/dockerParallelTaskCount?count=${count}`).then(response => { + return response + }) } + } export default actions diff --git a/src/frontend/devops-pipeline/src/components/AtomFormComponent/InputParameterArray/index.vue b/src/frontend/devops-pipeline/src/components/AtomFormComponent/InputParameterArray/index.vue new file mode 100644 index 00000000000..878314b75ff --- /dev/null +++ b/src/frontend/devops-pipeline/src/components/AtomFormComponent/InputParameterArray/index.vue @@ -0,0 +1,94 @@ + + + + + diff --git a/src/frontend/devops-pipeline/src/components/AtomSelector/imageSelector.vue b/src/frontend/devops-pipeline/src/components/AtomSelector/imageSelector.vue index 34fa57492ac..1622eb27828 100644 --- a/src/frontend/devops-pipeline/src/components/AtomSelector/imageSelector.vue +++ b/src/frontend/devops-pipeline/src/components/AtomSelector/imageSelector.vue @@ -208,7 +208,7 @@ watch: { buildResourceType (val) { - if (['DOCKER', 'IDC', 'PUBLIC_DEVCLOUD'].includes(val)) { + if (['DOCKER', 'IDC', 'PUBLIC_DEVCLOUD', 'THIRD_PARTY_AGENT_ID', 'THIRD_PARTY_AGENT_ENV'].includes(val)) { this.isLoading = true this.searchKey = '' this.clearData() @@ -269,12 +269,15 @@ this.isLoading = true Promise.all([this.getApiData(tab, false), this.getApiData(tab, true)]).finally(() => (this.isLoading = false)) }, - + getBuildResourceType () { + if (['THIRD_PARTY_AGENT_ID', 'THIRD_PARTY_AGENT_ENV'].includes(this.buildResourceType)) return 'PUBLIC_DEVCLOUD' + return this.buildResourceType + }, getApiData (tab, recommendFlag) { this.isLoadingMore = true const postData = Object.assign({ projectCode: this.$route.params.projectId, - agentType: this.buildResourceType, + agentType: this.getBuildResourceType(), recommendFlag }, tab) diff --git a/src/frontend/devops-pipeline/src/components/ContainerPropertyPanel/ContainerContent.vue b/src/frontend/devops-pipeline/src/components/ContainerPropertyPanel/ContainerContent.vue index d3219570415..4d2cc513dbf 100644 --- a/src/frontend/devops-pipeline/src/components/ContainerPropertyPanel/ContainerContent.vue +++ b/src/frontend/devops-pipeline/src/components/ContainerPropertyPanel/ContainerContent.vue @@ -176,6 +176,20 @@ name="buildResource" /> + + + +