From 8ba1f7474027fd37066de0e669d6f18d96cc052e Mon Sep 17 00:00:00 2001 From: CaptainB Date: Fri, 12 Nov 2021 16:43:22 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20=E5=8E=8B=E5=8A=9B=E9=85=8D=E7=BD=AE=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/PerformancePressureConfig.vue | 106 +++++++------- .../comonents/load/PerformanceLoadConfig.vue | 134 ++++++++++-------- frontend/src/i18n/en-US.js | 6 +- frontend/src/i18n/zh-CN.js | 7 +- frontend/src/i18n/zh-TW.js | 6 +- 5 files changed, 144 insertions(+), 115 deletions(-) diff --git a/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue b/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue index 28ef2158fe..270029588d 100644 --- a/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue +++ b/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue @@ -6,11 +6,11 @@ + v-for="item in resourcePools" + :key="item.id" + :label="item.name" + :disabled="!item.performance" + :value="item.id"> @@ -69,7 +69,7 @@ - + +
+ v-for="item in onSampleErrors" + :key="item.value" + :label="item.label" + :value="item.value">
- - - {{ $t('load_test.by_duration') }} - {{ $t('load_test.by_iteration') }} + + + {{ $t('load_test.by_duration') }} + {{ $t('load_test.by_iteration') }} -
- + - + - + - +
- + -   + + -
- + - + -
- + -
@@ -190,9 +188,10 @@ size="mini"/>

- + -   + +
- + -
- - {{ $t('load_test.auto_ratio') }} - {{ $t('load_test.specify_resource') }} - {{ $t('load_test.custom_ratio') }} - + + + {{ $t('load_test.auto_ratio') }} + {{ $t('load_test.specify_resource') }} + {{ $t('load_test.custom_ratio') }} + +
- - - - + + + + + +
@@ -287,7 +289,7 @@ const RATIOS = "ratios"; const hexToRgb = function (hex) { return 'rgb(' + parseInt('0x' + hex.slice(1, 3)) + ',' + parseInt('0x' + hex.slice(3, 5)) - + ',' + parseInt('0x' + hex.slice(5, 7)) + ')'; + + ',' + parseInt('0x' + hex.slice(5, 7)) + ')'; }; export default { @@ -570,8 +572,8 @@ export default { let tg = handler.threadGroups[i]; if (tg.enabled === 'false' || - tg.deleted === 'true' || - tg.threadType === 'ITERATION') { + tg.deleted === 'true' || + tg.threadType === 'ITERATION') { continue; } if (this.getDuration(tg) < tg.rampUpTime) { @@ -686,7 +688,7 @@ export default { } if (!tg.threadNumber || !tg.duration - || !tg.rampUpTime || !tg.step || !tg.iterateNum) { + || !tg.rampUpTime || !tg.step || !tg.iterateNum) { this.$warning(this.$t('load_test.pressure_config_params_is_empty')); this.$emit('changeActive', '1'); return false; @@ -806,4 +808,12 @@ export default { text-overflow: ellipsis; white-space: nowrap; } + +.duration-input .el-input-number--mini { + width: 100px; +} + +.el-select--mini { + width: 130px; +} diff --git a/frontend/src/business/components/track/plan/view/comonents/load/PerformanceLoadConfig.vue b/frontend/src/business/components/track/plan/view/comonents/load/PerformanceLoadConfig.vue index 59697812ab..4cf9ecd82f 100644 --- a/frontend/src/business/components/track/plan/view/comonents/load/PerformanceLoadConfig.vue +++ b/frontend/src/business/components/track/plan/view/comonents/load/PerformanceLoadConfig.vue @@ -69,16 +69,17 @@ - + - + +

- - - {{ $t('load_test.by_duration') }} - {{ $t('load_test.by_iteration') }} + + + {{ $t('load_test.by_duration') }} + {{ $t('load_test.by_iteration') }} -
- + - + - + - +
- + -   + + -
- + - + -
- + -
- +
- + -   - + + +
- - + + -
+
- - 自动分配 - 固定节点 - 自定义 - + + + {{ $t('load_test.auto_ratio') }} + {{ $t('load_test.specify_resource') }} + {{ $t('load_test.custom_ratio') }} + +
- - - - + + + + + +
- +