diff --git a/src/resources/assets/languages/page/en.json b/src/resources/assets/languages/page/en.json index 6386134e48ff8781489b7be55ef284cd66701866..e86bb39eaf6685d2f844a083f56bdc208f26be91 100644 --- a/src/resources/assets/languages/page/en.json +++ b/src/resources/assets/languages/page/en.json @@ -1072,5 +1072,9 @@ "loaded": "Loaded", "dictionary": "dictionary", "healthcheckresult": "Inspection results", + "autoexecparallpolicy": "Concurrency Strategy", + "autoexecbatchround": "in batches", + "autoexecparall": "Concurrency", + "autoexecparallel": "Concurrent settings", "paramkeyword": "Participate in search" } \ No newline at end of file diff --git a/src/resources/assets/languages/page/zh.json b/src/resources/assets/languages/page/zh.json index 0b96c81e66eec05bc6f63152c5c4659a4b90684a..fe13d332d3b55176dbe5a742736691b035b07285 100644 --- a/src/resources/assets/languages/page/zh.json +++ b/src/resources/assets/languages/page/zh.json @@ -1074,5 +1074,9 @@ "loaded": "已加载", "dictionary": "字典", "healthcheckresult": "检查结果", + "autoexecparallpolicy": "并发策略", + "autoexecbatchround": "分批", + "autoexecparall": "并发", + "autoexecparallel": "并发设置", "paramkeyword": "入参搜索" } \ No newline at end of file diff --git a/src/resources/assets/languages/term/en.json b/src/resources/assets/languages/term/en.json index b0e027ca473829e1d08d7d1bf13d55d7f9201d30..cb1cf8604cfc46b6de0cf6ae92c0e2cb95380cfc 100644 --- a/src/resources/assets/languages/term/en.json +++ b/src/resources/assets/languages/term/en.json @@ -908,7 +908,9 @@ "resetrunnerphase": "Reset phase or not", "runnerGroupTooltip": "If the actuator group is not filled in here, the current stage will inherit the combination tool actuator group by default. If the actuator group is filled in here, the current stage will use the one filled in here; During execution, the executor group of the stage cannot be modified", "isfirenext": "Do you want to activate the next group", - "inputnodelimit": "The quantity cannot exceed 1000" + "inputnodelimit": "The quantity cannot exceed 1000", + "parall": "Concurrent quantity", + "paralldesc": "Execute the execution targets in order of concurrency." }, "framework": { "roleauth": "Authorize immediately after creating the role", diff --git a/src/resources/assets/languages/term/zh.json b/src/resources/assets/languages/term/zh.json index 6e04d480c5222d73c86c1c8c0342bf0f78e7a1e5..63b7cdb88dfe5196026bddce4e7b2c6404f1d70a 100644 --- a/src/resources/assets/languages/term/zh.json +++ b/src/resources/assets/languages/term/zh.json @@ -908,7 +908,9 @@ "resetrunnerphase": "是否重置阶段", "runnerGroupTooltip": "若此处不填写执行器组,当前阶段默认继承组合工具执行器组,若此处填写执行器组,当前阶段将采用此处填写的;执行时,不可修改阶段的执行器组", "isfirenext": "是否激活下一个组", - "inputnodelimit": "数量不能大于1000" + "inputnodelimit": "数量不能大于1000", + "parall": "并发数量", + "paralldesc": "将执行目标按并发数量先后执行。" }, "framework": { "roleauth": "创建完角色立即授权", diff --git a/src/views/pages/autoexec/detail/actionDetail/execute-setting.vue b/src/views/pages/autoexec/detail/actionDetail/execute-setting.vue index ca840516e7d5ab32d8652b53e22ea8a5c196596c..e7c6c912e602f40d19f30173b0d1dee1693c1ae7 100644 --- a/src/views/pages/autoexec/detail/actionDetail/execute-setting.vue +++ b/src/views/pages/autoexec/detail/actionDetail/execute-setting.vue @@ -165,9 +165,31 @@ export default { label: this.$t('page.autoexeccomboprunnergrouplabel'), labelWidth: '113' }, + parallelPolicy: { + type: 'radio', + labelWidth: '113', + disabled: !_this.isEditSetting, + label: this.$t('page.autoexecparallpolicy'), + dataList: [ + { + text: this.$t('page.autoexecparall'), + value: 'parallel' + }, + { + text: this.$t('page.autoexecbatchround'), + value: 'roundCount' + } + ], + allowToggle: true, + transfer: true, + onChange: (val) => { + this.changeParallelPolicy(val); + } + }, roundCount: { type: 'select', value: null, + isHidden: true, transfer: true, disabled: !_this.isEditSetting, label: this.$t('term.autoexec.batchquantity'), @@ -175,6 +197,16 @@ export default { dataList: this.$utils.getRoundCountList(), labelWidth: '113' }, + parallelCount: { + type: 'select', + value: null, + transfer: true, + disabled: !_this.isEditSetting, + label: this.$t('term.autoexec.parall'), + desc: this.$t('term.autoexec.paralldesc'), + dataList: this.$utils.getRoundCountList(), + labelWidth: '113' + }, whenToSpecify: { type: 'radio', label: this.$t('term.autoexec.choosethetime'), @@ -193,7 +225,9 @@ export default { executeUser: null, runnerGroup: null, runnerGroupTag: null, + parallelPolicy: null, roundCount: null, + parallelCount: null, whenToSpecify: 'runtime', executeNodeConfig: {} }, @@ -219,14 +253,20 @@ export default { destroyed() {}, methods: { getExecuteConfig() { - let _this = this; - if (_this.executeConfig) { - Object.keys(_this.executeConfig).forEach(key => { - if (_this.settingConfig.hasOwnProperty(key)) { - _this.settingConfig[key] = _this.executeConfig[key]; + if (this.executeConfig) { + Object.keys(this.executeConfig).forEach(key => { + if (this.settingConfig.hasOwnProperty(key)) { + this.settingConfig[key] = this.executeConfig[key]; + } + this.$set(this.form.roundCount, 'isHidden', true); + this.$set(this.form.parallelCount, 'isHidden', true); + if (this.executeConfig.parallelPolicy && this.executeConfig.parallelPolicy == 'roundCount') { + this.$set(this.form.roundCount, 'isHidden', false); + } else if (this.executeConfig.parallelPolicy && this.executeConfig.parallelPolicy == 'parallel') { + this.$set(this.form.parallelCount, 'isHidden', false); } }); - if (_this.settingConfig.whenToSpecify == 'runtime') { + if (this.settingConfig.whenToSpecify == 'runtime') { this.runtimeFilter = this.settingConfig.executeNodeConfig.filter || {}; } } @@ -264,6 +304,14 @@ export default { this.$set(this.settingConfig.executeNodeConfig, 'paramList', paramList); this.save(); } + if (this.$utils.isEmpty(this.settingConfig.parallelPolicy)) { + this.settingConfig.roundCount = null; + this.settingConfig.parallelCount = null; + } else if (this.settingConfig.parallelPolicy === 'parallel') { + this.settingConfig.roundCount = null; + } else { + this.settingConfig.parallelCount = null; + } }, save() { this.closeSetting(this.settingConfig); @@ -330,6 +378,17 @@ export default { changeWhenToSpecify(val) { this.settingConfig.whenToSpecify = val; this.settingConfig.executeNodeConfig = {}; + }, + changeParallelPolicy(val) { + this.$nextTick(() => { + this.$set(this.form.roundCount, 'isHidden', true); + this.$set(this.form.parallelCount, 'isHidden', true); + if (val && val == 'roundCount') { + this.$set(this.form.roundCount, 'isHidden', false); + } else if (val && val == 'parallel') { + this.$set(this.form.parallelCount, 'isHidden', false); + } + }); } }, computed: {}, diff --git a/src/views/pages/autoexec/detail/actionDetail/step-group.vue b/src/views/pages/autoexec/detail/actionDetail/step-group.vue index 730de1e94286b593739ececed5f834f70e811b00..78136ed589cbca9ba6a53569395a378fdb46df12 100644 --- a/src/views/pages/autoexec/detail/actionDetail/step-group.vue +++ b/src/views/pages/autoexec/detail/actionDetail/step-group.vue @@ -100,12 +100,24 @@
-
- + +
+ {{ getParallelPolicyText(groupConfig.config.executeConfig.parallelPolicy) }} +
+
-
+
+
{{ getRoundCountText(groupConfig.config.executeConfig.roundCount) }}
-
+ +
+ {{ getRoundCountText(groupConfig.config.executeConfig.parallelCount) }} +
+
-
+
{ + this.changeParallelPolicy(val); + } + }, roundCount: { type: 'select', value: null, @@ -264,6 +295,14 @@ export default { label: this.$t('term.autoexec.batchquantity'), desc: this.$t('term.deploy.executetargetdesc'), dataList: this.$utils.getRoundCountList() + }, + parallelCount: { + type: 'select', + value: null, + transfer: true, + label: this.$t('term.autoexec.parall'), + desc: this.$t('term.autoexec.paralldesc'), + dataList: this.$utils.getRoundCountList() } } }, @@ -320,6 +359,8 @@ export default { protocolId: null, executeUser: {}, roundCount: null, + parallelCount: null, + parallelPolicy: null, executeNodeConfig: {}, whitelist: [], blacklist: [] @@ -346,6 +387,14 @@ export default { this.isShowBlacklist = true; } this.isShowDialog = true; + + this.$set(this.executeForm.itemList.roundCount, 'isHidden', true); + this.$set(this.executeForm.itemList.parallelCount, 'isHidden', true); + if (this.executeConfig.parallelPolicy && this.executeConfig.parallelPolicy == 'roundCount') { + this.$set(this.executeForm.itemList.roundCount, 'isHidden', false); + } else if (this.executeConfig.parallelPolicy && this.executeConfig.parallelPolicy == 'parallel') { + this.$set(this.executeForm.itemList.parallelCount, 'isHidden', false); + } }, close() { this.isShowExecute = true; @@ -414,6 +463,14 @@ export default { this.executeConfig.whitelist = this.$refs.whitelist.save(); this.executeConfig.blacklist = this.$refs.blacklist.save(); this.groupConfig.policy = this.groupPolicy; + if (this.$utils.isEmpty(this.executeConfig.parallelPolicy)) { + this.executeConfig.roundCount = null; + this.executeConfig.parallelCount = null; + } else if (this.executeConfig.parallelPolicy === 'parallel') { + this.executeConfig.roundCount = null; + } else { + this.executeConfig.parallelCount = null; + } let isEmpty = true; Object.keys(this.executeConfig).forEach(key => { if (!this.$utils.isEmpty(this.executeConfig[key])) { @@ -446,6 +503,17 @@ export default { }, closeValid() { //关闭校验弹框 this.isValid = false; + }, + changeParallelPolicy(val) { + this.$nextTick(() => { + this.$set(this.executeForm.itemList.roundCount, 'isHidden', true); + this.$set(this.executeForm.itemList.parallelCount, 'isHidden', true); + if (val && val == 'roundCount') { + this.$set(this.executeForm.itemList.roundCount, 'isHidden', false); + } else if (val && val == 'parallel') { + this.$set(this.executeForm.itemList.parallelCount, 'isHidden', false); + } + }); } }, computed: { @@ -472,6 +540,17 @@ export default { } return text; }; + }, + getParallelPolicyText() { + return (val) => { + let text = val; + if (val === 'parallel') { + text = this.$t('page.autoexecparall'); + } else if (val === 'roundCount') { + text = this.$t('page.autoexecbatchround'); + } + return text; + }; } }, watch: { diff --git a/src/views/pages/autoexec/detail/actionDetail/step/edit/step-edit.vue b/src/views/pages/autoexec/detail/actionDetail/step/edit/step-edit.vue index 68f339b7d7786ad13f0f6ce0f3f35bc0a1b015fe..8ea62f2421be073e24ee7c6f87e9a4d647ee20fe 100644 --- a/src/views/pages/autoexec/detail/actionDetail/step/edit/step-edit.vue +++ b/src/views/pages/autoexec/detail/actionDetail/step/edit/step-edit.vue @@ -242,10 +242,9 @@ export default { popLable: 120 } ], - executeForm: [ - { + executeForm: { + protocolId: { type: 'select', - name: 'protocolId', label: this.$t('page.protocol'), //添加阶段 value: '', multiple: false, @@ -256,15 +255,34 @@ export default { transfer: true, disabled: !_this.canEdit }, - { + executeUser: { type: 'slot', - name: 'executeUser', label: this.$t('page.executeuser'), tooltip: this.$t('term.autoexec.nowriteusertooltip') }, - { + parallelPolicy: { + type: 'radio', + labelWidth: '113', + disabled: !_this.canEdit, + label: this.$t('page.autoexecparallpolicy'), + dataList: [ + { + text: this.$t('page.autoexecparall'), + value: 'parallel' + }, + { + text: this.$t('page.autoexecbatchround'), + value: 'roundCount' + } + ], + allowToggle: true, + transfer: true, + onChange: (val) => { + this.changeParallelPolicy(val); + } + }, + roundCount: { type: 'select', - name: 'roundCount', value: null, transfer: true, label: this.$t('term.autoexec.batchquantity'), @@ -272,11 +290,22 @@ export default { dataList: this.$utils.getRoundCountList(), filterName: 'text', disabled: !_this.canEdit + }, + parallelCount: { + type: 'select', + value: null, + transfer: true, + disabled: !_this.canEdit, + label: this.$t('term.autoexec.parall'), + desc: this.$t('term.autoexec.paralldesc'), + dataList: this.$utils.getRoundCountList() } - ], + }, executeConfig: { protocolId: '', executeUser: {}, + parallelPolicy: null, + parallelCount: null, roundCount: null, isPresetExecuteConfig: 0, executeNodeConfig: {}, @@ -315,6 +344,13 @@ export default { if (!this.$utils.isEmpty(this.executeConfig.runnerGroup) || !this.$utils.isEmpty(this.executeConfig.runnerGroupTag)) { this.$set(this.executeConfig, 'isPresetRunnerGroup', 1); } + this.$set(this.executeForm.roundCount, 'isHidden', true); + this.$set(this.executeForm.parallelCount, 'isHidden', true); + if (this.executeConfig.parallelPolicy && this.executeConfig.parallelPolicy == 'roundCount') { + this.$set(this.executeForm.roundCount, 'isHidden', false); + } else if (this.executeConfig.parallelPolicy && this.executeConfig.parallelPolicy == 'parallel') { + this.$set(this.executeForm.parallelCount, 'isHidden', false); + } } } for (let key in this.formItem) { @@ -350,6 +386,15 @@ export default { if (this.$refs.runnerGroup) { this.$set(this.executeConfig, 'runnerGroup', this.$refs.runnerGroup.save()); } + + if (this.$utils.isEmpty(this.executeConfig.parallelPolicy)) { + this.executeConfig.roundCount = null; + this.executeConfig.parallelCount = null; + } else if (this.executeConfig.parallelPolicy === 'parallel') { + this.executeConfig.roundCount = null; + } else { + this.executeConfig.parallelCount = null; + } if (this.$refs.form.valid()) { let editConfig = this.$utils.deepClone(this.editConfig); @@ -465,6 +510,17 @@ export default { this.executePolicyList = res.Return || []; } }); + }, + changeParallelPolicy(val) { + this.$nextTick(() => { + this.$set(this.executeForm.roundCount, 'isHidden', true); + this.$set(this.executeForm.parallelCount, 'isHidden', true); + if (val && val == 'roundCount') { + this.$set(this.executeForm.roundCount, 'isHidden', false); + } else if (val && val == 'parallel') { + this.$set(this.executeForm.parallelCount, 'isHidden', false); + } + }); } }, computed: {}, diff --git a/src/views/pages/autoexec/detail/jobDetail/phase/node-list.vue b/src/views/pages/autoexec/detail/jobDetail/phase/node-list.vue index e904283a928fe8dcba5f6b017589435682bde6e3..d305994f634c214193d974ae21bc1847a1cd31a7 100644 --- a/src/views/pages/autoexec/detail/jobDetail/phase/node-list.vue +++ b/src/views/pages/autoexec/detail/jobDetail/phase/node-list.vue @@ -67,16 +67,28 @@ class="col-span custom-flex text-right" span="14" > - 执行策略:{{ phaseData.jobGroupVo.policy }} + {{ $t('term.deploy.executivestrategy') }}:{{ phaseData.jobGroupVo.policy }} - 分批数:{{ roundCount }} + {{ $t('term.autoexec.parall') }}:{{ parallelCount }}
- 分批数来源: {{ phaseData.roundCountFrom }} +
{{ $t('term.autoexec.parall') }}{{ $t('page.source') }}: {{ phaseData.roundCountFrom }}
+
{{ $t('term.autoexec.batchquantity') }}: {{ phaseData.roundCount }}
+
+
+ + {{ $t('term.autoexec.batchquantity') }}:{{ roundCount }} +
+ {{ $t('term.autoexec.batchquantity') }}{{ $t('page.source') }}: {{ phaseData.roundCountFrom }}
- 执行用户:{{ phaseData.userName }} + {{ $t('page.executeuser') }}:{{ phaseData.userName }}
- 执行用户来源: {{ phaseData.userNameFrom }} + {{ $t('page.executeuser') }}{{ $t('page.source') }}: {{ phaseData.userNameFrom }}
- 执行协议:{{ phaseData.protocol }} + {{ $t('page.protocol') }}:{{ phaseData.protocol }}
- 执行协议来源: {{ phaseData.protocolFrom }} + {{ $t('page.protocol') }}{{ $t('page.source') }}: {{ phaseData.protocolFrom }}
@@ -669,6 +681,18 @@ export default { return roundCount; } }, + parallelCount() { + let parallelCount = this.phaseData.parallelCount; + if (parallelCount == 0) { + return '全部串行'; + } else if (parallelCount == 1) { + return '全部并行'; + } else if (parallelCount == -1) { + return '蓝绿执行'; + } else { + return parallelCount; + } + }, currentNode() { if (this.currentNodeId && this.nodeData && this.nodeData.tbodyList && this.nodeData.tbodyList.length > 0) { return this.nodeData.tbodyList.find(d => d.id === this.currentNodeId); diff --git a/src/views/pages/autoexec/detail/runner-detail.vue b/src/views/pages/autoexec/detail/runner-detail.vue index d98ded58056b289456b17e9eb46f3c311d1ec99b..21649a49ccb74aa06c76261abddfb30d0979d81c 100644 --- a/src/views/pages/autoexec/detail/runner-detail.vue +++ b/src/views/pages/autoexec/detail/runner-detail.vue @@ -56,8 +56,36 @@
- {{ $t('term.autoexec.batchsetting') }} + {{ $t('page.autoexecparallel') }}
+ + + +
+
+ + + +
+
{ if (res.Status == 'OK') { this.$Message.success(this.$t('message.savesuccess')); //保存成功 @@ -641,6 +693,8 @@ export default { } if (this.dataConfig && this.dataConfig.needRoundCount) { //是否需要设置分批数量 this.$set(data, 'roundCount', this.roundCount); + this.$set(data, 'parallelCount', this.parallelCount); + this.$set(data, 'parallelPolicy', this.parallelPolicy); } if (this.$refs.param) { this.$set(data, 'param', this.$refs.param.getValue()); @@ -677,11 +731,13 @@ export default { }, setJobParams(obj) { let config = this.$utils.deepClone(obj); - let {name = '', param = {}, roundCount = 2, scenarioId = null, executeConfig = {}, runnerGroupTag = null, runnerGroup = null} = config || {}; + let {name = '', param = {}, roundCount = 64, parallelCount = 32, parallelPolicy = 'parallel', scenarioId = null, executeConfig = {}, runnerGroupTag = null, runnerGroup = null} = config || {}; this.nameForm.itemList.name.value = name; this.paramValue = param; this.scenarioId = scenarioId; this.roundCount = roundCount; + this.parallelCount = parallelCount; + this.parallelPolicy = parallelPolicy; this.executeConfig = executeConfig; this.runnerGroupTag = runnerGroupTag || { mappingMode: 'constant', @@ -707,6 +763,13 @@ export default { this.getAction(); } }); + }, + changeParallelPolicy(val) { + if (val && val == 'roundCount') { + this.roundCount = this.roundCount || 64; + } else { + this.parallelCount = this.parallelCount || 32; + } } }, computed: { diff --git a/src/views/pages/deploy/job/job-add.vue b/src/views/pages/deploy/job/job-add.vue index 857fc04912bf03d0fbc3b046168dbe5f59d53d4e..50f74e4b3bae7289686d63fc78c9e15e3be11ecf 100644 --- a/src/views/pages/deploy/job/job-add.vue +++ b/src/views/pages/deploy/job/job-add.vue @@ -114,8 +114,22 @@ >
- {{ $t('term.autoexec.batchsetting') }} + {{ $t('page.autoexecparallel') }}
+ + + +
+
+
+ + + +
{{ $t('term.autoexec.jobparam') }} @@ -174,7 +202,8 @@ export default { SaveSetting: () => import('@/views/pages/autoexec/detail/runnerDetail/save-setting.vue'), ResultDialog: () => import('./publishing/result-dialog'), PublishingValid: () => import('./publishing/publishing-valid'), - PhaseList: () => import('./publishing/phase-list') + PhaseList: () => import('./publishing/phase-list'), + TsFormRadio: () => import('@/resources/plugins/TsForm/TsFormRadio') }, props: {}, data() { @@ -201,6 +230,17 @@ export default { desc: this.$t('term.autoexec.roundcountdescrition'), validateList: ['required', 'maxNum'] }, + parallelForm: { + placeholder: this.$t('page.selectinput'), + border: 'border', + dataList: this.getRoundCountList(), + filterName: 'text', + // allowCreate: true, + search: true, + transfer: true, + desc: this.$t('term.autoexec.paralldesc'), + validateList: ['required', 'maxNum'] + }, runtimeParamList: [], //作业参数 combopPhaseList: [], isSaveDialog: false, @@ -216,7 +256,19 @@ export default { jobConfig: {}, paramValue: {}, saveLoading: false, - moduleEnvInstanceMap: {} + moduleEnvInstanceMap: {}, + parallelPolicyDataList: [ + { + text: this.$t('page.autoexecparall'), + value: 'parallel' + }, + { + text: this.$t('page.autoexecbatchround'), + value: 'roundCount' + } + ], + parallelPolicy: 'roundCount', + parallelCount: 4 }; }, beforeCreate() {}, @@ -376,6 +428,8 @@ export default { envId: this.envId, scenarioId: this.scenarioId, roundCount: this.roundCount, + parallelCount: this.parallelCount, + parallelPolicy: this.parallelPolicy, param: {}, moduleList: this.$refs.moduleList.getData() }; @@ -524,6 +578,8 @@ export default { } }); this.jobConfig.roundCount && (this.roundCount = this.jobConfig.roundCount); + this.jobConfig.parallelCount && (this.parallelCount = this.jobConfig.parallelCount); + this.jobConfig.parallelPolicy && (this.parallelPolicy = this.jobConfig.parallelPolicy); this.paramValue = this.jobConfig.param || {}; if (this.jobConfig.scenarioId) { let findScenario = this.initData.scenarioList.find((item) => item.isEnable == true && item.scenarioId == this.jobConfig.scenarioId); @@ -549,6 +605,13 @@ export default { ]; list.push(...this.$utils.getRoundCountList()); return list; + }, + changeParallelPolicy(val) { + if (val && val == 'roundCount') { + this.roundCount = this.roundCount || 64; + } else { + this.parallelCount = this.parallelCount || 32; + } } }, filter: {},