diff --git a/scripts/pi-hole/js/footer.js b/scripts/pi-hole/js/footer.js
index b7536404..94cfc82a 100644
--- a/scripts/pi-hole/js/footer.js
+++ b/scripts/pi-hole/js/footer.js
@@ -574,14 +574,41 @@ $("#settings-level").on("change", function () {
});
function addAdvancedInfo() {
- const advancedInfoSource = $("#advanced-info");
- const advancedInfoTarget = $("#advanced-info-target");
- if (settingsLevel >= 2) {
- advancedInfoTarget.html(advancedInfoSource.html());
- advancedInfoTarget.show();
- } else {
+ const advancedInfoSource = $("#advanced-info-data");
+ const advancedInfoTarget = $("#advanced-info");
+ const isTLS = advancedInfoSource.data("tls");
+ const clientIP = advancedInfoSource.data("client-ip");
+ const starttime = parseFloat(advancedInfoSource.data("starttime"));
+ const endtime = parseFloat(advancedInfoSource.data("endtime"));
+ const totaltime = 1e3 * (endtime - starttime);
+
+ // Hide advanced info if settings level is lower than 2
+ if (settingsLevel < 2) {
advancedInfoTarget.hide();
+ return;
}
+
+ // Show advanced info
+ advancedInfoTarget.empty();
+
+ // Add TLS and client IP info
+ advancedInfoTarget.append(
+ 'Client: ' +
+ clientIP +
+ "
"
+ );
+
+ // Add render time info
+ advancedInfoTarget.append(
+ "Render time: " + (totaltime > 0.5 ? totaltime.toFixed(1) : totaltime.toFixed(3)) + " ms"
+ );
+
+ // Show advanced info
+ advancedInfoTarget.show();
}
$(function () {
diff --git a/scripts/pi-hole/lua/footer.lp b/scripts/pi-hole/lua/footer.lp
index 595a328f..c3d8dda3 100644
--- a/scripts/pi-hole/lua/footer.lp
+++ b/scripts/pi-hole/lua/footer.lp
@@ -59,11 +59,6 @@
-