From d616a1180a1e4ac2dd3af35c91075c7c953f89a5 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sat, 15 Jun 2019 17:20:49 +0200 Subject: [PATCH 1/2] Check data before converting. This allows us to detect if there is no data for the graph so we can hide it. Fixes #932 Signed-off-by: DL6ER --- scripts/pi-hole/js/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/pi-hole/js/index.js b/scripts/pi-hole/js/index.js index 17f1e092..21e00bda 100644 --- a/scripts/pi-hole/js/index.js +++ b/scripts/pi-hole/js/index.js @@ -261,15 +261,16 @@ function updateClientsOverTime() { return; } - // convert received objects to arrays - data.over_time = objectToArray(data.over_time); - // Remove graph if there are no results (e.g. privacy mode enabled) if(jQuery.isEmptyObject(data.over_time)) { $("#clients").parent().remove(); return; } + + // convert received objects to arrays + data.over_time = objectToArray(data.over_time); + // remove last data point since it not representative data.over_time[0].splice(-1,1); var timestamps = data.over_time[0]; From 2f5f95dba15aacab9a285eb6252a9a546cb320ba Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sat, 15 Jun 2019 17:47:07 +0200 Subject: [PATCH 2/2] Clarify that the router does not always have to be the DHCP server. Fixes #893 Signed-off-by: DL6ER --- settings.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/settings.php b/settings.php index a77e3995..7acc5e63 100644 --- a/settings.php +++ b/settings.php @@ -868,11 +868,11 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "blocklists" determine the names of devices on your local network. As a result, tables such as Top Clients will only show IP addresses.

One solution for this is to configure Pi-hole to forward these - requests to your home router, but only for devices on your + requests to your DHCP server (most likely your router), but only for devices on your home network. To configure this we will need to know the IP - address of your router and the name of your local network.

+ address of your DHCP server and the name of your local network.

Note: The local domain name must match the domain name specified - in your router, likely found within the DHCP settings.

+ in your DHCP server, likely found within the DHCP settings.