diff --git a/frontend/src/views/container/container/log/index.vue b/frontend/src/views/container/container/log/index.vue index 137222ac9..c2e3ba56a 100644 --- a/frontend/src/views/container/container/log/index.vue +++ b/frontend/src/views/container/container/log/index.vue @@ -152,7 +152,7 @@ const searchLogs = async () => { `${protocol}://${host}/api/v1/containers/search/log?container=${logSearch.containerID}&since=${logSearch.mode}&tail=${logSearch.tail}&follow=${logSearch.isWatch}`, ); terminalSocket.value.onmessage = (event) => { - logInfo.value += event.data.replace(/\x1B\[[0-9;]*[mG]/g, ''); + logInfo.value += event.data.replace(/\x1B\[[0-?]*[ -/]*[@-~]/g, ''); const state = view.value.state; view.value.dispatch({ selection: { anchor: state.doc.length, head: state.doc.length }, diff --git a/frontend/src/views/cronjob/record/index.vue b/frontend/src/views/cronjob/record/index.vue index 915f3cf20..de1ff4c36 100644 --- a/frontend/src/views/cronjob/record/index.vue +++ b/frontend/src/views/cronjob/record/index.vue @@ -407,10 +407,11 @@ const forDetail = async (row: Cronjob.Record) => { const loadRecord = async (row: Cronjob.Record) => { if (row.records) { const res = await getRecordLog(row.id); - if (currentRecordDetail.value === res.data) { + let log = res.data.replace(/\x1B\[[0-?]*[ -/]*[@-~]/g, ''); + if (currentRecordDetail.value === log) { return; } - currentRecordDetail.value = res.data; + currentRecordDetail.value = log; const state = view.value.state; view.value.dispatch({ selection: { anchor: state.doc.length, head: state.doc.length },