]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Make statistics tables (in HTML view) togglable
authorTimothe Litt <litt@acm.org>
Tue, 14 May 2019 21:21:56 +0000 (17:21 -0400)
committerOndřej Surý <ondrej@isc.org>
Thu, 25 Jul 2019 12:03:10 +0000 (08:03 -0400)
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

index 00bca861379a5bd283ab6cb8226b16c17f8f40d6..79a9a76a50aa30b514d39bdd533b16be871e6e77 100644 (file)
@@ -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(' <a class="tabletoggle" href="#" style="font-size:small">Show/Hide</a>');
+              $(".tabletoggle").click(function(){ $(this).closest("h2,h3,h4").next().toggleClass("hidden"); return false;});
           });
         </script>
 
       font-size: 10pt;
      }
 
+     .hidden{
+      display: none;
+     }
+
      .odd{
       background-color: #f0f0f0;
      }