fix: 移除计划任务报告中的 ANSI 转义 (#4193)

Refs #4097
pull/4195/head
ssongliu 9 months ago committed by GitHub
parent 34a6587ebc
commit a33eabb4f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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 },

@ -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 },

Loading…
Cancel
Save