From ef15ebb03ef65260249d423298a08fbff62f9295 Mon Sep 17 00:00:00 2001 From: v_hwweng Date: Thu, 12 Sep 2024 17:12:07 +0800 Subject: [PATCH 1/8] =?UTF-8?q?feat=EF=BC=9A=E6=B5=81=E6=B0=B4=E7=BA=BF?= =?UTF-8?q?=E5=B9=B6=E5=8F=91=E8=BF=90=E8=A1=8C=E6=97=B6=EF=BC=8C=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E9=99=90=E5=88=B6=E5=B9=B6=E5=8F=91=E4=B8=AA=E6=95=B0?= =?UTF-8?q?=E5=92=8C=E6=8E=92=E9=98=9F=20#10718=20#=20Reviewed,=20transact?= =?UTF-8?q?ion=20id:=2018270?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pipelineSetting/RunningLock.vue | 68 ++++++++++++++++++- src/frontend/locale/pipeline/en-US.json | 5 +- src/frontend/locale/pipeline/zh-CN.json | 5 +- 3 files changed, 73 insertions(+), 5 deletions(-) diff --git a/src/frontend/devops-pipeline/src/components/pipelineSetting/RunningLock.vue b/src/frontend/devops-pipeline/src/components/pipelineSetting/RunningLock.vue index 0bcbdf51807..d62298af04a 100755 --- a/src/frontend/devops-pipeline/src/components/pipelineSetting/RunningLock.vue +++ b/src/frontend/devops-pipeline/src/components/pipelineSetting/RunningLock.vue @@ -51,7 +51,50 @@ -
+
+ + + + + + + + + +
+
{ 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..5db23c53f14 100644 --- a/src/frontend/locale/pipeline/en-US.json +++ b/src/frontend/locale/pipeline/en-US.json @@ -373,7 +373,10 @@ "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之间" }, "template": { "addTemplate": "New Template", diff --git a/src/frontend/locale/pipeline/zh-CN.json b/src/frontend/locale/pipeline/zh-CN.json index 418e0cb6008..9955de36e61 100644 --- a/src/frontend/locale/pipeline/zh-CN.json +++ b/src/frontend/locale/pipeline/zh-CN.json @@ -370,7 +370,10 @@ "mdLink": "markdown链接", "conCopySuc": "内容复制成功", "additionDesc": "其他描述", - "voice": "语音" + "voice": "语音", + "concurrentMaxConcurrency": "最大可并发数", + "concurrentTimeout": "超限时排队,排队超时时间", + "maxConRunningQueueSizeTips": "最大可并发数范围在1-200之间" }, "template": { "addTemplate": "新建模板", From d7f945a4bcb50bc62e173f01a14dd600af7f6eee Mon Sep 17 00:00:00 2001 From: v_hwweng Date: Fri, 13 Sep 2024 14:38:27 +0800 Subject: [PATCH 2/8] Merge branch 'master' of https://github.com/Tencent/bk-ci into issue_10718 # Reviewed, transaction id: 18353 From 291b74fb1eee22eae328b1b43a14418f4a199f3f Mon Sep 17 00:00:00 2001 From: v_hwweng Date: Fri, 13 Sep 2024 18:09:10 +0800 Subject: [PATCH 3/8] =?UTF-8?q?feat=EF=BC=9A=E6=B5=81=E6=B0=B4=E7=BA=BF?= =?UTF-8?q?=E5=B9=B6=E5=8F=91=E8=BF=90=E8=A1=8C=E6=97=B6=EF=BC=8C=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E9=99=90=E5=88=B6=E5=B9=B6=E5=8F=91=E4=B8=AA=E6=95=B0?= =?UTF-8?q?=E5=92=8C=E6=8E=92=E9=98=9F=20#10718=20#=20Reviewed,=20transact?= =?UTF-8?q?ion=20id:=2018431?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pipelineSetting/RunningLock.vue | 82 ++++++++++--------- 1 file changed, 44 insertions(+), 38 deletions(-) diff --git a/src/frontend/devops-pipeline/src/components/pipelineSetting/RunningLock.vue b/src/frontend/devops-pipeline/src/components/pipelineSetting/RunningLock.vue index 6e1d2b141f8..bf9d4bd89d4 100755 --- a/src/frontend/devops-pipeline/src/components/pipelineSetting/RunningLock.vue +++ b/src/frontend/devops-pipeline/src/components/pipelineSetting/RunningLock.vue @@ -55,6 +55,50 @@ {{ $t('settings.runningOption.multiple') }}
+ +
+ + + + + + + + + +
+
-
- - - - - - - - -
Date: Mon, 23 Sep 2024 15:37:36 +0800 Subject: [PATCH 4/8] =?UTF-8?q?feat=EF=BC=9A=E6=B5=81=E6=B0=B4=E7=BA=BF?= =?UTF-8?q?=E5=B9=B6=E5=8F=91=E8=BF=90=E8=A1=8C=E6=97=B6=EF=BC=8C=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E9=99=90=E5=88=B6=E5=B9=B6=E5=8F=91=E4=B8=AA=E6=95=B0?= =?UTF-8?q?=E5=92=8C=E6=8E=92=E9=98=9F=20#10718=20#=20Reviewed,=20transact?= =?UTF-8?q?ion=20id:=2019084?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PipelineDetailTabs/BaseConfig.vue | 53 +++++++++++++------ .../pipelineSetting/RunningLock.vue | 4 +- src/frontend/locale/pipeline/en-US.json | 3 +- src/frontend/locale/pipeline/zh-CN.json | 3 +- 4 files changed, 42 insertions(+), 21 deletions(-) diff --git a/src/frontend/devops-pipeline/src/components/PipelineDetailTabs/BaseConfig.vue b/src/frontend/devops-pipeline/src/components/PipelineDetailTabs/BaseConfig.vue index e25025a0309..8b6bf26755b 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 @@ ] }, prarallelSettingRows () { + 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 bf9d4bd89d4..627d3288f79 100755 --- a/src/frontend/devops-pipeline/src/components/pipelineSetting/RunningLock.vue +++ b/src/frontend/devops-pipeline/src/components/pipelineSetting/RunningLock.vue @@ -62,7 +62,6 @@ :key="pipelineSetting.runLockType" > Date: Mon, 23 Sep 2024 20:28:14 +0800 Subject: [PATCH 5/8] =?UTF-8?q?feat=EF=BC=9A=E6=B5=81=E6=B0=B4=E7=BA=BF?= =?UTF-8?q?=E5=B9=B6=E5=8F=91=E8=BF=90=E8=A1=8C=E6=97=B6=EF=BC=8C=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E9=99=90=E5=88=B6=E5=B9=B6=E5=8F=91=E4=B8=AA=E6=95=B0?= =?UTF-8?q?=E5=92=8C=E6=8E=92=E9=98=9F=20#10718=20#=20Reviewed,=20transact?= =?UTF-8?q?ion=20id:=2019156?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/pipelineSetting/RunningLock.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/frontend/devops-pipeline/src/components/pipelineSetting/RunningLock.vue b/src/frontend/devops-pipeline/src/components/pipelineSetting/RunningLock.vue index 627d3288f79..b581c19c473 100755 --- a/src/frontend/devops-pipeline/src/components/pipelineSetting/RunningLock.vue +++ b/src/frontend/devops-pipeline/src/components/pipelineSetting/RunningLock.vue @@ -71,11 +71,12 @@ :disabled="!editable" :placeholder="$t('settings.maxConcurrencyPlaceholder')" v-model="pipelineSetting.maxConRunningQueueSize" - @change="val => handleBaseInfoChange('maxConRunningQueueSize', val)" + @change="val => handleBaseInfoChange('maxConRunningQueueSize', Number(val))" />