]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
add odd/even shading to the remaining tables
authorEvan Hunt <each@isc.org>
Wed, 26 Jun 2019 21:00:49 +0000 (14:00 -0700)
committerEvan Hunt <each@isc.org>
Wed, 26 Jun 2019 21:01:41 +0000 (14:01 -0700)
bin/named/bind9.xsl
bin/named/bind9.xsl.h

index 01a550ab8eab8fd6d2bbef9aaa28393791c68f97..00bca861379a5bd283ab6cb8226b16c17f8f40d6 100644 (file)
         <hr/>
         <h2>Server Status</h2>
         <table class="info">
-          <tr>
+          <tr class="odd">
             <th>Boot time:</th>
             <td>
               <xsl:value-of select="server/boot-time"/>
             </td>
           </tr>
-          <tr>
+          <tr class="even">
             <th>Last reconfigured:</th>
             <td>
               <xsl:value-of select="server/config-time"/>
             </td>
           </tr>
-          <tr>
+          <tr class="odd">
             <th>Current time:</th>
             <td>
               <xsl:value-of select="server/current-time"/>
             </td>
           </tr>
-          <tr>
+          <tr class="even">
             <th>Server version:</th>
             <td>
               <xsl:value-of select="server/version"/>
           <table class="counters">
             <xsl:for-each select="server/counters[@type=&quot;opcode&quot;]/counter[. &gt; 0 or substring(@name,1,3) != 'RES']">
               <xsl:sort select="." data-type="number" order="descending"/>
-              <tr>
+                <xsl:variable name="css-class0">
+                  <xsl:choose>
+                    <xsl:when test="position() mod 2 = 0">even</xsl:when>
+                    <xsl:otherwise>odd</xsl:otherwise>
+                  </xsl:choose>
+                </xsl:variable>
+                <tr class="{$css-class0}">
                 <th>
                   <xsl:value-of select="@name"/>
                 </th>
index 889f004d59cdee8b802e48a69d3ee7613fff270d..5fc8d6c600cb062dd40cc5e63a3ae7f7ed833f38 100644 (file)
@@ -323,25 +323,25 @@ static char xslmsg[] =
        " <hr/>\n"
        " <h2>Server Status</h2>\n"
        " <table class=\"info\">\n"
-       " <tr>\n"
+       " <tr class=\"odd\">\n"
        " <th>Boot time:</th>\n"
        " <td>\n"
        " <xsl:value-of select=\"server/boot-time\"/>\n"
        " </td>\n"
        " </tr>\n"
-       " <tr>\n"
+       " <tr class=\"even\">\n"
        " <th>Last reconfigured:</th>\n"
        " <td>\n"
        " <xsl:value-of select=\"server/config-time\"/>\n"
        " </td>\n"
        " </tr>\n"
-       " <tr>\n"
+       " <tr class=\"odd\">\n"
        " <th>Current time:</th>\n"
        " <td>\n"
        " <xsl:value-of select=\"server/current-time\"/>\n"
        " </td>\n"
        " </tr>\n"
-       " <tr>\n"
+       " <tr class=\"even\">\n"
        " <th>Server version:</th>\n"
        " <td>\n"
        " <xsl:value-of select=\"server/version\"/>\n"
@@ -349,30 +349,6 @@ static char xslmsg[] =
        " </tr>\n"
        " </table>\n"
        " <br/>\n"
-       " <xsl:if test=\"views/view/zones/zone\">\n"
-       " <h2>Configured zones</h2>\n"
-       " <xsl:for-each select=\"views/view\">\n"
-       " <h3>View <xsl:value-of select=\"@name\"/></h3>\n"
-       " <table class=\"zones\">\n"
-       " <thead><tr><th>Zone</th><th>Class</th><th>Type</th><th>Serial</th></tr></thead>\n"
-       " <tbody>\n"
-       " <xsl:for-each select=\"zones/zone\">\n"
-       " <xsl:variable name=\"css-class15\">\n"
-       " <xsl:choose>\n"
-       " <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
-       " <xsl:otherwise>odd</xsl:otherwise>\n"
-       " </xsl:choose>\n"
-       " </xsl:variable>\n"
-       " <tr class=\"{$css-class15}\">\n"
-       " <td><xsl:value-of select=\"@name\"/></td>\n"
-       " <td><xsl:value-of select=\"@rdataclass\"/></td>\n"
-       " <td><xsl:value-of select=\"type\"/></td>\n"
-       " <td><xsl:value-of select=\"serial\"/></td></tr>\n"
-       " </xsl:for-each>\n"
-       " </tbody>\n"
-       " </table>\n"
-       " </xsl:for-each>\n"
-       " </xsl:if>\n"
        " <xsl:if test=\"server/counters[@type=&quot;opcode&quot;]/counter[. &gt; 0]\">\n"
        " <xsl:if test=\"system-property('xsl:vendor')!='Transformiix'\">\n"
        " <h2>Incoming Requests by DNS Opcode</h2>\n"
@@ -384,7 +360,13 @@ static char xslmsg[] =
        " <table class=\"counters\">\n"
        " <xsl:for-each select=\"server/counters[@type=&quot;opcode&quot;]/counter[. &gt; 0 or substring(@name,1,3) != 'RES']\">\n"
        " <xsl:sort select=\".\" data-type=\"number\" order=\"descending\"/>\n"
-       " <tr>\n"
+       " <xsl:variable name=\"css-class0\">\n"
+       " <xsl:choose>\n"
+       " <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
+       " <xsl:otherwise>odd</xsl:otherwise>\n"
+       " </xsl:choose>\n"
+       " </xsl:variable>\n"
+       " <tr class=\"{$css-class0}\">\n"
        " <th>\n"
        " <xsl:value-of select=\"@name\"/>\n"
        " </th>\n"
@@ -782,35 +764,29 @@ static char xslmsg[] =
        " </table>\n"
        " <br/>\n"
        " </xsl:if>\n"
+       " <xsl:if test=\"views/view/zones/zone\">\n"
        " <xsl:for-each select=\"views/view\">\n"
-       " <xsl:if test=\"zones/zone\">\n"
        " <h3>Zones for View <xsl:value-of select=\"@name\"/></h3>\n"
        " <table class=\"zones\">\n"
-       " <tr>\n"
-       " <th>Name</th>\n"
-       " <th>Class</th>\n"
-       " <th>Type</th>\n"
-       " <th>Serial</th>\n"
-       " </tr>\n"
+       " <thead><tr><th>Name</th><th>Class</th><th>Type</th><th>Serial</th></tr></thead>\n"
+       " <tbody>\n"
        " <xsl:for-each select=\"zones/zone\">\n"
-       " <tr>\n"
-       " <td>\n"
-       " <xsl:value-of select=\"@name\"/>\n"
-       " </td>\n"
-       " <td>\n"
-       " <xsl:value-of select=\"@rdataclass\"/>\n"
-       " </td>\n"
-       " <td>\n"
-       " <xsl:value-of select=\"type\"/>\n"
-       " </td>\n"
-       " <td>\n"
-       " <xsl:value-of select=\"serial\"/>\n"
-       " </td>\n"
-       " </tr>\n"
+       " <xsl:variable name=\"css-class15\">\n"
+       " <xsl:choose>\n"
+       " <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
+       " <xsl:otherwise>odd</xsl:otherwise>\n"
+       " </xsl:choose>\n"
+       " </xsl:variable>\n"
+       " <tr class=\"{$css-class15}\">\n"
+       " <td><xsl:value-of select=\"@name\"/></td>\n"
+       " <td><xsl:value-of select=\"@rdataclass\"/></td>\n"
+       " <td><xsl:value-of select=\"type\"/></td>\n"
+       " <td><xsl:value-of select=\"serial\"/></td></tr>\n"
        " </xsl:for-each>\n"
+       " </tbody>\n"
        " </table>\n"
-       " </xsl:if>\n"
        " </xsl:for-each>\n"
+       " </xsl:if>\n"
        " <xsl:if test=\"views/view[zones/zone/counters[@type=&quot;qtype&quot;]/counter &gt;0]\">\n"
        " <h2>Received QTYPES per view/zone</h2>\n"
        " <xsl:for-each select=\"views/view[zones/zone/counters[@type=&quot;qtype&quot;]/counter &gt;0]\">\n"