mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-06-29 10:47:34 +00:00
use DurationOptions[5].value to avoid using magic strings
This commit is contained in:
parent
7580d653c2
commit
4d7db53f28
@ -31,7 +31,7 @@ limitations under the License. -->
|
|||||||
<div>
|
<div>
|
||||||
<div class="label">{{ t("duration") }}</div>
|
<div class="label">{{ t("duration") }}</div>
|
||||||
<Radio class="mb-5" :value="duration" :options="DurationOptions" @change="changeDuration" />
|
<Radio class="mb-5" :value="duration" :options="DurationOptions" @change="changeDuration" />
|
||||||
<div v-if="duration === 'custom'" class="custom-duration">
|
<div v-if="duration === DurationOptions[5].value" class="custom-duration">
|
||||||
<div class="label">{{ t("customDuration") }} ({{ t("seconds") }})</div>
|
<div class="label">{{ t("customDuration") }} ({{ t("seconds") }})</div>
|
||||||
<el-input
|
<el-input
|
||||||
size="small"
|
size="small"
|
||||||
@ -154,7 +154,7 @@ limitations under the License. -->
|
|||||||
async function createTask() {
|
async function createTask() {
|
||||||
let finalDuration: number;
|
let finalDuration: number;
|
||||||
|
|
||||||
if (duration.value === "custom") {
|
if (duration.value === DurationOptions[5].value) {
|
||||||
if (!customDurationSeconds.value || customDurationSeconds.value < 1 || customDurationSeconds.value > 900) {
|
if (!customDurationSeconds.value || customDurationSeconds.value < 1 || customDurationSeconds.value > 900) {
|
||||||
ElMessage.error("Please enter a valid duration between 1 and 900 seconds");
|
ElMessage.error("Please enter a valid duration between 1 and 900 seconds");
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user