From 86595ed8cb5cec19585bd65f83b0af1ae489b0cd Mon Sep 17 00:00:00 2001 From: Timothe Litt Date: Tue, 14 May 2019 17:21:56 -0400 Subject: [PATCH 1/5] Make statistics tables (in HTML view) togglable The HTML view of the statistics channel creates pages with many long tables. These can be difficult to navigate. This commit adds a "show/hide" toggle to each heading, which makes it easy to compress/expand the view. --- bin/named/bind9.xsl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/named/bind9.xsl b/bin/named/bind9.xsl index 00bca86137..79a9a76a50 100644 --- a/bin/named/bind9.xsl +++ b/bin/named/bind9.xsl @@ -21,6 +21,8 @@ var wid=0; $('table.zones').each(function(i) { if( $(this).width() > wid ) wid = $(this).width(); return true; }); $('table.zones').css('min-width', wid ); + $("h2+table,h3+table,h4+table").prev().append(' Show/Hide'); + $(".tabletoggle").click(function(){ $(this).closest("h2,h3,h4").next().toggleClass("hidden"); return false;}); }); @@ -90,6 +92,10 @@ font-size: 10pt; } + .hidden{ + display: none; + } + .odd{ background-color: #f0f0f0; } From 34ce90565c0dd860e079ea94d524dcefc5f342d4 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 15 May 2019 16:46:25 +1000 Subject: [PATCH 2/5] toggle graph/counter pairs --- bin/named/bind9.xsl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/named/bind9.xsl b/bin/named/bind9.xsl index 79a9a76a50..c2effbd4c5 100644 --- a/bin/named/bind9.xsl +++ b/bin/named/bind9.xsl @@ -21,8 +21,11 @@ var wid=0; $('table.zones').each(function(i) { if( $(this).width() > wid ) wid = $(this).width(); return true; }); $('table.zones').css('min-width', wid ); - $("h2+table,h3+table,h4+table").prev().append(' Show/Hide'); - $(".tabletoggle").click(function(){ $(this).closest("h2,h3,h4").next().toggleClass("hidden"); return false;}); + $("h2+table,h3+table,h4+table,h2+div,h3+div").prev().append(' Show/Hide'); + $(".tabletoggle").click(function(){ + if ($(this).closest("h2,h3").next().is("div")) { $(this).closest("h2,h3").next().next().toggleClass("hidden"); }; + $(this).closest("h2,h3,h4").next().toggleClass("hidden"); + return false;}); }); From e6c13ebb26042c65415890515f51cdc38f32c6d4 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 15 May 2019 17:36:18 +1000 Subject: [PATCH 3/5] toggle graph/counter pairs --- bin/named/bind9.xsl | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/bin/named/bind9.xsl b/bin/named/bind9.xsl index c2effbd4c5..98ced34829 100644 --- a/bin/named/bind9.xsl +++ b/bin/named/bind9.xsl @@ -23,9 +23,12 @@ $('table.zones').css('min-width', wid ); $("h2+table,h3+table,h4+table,h2+div,h3+div").prev().append(' Show/Hide'); $(".tabletoggle").click(function(){ - if ($(this).closest("h2,h3").next().is("div")) { $(this).closest("h2,h3").next().next().toggleClass("hidden"); }; - $(this).closest("h2,h3,h4").next().toggleClass("hidden"); - return false;}); + var n = $(this).closest("h2,h3,h4").next(); + if (n.is("script")) { n = n.next(); } + if (n.is("div")) { n.toggleClass("hidden"); n = n.next(); } + if (n.is("table")) { n.toggleClass("hidden"); } + return false; + }); }); @@ -426,7 +429,7 @@

Outgoing Queries per view

-

View

+

View Show/Hide