]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
toggle graph/counter pairs
authorMark Andrews <marka@isc.org>
Wed, 15 May 2019 07:36:18 +0000 (17:36 +1000)
committerOndřej Surý <ondrej@isc.org>
Thu, 25 Jul 2019 12:03:10 +0000 (08:03 -0400)
bin/named/bind9.xsl

index c2effbd4c5ebaeae26853b90fe36666d9fe66a3d..98ced34829dd9753d226bd2cfef292679db8d0df 100644 (file)
               $('table.zones').css('min-width', wid );
               $("h2+table,h3+table,h4+table,h2+div,h3+div").prev().append(' <a class="tabletoggle" href="#" style="font-size:small">Show/Hide</a>');
               $(".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;
+             });
           });
         </script>
 
         <xsl:if test="views/view[count(counters[@type=&quot;resqtype&quot;]/counter) &gt; 0]">
           <h2>Outgoing Queries per view</h2>
           <xsl:for-each select="views/view[count(counters[@type=&quot;resqtype&quot;]/counter) &gt; 0]">
-            <h3>View <xsl:value-of select="@name"/></h3>
+            <h3>View <xsl:value-of select="@name"/> <a class="tabletoggle" href="#" style="font-size:small">Show/Hide</a></h3>
             <xsl:if test="system-property('xsl:vendor')!='Transformiix'">
               <!-- Non Mozilla specific markup -->
               <script type="text/javascript">
           </xsl:for-each>
         </xsl:if>
         <xsl:if test="server/counters[@type=&quot;nsstat&quot;]/counter[.&gt;0]">
-          <h2>Server Statistics</h2>
+          <h2>Server Statistics <a class="tabletoggle" href="#" style="font-size:small">Show/Hide</a></h2>
           <xsl:if test="system-property('xsl:vendor')!='Transformiix'">
             <!-- Non Mozilla specific markup -->
             <script type="text/javascript">
         </xsl:if>
         <xsl:if test="server/counters[@type=&quot;zonestat&quot;]/counter[.&gt;0]">
           <xsl:if test="system-property('xsl:vendor')!='Transformiix'">
-            <h2>Zone Maintenance Statistics</h2>
+            <h2>Zone Maintenance Statistics <a class="tabletoggle" href="#" style="font-size:small">Show/Hide</a></h2>
             <script type="text/javascript">
                  graphs.push({
                                'title' : "Zone Maintenance Stats",