2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

add odd/even shading to the remaining tables

This commit is contained in:
Evan Hunt
2019-06-26 14:00:49 -07:00
parent eaba8dd799
commit ce3907e9fe
2 changed files with 38 additions and 56 deletions

View File

@@ -318,25 +318,25 @@
<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"/>
@@ -355,7 +355,13 @@
<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>

View 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"