diff --git a/frontend/src/views/database/mysql/setting/slow-log/index.vue b/frontend/src/views/database/mysql/setting/slow-log/index.vue
index ab452cb55..a0618d721 100644
--- a/frontend/src/views/database/mysql/setting/slow-log/index.vue
+++ b/frontend/src/views/database/mysql/setting/slow-log/index.vue
@@ -2,9 +2,10 @@
{{ $t('database.longQueryTime') }}
-
+
{{ $t('database.second') }}
+ {{ $t('commons.rule.numberRange', [1, 600]) }}
{{ $t('database.isOn') }}
{
const confirmDialogRef = ref();
+const errTime = ref();
const isWatch = ref();
let timer: NodeJS.Timer | null = null;
@@ -109,7 +111,14 @@ const onCancle = async () => {
variables.slow_query_log = variables.slow_query_log === 'ON' ? 'OFF' : 'ON';
};
+const checkValid = () => {
+ errTime.value = !(variables.long_query_time > 0 && variables.long_query_time < 600);
+};
+
const onSave = async () => {
+ if (!(variables.long_query_time > 0 && variables.long_query_time < 600)) {
+ return;
+ }
let param = [] as Array;
if (variables.slow_query_log !== oldVariables.value.slow_query_log) {
param.push({ param: 'slow_query_log', value: variables.slow_query_log });
diff --git a/frontend/src/views/database/mysql/setting/variables/index.vue b/frontend/src/views/database/mysql/setting/variables/index.vue
index 59f1d235e..033c1af33 100644
--- a/frontend/src/views/database/mysql/setting/variables/index.vue
+++ b/frontend/src/views/database/mysql/setting/variables/index.vue
@@ -115,7 +115,7 @@