diff --git a/scripts/pi-hole/js/messages.js b/scripts/pi-hole/js/messages.js index ce0674b5..5c935ea9 100644 --- a/scripts/pi-hole/js/messages.js +++ b/scripts/pi-hole/js/messages.js @@ -19,12 +19,19 @@ function render_timestamp(data, type) { return data; } +function multline(input) { + return input.split(",").join("\n"); +} + function render_message(data, type, row) { // Display and search content switch (row["type"]) { case "REGEX": return "Encountered an error when processing " + row["blob1"] + " regex filter with ID " + row["blob3"] + ":
"+row["blob2"]+"Error message:
"+row["message"]+""; - + + case "SUBNET": + return "Client
"+row["message"]+" is managed by "+row["blob1"]+" groups (database IDs ["+row["blob3"]+"]):"+multline(row["blob2"])+"" + + "FTL chose the most recent entry
"+row["blob4"]+"to get the group configuration for this client."; default: return "Unknown message type
" + JSON.stringify(row) + ""; }