From 7e1114f0c636dbc0ed690209c371f6954331a980 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Mon, 13 Nov 2023 10:17:33 +0100 Subject: [PATCH] Use upstream names instead of IP when available Signed-off-by: DL6ER --- scripts/pi-hole/js/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pi-hole/js/index.js b/scripts/pi-hole/js/index.js index 6dd50fb9..b764237b 100644 --- a/scripts/pi-hole/js/index.js +++ b/scripts/pi-hole/js/index.js @@ -216,7 +216,7 @@ function updateForwardDestinationsPie() { // Collect values and colors data.upstreams.forEach(function (item) { - var label = item.ip; + var label = item.name !== null && item.name.length > 0 ? item.name : item.ip; if (item.port > 0) { label += "#" + item.port; }