fix logging ui

This commit is contained in:
jxxghp
2023-09-03 15:42:01 +08:00
parent 38e74f0c1b
commit 93a2a4a772
+4 -2
View File
@@ -28,7 +28,7 @@ function startSSELogging() {
function extractLogDetailsFromLogs(logs: string[]): { level: string; time: string; program: string; content: string }[] { function extractLogDetailsFromLogs(logs: string[]): { level: string; time: string; program: string; content: string }[] {
const logDetails: { level: string; time: string; program: string; content: string }[] = [] const logDetails: { level: string; time: string; program: string; content: string }[] = []
const logPattern = /^【(.*?)】.*\s(.*?)\s-\s(.*?)\s-\s(.*)$/ const logPattern = /^【(.*?)】[0-9\-:]*\s(.*?)\s-\s(.*?)\s-\s(.*)$/
for (const log of logs) { for (const log of logs) {
const matches = RegExp(logPattern).exec(log) const matches = RegExp(logPattern).exec(log)
@@ -70,7 +70,7 @@ onMounted(() => {
<template> <template>
<div <div
v-if="logs.length === 0" v-if="logs.length === 0"
class="mt-5 w-full text-centerflex flex-col items-center" class="mt-5 w-full text-center flex flex-col items-center"
> >
<VProgressCircular <VProgressCircular
size="48" size="48"
@@ -79,6 +79,7 @@ onMounted(() => {
/> />
<span class="mt-3">正在刷新 ...</span> <span class="mt-3">正在刷新 ...</span>
</div> </div>
<div>
<VTable <VTable
class="table-rounded" class="table-rounded"
hide-default-footer hide-default-footer
@@ -116,4 +117,5 @@ onMounted(() => {
</tr> </tr>
</tbody> </tbody>
</VTable> </VTable>
</div>
</template> </template>