diff --git a/src/locales/lang/en.ts b/src/locales/lang/en.ts index c04f4876..ea77bc16 100644 --- a/src/locales/lang/en.ts +++ b/src/locales/lang/en.ts @@ -404,5 +404,7 @@ const msg = { customDuration: "Custom Duration", maxDuration: "Max Duration", minutes: "Minutes", + invalidProfilingDurationRange: "Please enter a valid duration between 1 and 900 seconds", + taskCreatedSuccessfully: "Task created successfully", }; export default msg; diff --git a/src/locales/lang/es.ts b/src/locales/lang/es.ts index b062bae7..ba7d7edc 100644 --- a/src/locales/lang/es.ts +++ b/src/locales/lang/es.ts @@ -404,5 +404,7 @@ const msg = { customDuration: "Duración Personalizada", maxDuration: "Duración Máxima", minutes: "Minutos", + invalidProfilingDurationRange: "Por favor ingrese una duración válida entre 1 y 900 segundos", + taskCreatedSuccessfully: "Tarea creada exitosamente", }; export default msg; diff --git a/src/locales/lang/zh.ts b/src/locales/lang/zh.ts index 51163c12..40c21e0e 100644 --- a/src/locales/lang/zh.ts +++ b/src/locales/lang/zh.ts @@ -402,5 +402,7 @@ const msg = { customDuration: "自定义时长", maxDuration: "最大时长", minutes: "分钟", + invalidProfilingDurationRange: "请输入1到900秒之间的有效时长", + taskCreatedSuccessfully: "任务创建成功", }; export default msg; diff --git a/src/views/dashboard/related/async-profiling/components/NewTask.vue b/src/views/dashboard/related/async-profiling/components/NewTask.vue index 3e9e2a42..e5c9c656 100644 --- a/src/views/dashboard/related/async-profiling/components/NewTask.vue +++ b/src/views/dashboard/related/async-profiling/components/NewTask.vue @@ -156,12 +156,12 @@ limitations under the License. --> if (duration.value === DurationOptions[5].value) { if (!customDurationSeconds.value || customDurationSeconds.value < 1 || customDurationSeconds.value > 900) { - ElMessage.error("Please enter a valid duration between 1 and 900 seconds"); + ElMessage.error(t("invalidProfilingDurationRange")); return; } finalDuration = customDurationSeconds.value; } else { - finalDuration = Number(duration.value) * 60; + finalDuration = Number(duration.value); } const params = { @@ -184,7 +184,7 @@ limitations under the License. --> return; } emits("close"); - ElMessage.success("Task created successfully"); + ElMessage.success(t("taskCreatedSuccessfully")); }