</tr>
</table>
<br/>
- <xsl:if test="views/view/zones/zone">
- <h2>Configured zones</h2>
- <xsl:for-each select="views/view">
- <h3>View <xsl:value-of select="@name"/></h3>
- <table class="zones">
- <thead><tr><th>Zone</th><th>Class</th><th>Type</th><th>Serial</th></tr></thead>
- <tbody>
- <xsl:for-each select="zones/zone">
- <xsl:variable name="css-class15">
- <xsl:choose>
- <xsl:when test="position() mod 2 = 0">even</xsl:when>
- <xsl:otherwise>odd</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <tr class="{$css-class15}">
- <td><xsl:value-of select="@name"/></td>
- <td><xsl:value-of select="@rdataclass"/></td>
- <td><xsl:value-of select="type"/></td>
- <td><xsl:value-of select="serial"/></td></tr>
- </xsl:for-each>
- </tbody>
- </table>
- </xsl:for-each>
- </xsl:if>
<xsl:if test="server/counters[@type="opcode"]/counter[. > 0]">
<xsl:if test="system-property('xsl:vendor')!='Transformiix'">
<h2>Incoming Requests by DNS Opcode</h2>
</table>
<br/>
</xsl:if>
- <xsl:for-each select="views/view">
- <xsl:if test="zones/zone">
+ <xsl:if test="views/view/zones/zone">
+ <xsl:for-each select="views/view">
<h3>Zones for View <xsl:value-of select="@name"/></h3>
<table class="zones">
- <tr>
- <th>Name</th>
- <th>Class</th>
- <th>Type</th>
- <th>Serial</th>
- </tr>
- <xsl:for-each select="zones/zone">
- <tr>
- <td>
- <xsl:value-of select="@name"/>
- </td>
- <td>
- <xsl:value-of select="@rdataclass"/>
- </td>
- <td>
- <xsl:value-of select="type"/>
- </td>
- <td>
- <xsl:value-of select="serial"/>
- </td>
- </tr>
- </xsl:for-each>
+ <thead><tr><th>Name</th><th>Class</th><th>Type</th><th>Serial</th></tr></thead>
+ <tbody>
+ <xsl:for-each select="zones/zone">
+ <xsl:variable name="css-class15">
+ <xsl:choose>
+ <xsl:when test="position() mod 2 = 0">even</xsl:when>
+ <xsl:otherwise>odd</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <tr class="{$css-class15}">
+ <td><xsl:value-of select="@name"/></td>
+ <td><xsl:value-of select="@rdataclass"/></td>
+ <td><xsl:value-of select="type"/></td>
+ <td><xsl:value-of select="serial"/></td></tr>
+ </xsl:for-each>
+ </tbody>
</table>
- </xsl:if>
- </xsl:for-each>
+ </xsl:for-each>
+ </xsl:if>
<xsl:if test="views/view[zones/zone/counters[@type="qtype"]/counter >0]">
<h2>Received QTYPES per view/zone</h2>
<xsl:for-each select="views/view[zones/zone/counters[@type="qtype"]/counter >0]">
" <xsl:template match=\"statistics[@version="3.11"]\">\n"
" <html>\n"
" <head>\n"
+ " <script type=\"text/javascript\" src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js\"></script>\n"
+ " <script type=\"text/javascript\">\n"
+ " $(function($) {\n"
+ " var wid=0;\n"
+ " $('table.zones').each(function(i) { if( $(this).width() > wid ) wid = $(this).width(); return true; });\n"
+ " $('table.zones').css('min-width', wid );\n"
+ " });\n"
+ " </script>\n"
+ "\n"
" <xsl:if test=\"system-property('xsl:vendor')!='Transformiix'\">\n"
" <!-- Non Mozilla specific markup -->\n"
" <script type=\"text/javascript\" src=\"https://www.google.com/jsapi\"/>\n"
" background-color: rgb(1,169,206);\n"
" color: #ffffff;\n"
" }\n"
+ " table.zones {\n"
+ " border: 1px solid grey;\n"
+ " }\n"
+ " table.zones td {\n"
+ " text-align: right;\n"
+ " font-family: monospace;\n"
+ " }\n"
+ " table.zones td:nth-child(2) {\n"
+ " text-align: center;\n"
+ " }\n"
+ " table.zones td:nth-child(3) {\n"
+ " text-align: left;\n"
+ " }\n"
+ " table.zones tr:hover{\n"
+ " background-color: #99ddff;\n"
+ " }\n"
"\n"
" td, th {\n"
" padding-right: 5px;\n"
" </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="opcode"]/counter[. > 0]\">\n"
" <xsl:if test=\"system-property('xsl:vendor')!='Transformiix'\">\n"
" <h2>Incoming Requests by DNS Opcode</h2>\n"
" <br/>\n"
" </xsl:if>\n"
" </xsl:for-each>\n"
- " <xsl:if test=\"traffic/udp/counters[@type="request-size"]/counter[.>0] or traffic/udp/counters[@type="response-size"]/counter[.>0] or traffic/tcp/counters[@type="request-size"]/counter[.>0] or traffic/tcp/counters[@type="response-size"]/counter[.>0]\">\n"
+ " <xsl:if test=\"traffic//udp/counters[@type="request-size"]/counter[.>0] or traffic//udp/counters[@type="response-size"]/counter[.>0] or traffic//tcp/counters[@type="request-size"]/counter[.>0] or traffic//tcp/counters[@type="response-size"]/counter[.>0]\">\n"
" <h2>Traffic Size Statistics</h2>\n"
" </xsl:if>\n"
- " <xsl:if test=\"traffic/udp/counters[@type="request-size"]/counter[.>0]\">\n"
+ " <xsl:if test=\"traffic//udp/counters[@type="request-size"]/counter[.>0]\">\n"
" <h4>UDP Requests Received</h4>\n"
" <table class=\"counters\">\n"
- " <xsl:for-each select=\"traffic/udp/counters[@type="request-size"]/counter[.>0]\">\n"
+ " <xsl:for-each select=\"traffic//udp/counters[@type="request-size"]/counter[.>0]\">\n"
" <xsl:variable name=\"css-class7\">\n"
" <xsl:choose>\n"
" <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
" </xsl:choose>\n"
" </xsl:variable>\n"
" <tr class=\"{$css-class7}\">\n"
+ " <th><xsl:value-of select=\"local-name(../../..)\"/></th>\n"
" <th>\n"
" <xsl:value-of select=\"@name\"/>\n"
" </th>\n"
" </table>\n"
" <br/>\n"
" </xsl:if>\n"
- " <xsl:if test=\"traffic/udp/counters[@type="response-size"]/counter[.>0]\">\n"
+ " <xsl:if test=\"traffic//udp/counters[@type="response-size"]/counter[.>0]\">\n"
" <h4>UDP Responses Sent</h4>\n"
" <table class=\"counters\">\n"
- " <xsl:for-each select=\"traffic/udp/counters[@type="response-size"]/counter[.>0]\">\n"
+ " <xsl:for-each select=\"traffic//udp/counters[@type="response-size"]/counter[.>0]\">\n"
" <xsl:variable name=\"css-class7\">\n"
" <xsl:choose>\n"
" <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
" </xsl:choose>\n"
" </xsl:variable>\n"
" <tr class=\"{$css-class7}\">\n"
+ " <th><xsl:value-of select=\"local-name(../../..)\"/></th>\n"
" <th>\n"
" <xsl:value-of select=\"@name\"/>\n"
" </th>\n"
" </table>\n"
" <br/>\n"
" </xsl:if>\n"
- " <xsl:if test=\"traffic/tcp/counters[@type="request-size"]/counter[.>0]\">\n"
+ " <xsl:if test=\"traffic//tcp/counters[@type="request-size"]/counter[.>0]\">\n"
" <h4>TCP Requests Received</h4>\n"
" <table class=\"counters\">\n"
- " <xsl:for-each select=\"traffic/tcp/counters[@type="request-size"]/counter[.>0]\">\n"
+ " <xsl:for-each select=\"traffic//tcp/counters[@type="request-size"]/counter[.>0]\">\n"
" <xsl:variable name=\"css-class7\">\n"
" <xsl:choose>\n"
" <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
" </xsl:choose>\n"
" </xsl:variable>\n"
" <tr class=\"{$css-class7}\">\n"
+ " <th><xsl:value-of select=\"local-name(../../..)\"/></th>\n"
" <th>\n"
" <xsl:value-of select=\"@name\"/>\n"
" </th>\n"
" </table>\n"
" <br/>\n"
" </xsl:if>\n"
- " <xsl:if test=\"traffic/tcp/counters[@type="response-size"]/counter[.>0]\">\n"
+ " <xsl:if test=\"traffic//tcp/counters[@type="response-size"]/counter[.>0]\">\n"
" <h4>TCP Responses Sent</h4>\n"
" <table class=\"counters\">\n"
- " <xsl:for-each select=\"traffic/tcp/counters[@type="response-size"]/counter[.>0]\">\n"
+ " <xsl:for-each select=\"traffic//tcp/counters[@type="response-size"]/counter[.>0]\">\n"
" <xsl:variable name=\"css-class7\">\n"
" <xsl:choose>\n"
" <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
" </xsl:choose>\n"
" </xsl:variable>\n"
" <tr class=\"{$css-class7}\">\n"
+ " <th><xsl:value-of select=\"local-name(../../..)\"/></th>\n"
" <th>\n"
" <xsl:value-of select=\"@name\"/>\n"
" </th>\n"