From: Alexander Moisseev Date: Tue, 22 May 2018 10:08:15 +0000 (+0300) Subject: [WebUI] Display smtp sender/recipient in history X-Git-Tag: 1.7.6~114^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F2255%2Fhead;p=rspamd.git [WebUI] Display smtp sender/recipient in history if it doesn't match From/To..Cc..Bcc --- diff --git a/interface/js/app/history.js b/interface/js/app/history.js index dc44a2ddf..4fa3d9e07 100644 --- a/interface/js/app/history.js +++ b/interface/js/app/history.js @@ -171,7 +171,14 @@ function($, _, Humanize) { "value": scan_time }; item.id = item['message-id']; - item.rcpt_mime = item.rcpt_mime.join(",​"); + if (JSON.stringify(item.rcpt_smtp) !== JSON.stringify(item.rcpt_mime)) { + item.rcpt_mime = "[" + item.rcpt_smtp.join(",​") + "] " + item.rcpt_mime.join(",​"); + } else { + item.rcpt_mime = item.rcpt_mime.join(",​"); + } + if (item.sender_mime !== item.sender_smtp) { + item.sender_mime = "[" + item.sender_smtp + "] " + item.sender_mime; + } items.push(item); }); @@ -225,7 +232,7 @@ function($, _, Humanize) { } }, { "name": "sender_mime", - "title": "From", + "title": "[Envelope From] From", "breakpoints": "xs sm md", "style": { "font-size": "11px", @@ -233,7 +240,7 @@ function($, _, Humanize) { } }, { "name": "rcpt_mime", - "title": "To", + "title": "[Envelope To] To", "breakpoints": "xs sm md", "style": { "font-size": "11px",