From dd9f2edf409f395510dd6c124caf8358df87db58 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Mon, 3 Jul 2023 15:00:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20Mysql=20=E6=85=A2=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4=20(#1512)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/database/mysql/setting/slow-log/index.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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 69191d54a..bb54e46ca 100644 --- a/frontend/src/views/database/mysql/setting/slow-log/index.vue +++ b/frontend/src/views/database/mysql/setting/slow-log/index.vue @@ -31,7 +31,7 @@ :placeholder="$t('database.noData')" :indent-with-tab="true" :tabSize="4" - style="height: calc(100vh - 428px); width: 100%" + :style="{ height: getDynamicHeight(), width: '100%' }" :lineWrapping="true" :matchBrackets="true" theme="cobalt" @@ -42,7 +42,6 @@ :disabled="true" /> -
@@ -100,6 +99,8 @@ const acceptParams = async (params: DialogProps): Promise => { loadMysqlSlowlogs(path); } }, 1000 * 5); + } else { + detailShow.value = false; } }; const emit = defineEmits(['loading']); @@ -117,6 +118,10 @@ const handleSlowLogs = async () => { confirmDialogRef.value!.acceptParams(params); }; +const getDynamicHeight = () => { + return variables.slow_query_log === 'ON' ? `calc(100vh - 437px)` : `calc(100vh - 383px)`; +}; + const changeSlowLogs = () => { if (!(variables.long_query_time > 0 && variables.long_query_time <= 600)) { MsgError(i18n.global.t('database.thresholdRangeHelper'));