From 11fa2ad673b1bbc61ed5b0d474aec5167539d10e Mon Sep 17 00:00:00 2001 From: Junwei Zhao Date: Thu, 16 Apr 2026 17:06:55 +1000 Subject: [PATCH] routermon: replace ISP column with Target Service badge in WAN table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove ISP column (always empty with local MMDB — no ISP data) - Add Target Service column with color-coded badges (SSH/RDP/VNC/SMB=red, HTTP/HTTPS=blue, MySQL/PostgreSQL/Redis/MongoDB=purple, SMTP/POP3/IMAP=green, DNS=yellow, FTP=orange) - Restore inline service label in Dst Port cell (e.g. '22 SSH') - Expand port mapping: 21 ports covered (FTP, Telnet, SMTP, DNS, POP3, IMAP, SMB, MSSQL, MySQL, RDP, PostgreSQL, VNC, Redis, HTTP-alt, HTTPS-alt, Elasticsearch, MongoDB) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- routermon/templates/routermon/_live_wan.html | 45 ++++++++++++++++++-- 1 file changed, 42 insertions(+), 3 deletions(-) diff --git a/routermon/templates/routermon/_live_wan.html b/routermon/templates/routermon/_live_wan.html index 9131b61..b0fa894 100644 --- a/routermon/templates/routermon/_live_wan.html +++ b/routermon/templates/routermon/_live_wan.html @@ -7,7 +7,7 @@ Dst Port Src Port Geo - ISP + Target Service @@ -26,12 +26,26 @@ {% with p=ev.dst_port %} - {% if p == 22 %}SSH + {% if p == 21 %}FTP + {% elif p == 22 %}SSH {% elif p == 23 %}Telnet + {% elif p == 25 %}SMTP + {% elif p == 53 %}DNS {% elif p == 80 %}HTTP + {% elif p == 110 %}POP3 + {% elif p == 143 %}IMAP {% elif p == 443 %}HTTPS + {% elif p == 445 %}SMB + {% elif p == 1433 %}MSSQL + {% elif p == 3306 %}MySQL {% elif p == 3389 %}RDP + {% elif p == 5432 %}PostgreSQL + {% elif p == 5900 %}VNC + {% elif p == 6379 %}Redis {% elif p == 8080 %}HTTP-alt + {% elif p == 8443 %}HTTPS-alt + {% elif p == 9200 %}Elastic + {% elif p == 27017 %}MongoDB {% endif %} {% endwith %} {% else %} @@ -46,7 +60,32 @@ {% endif %} - {{ ev.isp|default:"—" }} + + {% with p=ev.dst_port %} + {% if p == 21 %}FTP + {% elif p == 22 %}SSH + {% elif p == 23 %}Telnet + {% elif p == 25 %}SMTP + {% elif p == 53 %}DNS + {% elif p == 80 %}HTTP + {% elif p == 110 %}POP3 + {% elif p == 143 %}IMAP + {% elif p == 443 %}HTTPS + {% elif p == 445 %}SMB + {% elif p == 1433 %}MSSQL + {% elif p == 3306 %}MySQL + {% elif p == 3389 %}RDP + {% elif p == 5432 %}PostgreSQL + {% elif p == 5900 %}VNC + {% elif p == 6379 %}Redis + {% elif p == 8080 %}HTTP-alt + {% elif p == 8443 %}HTTPS-alt + {% elif p == 9200 %}Elastic + {% elif p == 27017 %}MongoDB + {% else %} + {% endif %} + {% endwith %} + {% empty %}