mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-10-29 03:12:52 +00:00
Compare commits
No commits in common. "4b79ab94875e78415572dc587d9bf35eb5bf9ae8" and "e1d5fce55b4eac88b6bb8ca63fe461d18c9ce5e1" have entirely different histories.
4b79ab9487
...
e1d5fce55b
1 changed files with 3 additions and 10 deletions
|
|
@ -676,9 +676,7 @@
|
|||
|
||||
const parts = log.split(' ');
|
||||
|
||||
let logEntryCutoffIndex = 1;
|
||||
|
||||
if (parts.length >= 10) {
|
||||
if(parts.length >= 10) {
|
||||
const dateTime = `<b>${parts[0]} ${parts[1]}</b>`;
|
||||
const from = `<b>${parts[3]}</b>`;
|
||||
const to = `<b>${parts[5].replace(/^\/+/, "")}</b>`;
|
||||
|
|
@ -686,14 +684,9 @@
|
|||
let outboundColor = '';
|
||||
if (parts[parts.length - 1] === "b") {
|
||||
outboundColor = ' style="color: #e04141;"'; //red for blocked
|
||||
logEntryCutoffIndex = 2;
|
||||
}
|
||||
else if (parts[parts.length - 1] === "p") {
|
||||
outboundColor = ' style="color: #3c89e8;"'; //blue for proxies
|
||||
logEntryCutoffIndex = 2;
|
||||
}
|
||||
else if (parts[parts.length - 1] === "f") {
|
||||
logEntryCutoffIndex = 2;
|
||||
}
|
||||
|
||||
formattedLogs += `<span${outboundColor}>
|
||||
|
|
@ -702,10 +695,10 @@ ${dateTime}
|
|||
${from}
|
||||
${parts[4]}
|
||||
${to}
|
||||
${parts.slice(6, parts.length - logEntryCutoffIndex).join(' ')}
|
||||
${parts.slice(6, parts.length - 2).join(' ')}
|
||||
</span>`;
|
||||
} else {
|
||||
formattedLogs += `<span>${parts.slice(0, parts.length - logEntryCutoffIndex).join(' ')}</span>`;
|
||||
formattedLogs += `<span>${parts.slice(0, parts.length - 2).join(' ')}</span>`;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue