fix: 资源池配置校验修改
This commit is contained in:
parent
b62d3c03ac
commit
1af1fc18fd
|
@ -6,11 +6,11 @@
|
||||||
<el-form-item :label="$t('load_test.select_resource_pool')">
|
<el-form-item :label="$t('load_test.select_resource_pool')">
|
||||||
<el-select v-model="resourcePool" :disabled="isReadOnly" size="mini" @change="resourcePoolChange">
|
<el-select v-model="resourcePool" :disabled="isReadOnly" size="mini" @change="resourcePoolChange">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in resourcePools"
|
v-for="item in resourcePools"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:disabled="!item.performance"
|
:disabled="!item.performance"
|
||||||
:value="item.id">
|
:value="item.id">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -82,10 +82,10 @@
|
||||||
<el-form-item :label="$t('load_test.on_sample_error')">
|
<el-form-item :label="$t('load_test.on_sample_error')">
|
||||||
<el-select v-model="threadGroup.onSampleError" :disabled="isReadOnly" size="mini">
|
<el-select v-model="threadGroup.onSampleError" :disabled="isReadOnly" size="mini">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in onSampleErrors"
|
v-for="item in onSampleErrors"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value">
|
:value="item.value">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -252,11 +252,11 @@ const DELETED = "deleted";
|
||||||
|
|
||||||
const hexToRgba = function (hex, opacity) {
|
const hexToRgba = function (hex, opacity) {
|
||||||
return 'rgba(' + parseInt('0x' + hex.slice(1, 3)) + ',' + parseInt('0x' + hex.slice(3, 5)) + ','
|
return 'rgba(' + parseInt('0x' + hex.slice(1, 3)) + ',' + parseInt('0x' + hex.slice(3, 5)) + ','
|
||||||
+ parseInt('0x' + hex.slice(5, 7)) + ',' + opacity + ')';
|
+ parseInt('0x' + hex.slice(5, 7)) + ',' + opacity + ')';
|
||||||
};
|
};
|
||||||
const hexToRgb = function (hex) {
|
const hexToRgb = function (hex) {
|
||||||
return 'rgb(' + parseInt('0x' + hex.slice(1, 3)) + ',' + parseInt('0x' + hex.slice(3, 5))
|
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 {
|
export default {
|
||||||
|
@ -505,7 +505,7 @@ export default {
|
||||||
tg.rampUpTime = tg.duration;
|
tg.rampUpTime = tg.duration;
|
||||||
}
|
}
|
||||||
if (tg.rampUpTime < tg.step) {
|
if (tg.rampUpTime < tg.step) {
|
||||||
tg.step = tg.rampUpTime;
|
tg.step = tg.rampUpTime || 1; // 至少1步
|
||||||
}
|
}
|
||||||
let seriesData = {
|
let seriesData = {
|
||||||
name: tg.attributes.testname,
|
name: tg.attributes.testname,
|
||||||
|
@ -597,7 +597,7 @@ export default {
|
||||||
tg.durationMinutes = tg.durationMinutes || 0;
|
tg.durationMinutes = tg.durationMinutes || 0;
|
||||||
tg.durationSeconds = tg.durationSeconds || 0;
|
tg.durationSeconds = tg.durationSeconds || 0;
|
||||||
this.getDuration(tg);
|
this.getDuration(tg);
|
||||||
if (tg.enabled === 'false' ) {
|
if (tg.enabled === 'false') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!tg.threadNumber || !tg.rampUpTime || !tg.step || !tg.iterateNum) {
|
if (!tg.threadNumber || !tg.rampUpTime || !tg.step || !tg.iterateNum) {
|
||||||
|
|
|
@ -505,7 +505,7 @@ export default {
|
||||||
tg.rampUpTime = tg.duration;
|
tg.rampUpTime = tg.duration;
|
||||||
}
|
}
|
||||||
if (tg.rampUpTime < tg.step) {
|
if (tg.rampUpTime < tg.step) {
|
||||||
tg.step = tg.rampUpTime;
|
tg.step = tg.rampUpTime || 1; // 至少1步
|
||||||
}
|
}
|
||||||
let seriesData = {
|
let seriesData = {
|
||||||
name: tg.attributes.testname,
|
name: tg.attributes.testname,
|
||||||
|
|
Loading…
Reference in New Issue