Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
xiaofang li
MeterSphere
Commits
f6da2e93
Commit
f6da2e93
authored
3 years ago
by
Captain.B
Committed by
刘瑞斌
3 years ago
Browse files
Options
Download
Email Patches
Plain Diff
refactor(性能测试): 固定 rampup 单位,限制前端输入的最大值
parent
bf211f2a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue
+24
-3
...performance/test/components/PerformancePressureConfig.vue
with
24 additions
and
3 deletions
+24
-3
frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue
+
24
-
3
View file @
f6da2e93
...
...
@@ -88,7 +88,7 @@
size=
"mini"
/>
</el-form-item>
<el-form-item>
<el-radio-group
v-model=
"threadGroup.unit"
>
<el-radio-group
v-model=
"threadGroup.unit"
@
change=
"changeUnit(threadGroup)"
>
<el-radio
label=
"S"
>
{{ $t('schedule.cron.seconds') }}
</el-radio>
<el-radio
label=
"M"
>
{{ $t('schedule.cron.minutes') }}
</el-radio>
<el-radio
label=
"H"
>
{{ $t('schedule.cron.hours') }}
</el-radio>
...
...
@@ -112,7 +112,8 @@
<el-input-number
:disabled=
"isReadOnly"
:min=
"1"
:max=
"threadGroup.duration"
v-if=
"rampUpTimeVisible"
:max=
"getMaxRampUp(threadGroup)"
v-model=
"threadGroup.rampUpTime"
@
change=
"calculateTotalChart()"
size=
"mini"
/>
...
...
@@ -133,8 +134,9 @@
<el-form-item
:label=
"$t('load_test.ramp_up_time_within')"
>
<el-input-number
:disabled=
"isReadOnly"
v-if=
"rampUpTimeVisible"
:min=
"1"
:max=
"threadGroup
.duration
"
:max=
"
getMaxRampUp(
threadGroup
)
"
v-model=
"threadGroup.rampUpTime"
@
change=
"calculateTotalChart()"
size=
"mini"
/>
...
...
@@ -250,6 +252,7 @@ export default {
autoStop
:
false
,
autoStopDelay
:
30
,
isReadOnly
:
false
,
rampUpTimeVisible
:
true
,
};
},
mounted
()
{
...
...
@@ -651,6 +654,24 @@ export default {
return
true
;
},
getMaxRampUp
(
tg
)
{
if
(
tg
.
unit
===
'
S
'
)
{
return
tg
.
duration
;
}
if
(
tg
.
unit
===
'
M
'
)
{
return
tg
.
duration
*
60
;
}
if
(
tg
.
unit
===
'
H
'
)
{
return
tg
.
duration
*
60
*
60
;
}
return
tg
.
duration
;
},
changeUnit
(
tg
)
{
this
.
rampUpTimeVisible
=
false
;
this
.
$nextTick
(()
=>
{
this
.
rampUpTimeVisible
=
true
;
});
},
getUnitLabel
(
tg
)
{
if
(
tg
.
unit
===
'
S
'
)
{
return
this
.
$t
(
'
schedule.cron.seconds
'
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment