diff --git a/src/frontend/devops-pipeline/src/components/PipelineDetailTabs/BaseConfig.vue b/src/frontend/devops-pipeline/src/components/PipelineDetailTabs/BaseConfig.vue index c1d81f96bbf..bc322b59a29 100644 --- a/src/frontend/devops-pipeline/src/components/PipelineDetailTabs/BaseConfig.vue +++ b/src/frontend/devops-pipeline/src/components/PipelineDetailTabs/BaseConfig.vue @@ -126,7 +126,7 @@ key: 'parallelSetting', value: this.$t(`settings.runningOption.${runLockType ?? '--'}`) }, - ...(runLockType === 'group_lock' + ...(['group_lock', 'multiple'].includes(runLockType) ? [{ key: 'parallelConfDetail' }] @@ -135,30 +135,51 @@ ] }, parallelSettingRows () { + const runLockType = this.basicInfo?.runLockType?.toLowerCase?.() + if (runLockType === 'group_lock') { + return [ + { + key: 'concurrencyGroup', + label: 'group.groupName', + value: this.basicInfo?.concurrencyGroup ?? '--' + }, + { + key: 'concurrencyCancelInProgress', + label: 'settings.stopWhenNewCome', + value: this.$t(this.basicInfo?.concurrencyCancelInProgress ? 'true' : 'false') + }, + ...(!this.basicInfo?.concurrencyCancelInProgress + ? [ + { + key: 'maxQueueSize', + label: 'settings.largestNum', + value: this.basicInfo?.maxQueueSize ?? '--' + }, + { + key: 'waitQueueTimeMinute', + label: 'settings.lagestTime', + value: Number.isInteger(this.basicInfo?.waitQueueTimeMinute) ? `${this.basicInfo?.waitQueueTimeMinute}${this.$t('settings.minutes')}` : '--' + } + + ] + : [] + ) + ] + } + return [ - { - key: 'concurrencyGroup', - label: 'group.groupName', - value: this.basicInfo?.concurrencyGroup ?? '--' - }, - { - key: 'concurrencyCancelInProgress', - label: 'settings.stopWhenNewCome', - value: this.$t(this.basicInfo?.concurrencyCancelInProgress ? 'true' : 'false') - }, ...(!this.basicInfo?.concurrencyCancelInProgress ? [ { - key: 'maxQueueSize', - label: 'settings.largestNum', - value: this.basicInfo?.maxQueueSize ?? '--' + key: 'maxConRunningQueueSize', + label: 'settings.concurrentMaxConcurrency', + value: this.basicInfo?.maxConRunningQueueSize ?? '--' }, { key: 'waitQueueTimeMinute', - label: 'settings.lagestTime', + label: 'settings.concurrentTimeout', value: Number.isInteger(this.basicInfo?.waitQueueTimeMinute) ? `${this.basicInfo?.waitQueueTimeMinute}${this.$t('settings.minutes')}` : '--' } - ] : [] ) diff --git a/src/frontend/devops-pipeline/src/components/pipelineSetting/RunningLock.vue b/src/frontend/devops-pipeline/src/components/pipelineSetting/RunningLock.vue index 67b650f8867..b335569b7bb 100755 --- a/src/frontend/devops-pipeline/src/components/pipelineSetting/RunningLock.vue +++ b/src/frontend/devops-pipeline/src/components/pipelineSetting/RunningLock.vue @@ -55,6 +55,49 @@ {{ $t('settings.runningOption.multiple') }} + +
+ + + + + + + + + +
+
+
{ const intVal = parseInt(val, 10) - return !this.isSingleLock || (intVal <= 1440 && intVal >= 1) + if (this.isSingleLock || this.isMultipleLock) { + return intVal <= 1440 && intVal >= 1 + } + return true + }, + message: `${this.isSingleLock + ? this.$t('settings.lagestTime') + : this.$t('settings.concurrentTimeout') + }${this.$t('numberRange', [1, 1440])}`, + trigger: 'blur' + } + ], + maxConRunningQueueSize: [ + requiredRule, + { + validator: (val) => { + return /^(?:[1-9]|[1-9][0-9]|1[0-9]{2}|200)$/.test(val) }, - message: `${this.$t('settings.lagestTime')}${this.$t('numberRange', [1, 1440])}`, + message: this.$t('settings.maxConRunningQueueSizeTips'), trigger: 'blur' } ] diff --git a/src/frontend/locale/pipeline/en-US.json b/src/frontend/locale/pipeline/en-US.json index 8ce182e48d1..5ea437f2959 100644 --- a/src/frontend/locale/pipeline/en-US.json +++ b/src/frontend/locale/pipeline/en-US.json @@ -373,7 +373,11 @@ "mdLink": "Markdown Link", "conCopySuc": "Copied Succeed", "additionDesc": "Description", - "voice": "Voice" + "voice": "Voice", + "concurrentMaxConcurrency": "Maximum Concurrency", + "concurrentTimeout": "Queue Timeout for Exceeding Limit", + "maxConRunningQueueSizeTips": "The range of maximum concurrency is between 1 and 200-200之间", + "maxConcurrencyPlaceholder": "Default to system settings when not specified" }, "template": { "addTemplate": "New Template", diff --git a/src/frontend/locale/pipeline/zh-CN.json b/src/frontend/locale/pipeline/zh-CN.json index 1d3724cd1c1..aba06a15759 100644 --- a/src/frontend/locale/pipeline/zh-CN.json +++ b/src/frontend/locale/pipeline/zh-CN.json @@ -370,7 +370,11 @@ "mdLink": "markdown链接", "conCopySuc": "内容复制成功", "additionDesc": "其他描述", - "voice": "语音" + "voice": "语音", + "concurrentMaxConcurrency": "最大可并发数", + "concurrentTimeout": "超限时排队,排队超时时间", + "maxConRunningQueueSizeTips": "最大可并发数范围在1-200之间", + "maxConcurrencyPlaceholder": "缺省时以系统设置为准" }, "template": { "addTemplate": "新建模板",