Skip to content

Commit dd9f2ed

Browse files
authored
fix: Mysql 慢日志样式调整 (#1512)
1 parent 105c249 commit dd9f2ed

File tree

1 file changed

+7
-2
lines changed
  • frontend/src/views/database/mysql/setting/slow-log

1 file changed

+7
-2
lines changed

frontend/src/views/database/mysql/setting/slow-log/index.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
:placeholder="$t('database.noData')"
3232
:indent-with-tab="true"
3333
:tabSize="4"
34-
style="height: calc(100vh - 428px); width: 100%"
34+
:style="{ height: getDynamicHeight(), width: '100%' }"
3535
:lineWrapping="true"
3636
:matchBrackets="true"
3737
theme="cobalt"
@@ -42,7 +42,6 @@
4242
:disabled="true"
4343
/>
4444

45-
<br />
4645
<ConfirmDialog @cancel="onCancel" ref="confirmDialogRef" @confirm="onSave"></ConfirmDialog>
4746
</div>
4847
</template>
@@ -100,6 +99,8 @@ const acceptParams = async (params: DialogProps): Promise<void> => {
10099
loadMysqlSlowlogs(path);
101100
}
102101
}, 1000 * 5);
102+
} else {
103+
detailShow.value = false;
103104
}
104105
};
105106
const emit = defineEmits(['loading']);
@@ -117,6 +118,10 @@ const handleSlowLogs = async () => {
117118
confirmDialogRef.value!.acceptParams(params);
118119
};
119120
121+
const getDynamicHeight = () => {
122+
return variables.slow_query_log === 'ON' ? `calc(100vh - 437px)` : `calc(100vh - 383px)`;
123+
};
124+
120125
const changeSlowLogs = () => {
121126
if (!(variables.long_query_time > 0 && variables.long_query_time <= 600)) {
122127
MsgError(i18n.global.t('database.thresholdRangeHelper'));

0 commit comments

Comments
 (0)