From c45bcd9d8e5b8eab245d6338bf239140d9618592 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sat, 23 May 2020 11:22:47 +0200 Subject: [PATCH] Add support for HOSTNAME diagnostics message Signed-off-by: DL6ER --- scripts/pi-hole/js/messages.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/scripts/pi-hole/js/messages.js b/scripts/pi-hole/js/messages.js index 124a69e2..92932091 100644 --- a/scripts/pi-hole/js/messages.js +++ b/scripts/pi-hole/js/messages.js @@ -57,6 +57,24 @@ function renderMessage(data, type, row) { " to get the group configuration for this client." ); + case "HOSTNAME": + var hint = ""; + for (var i = 0; i < row.blob2 + row.message.length + 2; i++) hint += " "; + return ( + "Host names contains invalid character " + + decodeURIComponent(escape(row.blob1))[row.blob2] + + ":
" +
+        hint +
+        "↓\n" +
+        row.message +
+        ": " +
+        decodeURIComponent(escape(row.blob1)) +
+        "\n" +
+        hint +
+        "↑" +
+        "
" + ); + default: return "Unknown message type
" + JSON.stringify(row) + "
"; }