mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-25 16:26:13 +08:00
fix: Mysql 慢日志样式调整 (#1512)
This commit is contained in:
parent
105c249d97
commit
dd9f2edf40
1 changed files with 7 additions and 2 deletions
|
|
@ -31,7 +31,7 @@
|
||||||
:placeholder="$t('database.noData')"
|
:placeholder="$t('database.noData')"
|
||||||
:indent-with-tab="true"
|
:indent-with-tab="true"
|
||||||
:tabSize="4"
|
:tabSize="4"
|
||||||
style="height: calc(100vh - 428px); width: 100%"
|
:style="{ height: getDynamicHeight(), width: '100%' }"
|
||||||
:lineWrapping="true"
|
:lineWrapping="true"
|
||||||
:matchBrackets="true"
|
:matchBrackets="true"
|
||||||
theme="cobalt"
|
theme="cobalt"
|
||||||
|
|
@ -42,7 +42,6 @@
|
||||||
:disabled="true"
|
:disabled="true"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<br />
|
|
||||||
<ConfirmDialog @cancel="onCancel" ref="confirmDialogRef" @confirm="onSave"></ConfirmDialog>
|
<ConfirmDialog @cancel="onCancel" ref="confirmDialogRef" @confirm="onSave"></ConfirmDialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -100,6 +99,8 @@ const acceptParams = async (params: DialogProps): Promise<void> => {
|
||||||
loadMysqlSlowlogs(path);
|
loadMysqlSlowlogs(path);
|
||||||
}
|
}
|
||||||
}, 1000 * 5);
|
}, 1000 * 5);
|
||||||
|
} else {
|
||||||
|
detailShow.value = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const emit = defineEmits(['loading']);
|
const emit = defineEmits(['loading']);
|
||||||
|
|
@ -117,6 +118,10 @@ const handleSlowLogs = async () => {
|
||||||
confirmDialogRef.value!.acceptParams(params);
|
confirmDialogRef.value!.acceptParams(params);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const getDynamicHeight = () => {
|
||||||
|
return variables.slow_query_log === 'ON' ? `calc(100vh - 437px)` : `calc(100vh - 383px)`;
|
||||||
|
};
|
||||||
|
|
||||||
const changeSlowLogs = () => {
|
const changeSlowLogs = () => {
|
||||||
if (!(variables.long_query_time > 0 && variables.long_query_time <= 600)) {
|
if (!(variables.long_query_time > 0 && variables.long_query_time <= 600)) {
|
||||||
MsgError(i18n.global.t('database.thresholdRangeHelper'));
|
MsgError(i18n.global.t('database.thresholdRangeHelper'));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue