]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[v9_9] use correct newstats XSL
authorEvan Hunt <each@isc.org>
Fri, 8 Feb 2013 20:15:23 +0000 (12:15 -0800)
committerEvan Hunt <each@isc.org>
Fri, 8 Feb 2013 20:23:34 +0000 (12:23 -0800)
CHANGES
bin/named/Makefile.in
bin/named/bind9.ver3.xsl
bin/named/bind9.ver3.xsl.h
bin/named/statschannel.c
configure.in

diff --git a/CHANGES b/CHANGES
index 4c395050c31886708c688358e9f2aeb1c3c029b7..0bf38d7b72e255c000de6720150568f52b5171e9 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+3483.  [bug]           Corrected XSL code in use with --enable-newstats.
+                       [RT #32587]
+
 3481.  [cleanup]       removed use of const const in atf
 
 3480.  [bug]           Silence logging noise when setting up zone
index 449cdca3c37982b28ea8cfca78e1c4e592738e10..ccea28f6294a314aacfbcf2ac1232368c36a70d8 100644 (file)
@@ -155,8 +155,11 @@ maintainer-clean::
 bind9.xsl.h: bind9.xsl ${srcdir}/convertxsl.pl
        ${PERL} ${srcdir}/convertxsl.pl < ${srcdir}/bind9.xsl > bind9.xsl.h
 
-depend: bind9.xsl.h
-statschannel.@O@: bind9.xsl.h
+bind9.ver3.xsl.h: bind9.ver3.xsl ${srcdir}/convertxsl.pl
+       ${PERL} ${srcdir}/convertxsl.pl < ${srcdir}/bind9.ver3.xsl > bind9.ver3.xsl.h
+
+depend: bind9.xsl.h bind9.ver3.xsl.h
+statschannel.@O@: bind9.xsl.h bind9.ver3.xsl.h
 
 installdirs:
        $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${sbindir}
index af6c0ac5cead7285d5905500ff9f6e22bb8c43f3..c10d4a320ee7dace9511caaeb12c4c1dc1e2084b 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
- - Copyright (C) 2012  Internet Systems Consortium, Inc. ("ISC")
+ - Copyright (C) 2006-2009 Internet Systems Consortium, Inc. ("ISC")
  -
  - Permission to use, copy, modify, and/or distribute this software for any
  - purpose with or without fee is hereby granted, provided that the above
  -
  - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
  - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- - AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
  - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  - PERFORMANCE OF THIS SOFTWARE.
 -->
-
-<!-- $Id: bind9.xsl,v 1.21 2009/01/27 23:47:54 tbox Exp $ -->
-
-<xsl:stylesheet version="1.0"
-   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-   xmlns="http://www.w3.org/1999/xhtml">
-  <xsl:template match="isc/bind/statistics">
-    <html>
-      <head>
-        <style type="text/css">
-body {
-       font-family: sans-serif;
-       background-color: #ffffff;
-       color: #000000;
-}
-
-table {
-       border-collapse: collapse;
-}
-
-tr.rowh {
-       text-align: center;
-       border: 1px solid #000000;
-       background-color: #8080ff;
-       color: #ffffff;
-}
-
-tr.row {
-       text-align: right;
-       border: 1px solid #000000;
-       background-color: teal;
-       color: #ffffff;
-}
-
-tr.lrow {
-       text-align: left;
-       border: 1px solid #000000;
-       background-color: teal;
-       color: #ffffff;
-}
-
-td, th {
-       padding-right: 5px;
-       padding-left: 5px;
-}
-
-.header h1 {
-       background-color: teal;
-       color: #ffffff;
-       padding: 4px;
-}
-
-.content {
-       background-color: #ffffff;
-       color: #000000;
-       padding: 4px;
-}
-
-.item {
-       padding: 4px;
-       align: right;
-}
-
-.value {
-       padding: 4px;
-       font-weight: bold;
-}
-
-div.statcounter h2 {
-       text-align: center;
-       font-size: large;
-       border: 1px solid #000000;
-       background-color: #8080ff;
-       color: #ffffff;
-}
-
-div.statcounter dl {
-       float: left;
-       margin-top: 0;
-       margin-bottom: 0;
-       margin-left: 0;
-       margin-right: 0;
-}
-
-div.statcounter dt {
-       width: 200px;
-       text-align: center;
-       font-weight: bold;
-       border: 0.5px solid #000000;
-       background-color: #8080ff;
-       color: #ffffff;
-}
-
-div.statcounter dd {
-       width: 200px;
-       text-align: right;
-       border: 0.5px solid #000000;
-       background-color: teal;
-       color: #ffffff;
-       margin-left: 0;
-       margin-right: 0;
-}
-
-div.statcounter br {
-       clear: left;
-}
-        </style>
-        <title>BIND 9 Statistics</title>
-      </head>
-      <body>
-       <div class="header">
-         <h1>Bind 9 Configuration and Statistics</h1>
-       </div>
-
-       <br/>
-
-       <table>
-         <tr class="rowh"><th colspan="2">Times</th></tr>
-         <tr class="lrow">
-           <td>boot-time</td>
-           <td><xsl:value-of select="server/boot-time"/></td>
-         </tr>
-         <tr class="lrow">
-           <td>current-time</td>
-           <td><xsl:value-of select="server/current-time"/></td>
-         </tr>
-       </table>
-
-       <br/>
-
-       <table>
-         <tr class="rowh"><th colspan="2">Incoming Requests</th></tr>
-         <xsl:for-each select="server/requests/opcode">
-           <tr class="lrow">
-             <td><xsl:value-of select="name"/></td>
-             <td><xsl:value-of select="counter"/></td>
-           </tr>
-         </xsl:for-each>
-       </table>
-
-       <br/>
-
-       <table>
-         <tr class="rowh"><th colspan="2">Incoming Queries</th></tr>
-         <xsl:for-each select="server/queries-in/rdtype">
-           <tr class="lrow">
-             <td><xsl:value-of select="name"/></td>
-             <td><xsl:value-of select="counter"/></td>
-           </tr>
-         </xsl:for-each>
-       </table>
-
-       <br/>
-
-       <xsl:for-each select="views/view">
-         <table>
-           <tr class="rowh">
-             <th colspan="2">Outgoing Queries from View <xsl:value-of select="name"/></th>
-           </tr>
-           <xsl:for-each select="rdtype">
-             <tr class="lrow">
-               <td><xsl:value-of select="name"/></td>
-               <td><xsl:value-of select="counter"/></td>
-             </tr>
-           </xsl:for-each>
-         </table>
-         <br/>
-       </xsl:for-each>
-
-       <br/>
-
-       <div class="statcounter">
-         <h2>Server Statistics</h2>
-         <xsl:for-each select="server/nsstat">
-           <dl>
-             <dt><xsl:value-of select="name"/></dt>
-             <dd><xsl:value-of select="counter"/></dd>
-           </dl>
-         </xsl:for-each>
-         <br/>
-       </div>
-
-       <div class="statcounter">
-         <h2>Zone Maintenance Statistics</h2>
-         <xsl:for-each select="server/zonestat">
-           <dl>
-             <dt><xsl:value-of select="name"/></dt>
-             <dd><xsl:value-of select="counter"/></dd>
-           </dl>
-         </xsl:for-each>
-         <br />
-       </div>
-
-       <div class="statcounter">
-         <h2>Resolver Statistics (Common)</h2>
-         <xsl:for-each select="server/resstat">
-           <dl>
-             <dt><xsl:value-of select="name"/></dt>
-             <dd><xsl:value-of select="counter"/></dd>
-           </dl>
-         </xsl:for-each>
-         <br />
-       </div>
-
-       <xsl:for-each select="views/view">
-         <div class="statcounter">
-           <h2>Resolver Statistics for View <xsl:value-of select="name"/></h2>
-           <xsl:for-each select="resstat">
-             <dl>
-               <dt><xsl:value-of select="name"/></dt>
-               <dd><xsl:value-of select="counter"/></dd>
-             </dl>
-           </xsl:for-each>
-           <br />
-         </div>
-       </xsl:for-each>
-
-       <br />
-
-       <div class="statcounter">
-         <h2>ADB Statistics (Common)</h2>
-         <xsl:for-each select="server/adbstat">
-           <dl>
-             <dt><xsl:value-of select="name"/></dt>
-             <dd><xsl:value-of select="counter"/></dd>
-           </dl>
-         </xsl:for-each>
-         <br />
-       </div>
-
-       <xsl:for-each select="views/view">
-         <div class="statcounter">
-           <h2>ADB Statistics for View <xsl:value-of select="name"/></h2>
-           <xsl:for-each select="adbstat">
-             <dl>
-               <dt><xsl:value-of select="name"/></dt>
-               <dd><xsl:value-of select="counter"/></dd>
-             </dl>
-           </xsl:for-each>
-           <br />
-         </div>
-       </xsl:for-each>
-
-       <br />
-
-       <xsl:for-each select="views/view">
-         <table>
-           <tr class="rowh">
-             <th colspan="2">Cache Statistics for View <xsl:value-of select="name"/></th>
-           </tr>
-            <xsl:for-each select="cachestats/cachestat">
-             <tr class="lrow">
-               <td><xsl:value-of select="name"/></td>
-               <td><xsl:value-of select="value"/></td>
-             </tr>
-           </xsl:for-each>
-         </table>
-         <br/>
-       </xsl:for-each>
-
-       <xsl:for-each select="views/view">
-         <table>
-           <tr class="rowh">
-             <th colspan="2">Cache DB RRsets for View <xsl:value-of select="name"/></th>
-           </tr>
-           <xsl:for-each select="cache/rrset">
-             <tr class="lrow">
-               <td><xsl:value-of select="name"/></td>
-               <td><xsl:value-of select="counter"/></td>
-             </tr>
-           </xsl:for-each>
-         </table>
-         <br/>
-       </xsl:for-each>
-
-       <div class="statcounter">
-         <h2>Socket I/O Statistics</h2>
-         <xsl:for-each select="server/sockstat">
-           <dl>
-             <dt><xsl:value-of select="name"/></dt>
-             <dd><xsl:value-of select="counter"/></dd>
-           </dl>
-         </xsl:for-each>
-         <br/>
-       </div>
-
-       <br/>
-
-        <xsl:for-each select="views/view">
-          <table>
-            <tr class="rowh">
-              <th colspan="10">Zones for View <xsl:value-of select="name"/></th>
-            </tr>
-            <tr class="rowh">
-              <th>Name</th>
-              <th>Class</th>
-              <th>Serial</th>
-              <th>Success</th>
-              <th>Referral</th>
-              <th>NXRRSET</th>
-              <th>NXDOMAIN</th>
-              <th>Failure</th>
-             <th>XfrReqDone</th>
-             <th>XfrRej</th>
-            </tr>
-            <xsl:for-each select="zones/zone">
-              <tr class="lrow">
-                <td>
-                  <xsl:value-of select="name"/>
-                </td>
-                <td>
-                  <xsl:value-of select="rdataclass"/>
-                </td>
-                <td>
-                  <xsl:value-of select="serial"/>
-                </td>
-                <td>
-                  <xsl:value-of select="counters/QrySuccess"/>
-                </td>
-                <td>
-                  <xsl:value-of select="counters/QryReferral"/>
-                </td>
-                <td>
-                  <xsl:value-of select="counters/QryNxrrset"/>
-                </td>
-                <td>
-                  <xsl:value-of select="counters/QryNXDOMAIN"/>
-                </td>
-                <td>
-                  <xsl:value-of select="counters/QryFailure"/>
-                </td>
-                <td>
-                  <xsl:value-of select="counters/XfrReqDone"/>
-                </td>
-                <td>
-                  <xsl:value-of select="counters/XfrRej"/>
-                </td>
-              </tr>
-            </xsl:for-each>
-          </table>
-          <br/>
-        </xsl:for-each>
-
-        <br/>
-
-        <table>
-          <tr class="rowh">
-            <th colspan="7">Network Status</th>
-          </tr>
-          <tr class="rowh">
-            <th>ID</th>
-           <th>Name</th>
-            <th>Type</th>
-            <th>References</th>
-            <th>LocalAddress</th>
-            <th>PeerAddress</th>
-            <th>State</th>
-          </tr>
-          <xsl:for-each select="socketmgr/sockets/socket">
-            <tr class="lrow">
-              <td>
-                <xsl:value-of select="id"/>
-              </td>
-              <td>
-                <xsl:value-of select="name"/>
-              </td>
-              <td>
-                <xsl:value-of select="type"/>
-              </td>
-              <td>
-                <xsl:value-of select="references"/>
-              </td>
-              <td>
-                <xsl:value-of select="local-address"/>
-              </td>
-              <td>
-                <xsl:value-of select="peer-address"/>
-              </td>
-              <td>
-                <xsl:for-each select="states">
-                  <xsl:value-of select="."/>
-                </xsl:for-each>
-              </td>
-            </tr>
-          </xsl:for-each>
-        </table>
-        <br/>
-        <table>
-          <tr class="rowh">
-            <th colspan="2">Task Manager Configuration</th>
-          </tr>
-          <tr class="lrow">
-            <td>Thread-Model</td>
-            <td>
-              <xsl:value-of select="taskmgr/thread-model/type"/>
-            </td>
-          </tr>
-          <tr class="lrow">
-            <td>Worker Threads</td>
-            <td>
-              <xsl:value-of select="taskmgr/thread-model/worker-threads"/>
-            </td>
-          </tr>
-          <tr class="lrow">
-            <td>Default Quantum</td>
-            <td>
-              <xsl:value-of select="taskmgr/thread-model/default-quantum"/>
-            </td>
-          </tr>
-          <tr class="lrow">
-            <td>Tasks Running</td>
-            <td>
-              <xsl:value-of select="taskmgr/thread-model/tasks-running"/>
-            </td>
-          </tr>
-          <tr class="lrow">
-            <td>Tasks Ready</td>
-            <td>
-              <xsl:value-of select="taskmgr/thread-model/tasks-ready"/>
-            </td>
-          </tr>
-        </table>
-        <br/>
-        <table>
-          <tr class="rowh">
-            <th colspan="6">Tasks</th>
-          </tr>
-          <tr class="rowh">
-            <th>ID</th>
-            <th>Name</th>
-            <th>References</th>
-            <th>State</th>
-            <th>Quantum</th>
-            <th>Events</th>
-          </tr>
-          <xsl:for-each select="taskmgr/tasks/task">
-            <tr class="lrow">
-              <td>
-                <xsl:value-of select="id"/>
-              </td>
-              <td>
-                <xsl:value-of select="name"/>
-              </td>
-              <td>
-                <xsl:value-of select="references"/>
-              </td>
-              <td>
-                <xsl:value-of select="state"/>
-              </td>
-              <td>
-                <xsl:value-of select="quantum"/>
-              </td>
-              <td>
-                <xsl:value-of select="events"/>
-              </td>
-            </tr>
-          </xsl:for-each>
-        </table>
-       <br />
-       <table>
-          <tr class="rowh">
-            <th colspan="4">Memory Usage Summary</th>
-          </tr>
-         <xsl:for-each select="memory/summary/*">
-           <tr class="lrow">
-             <td><xsl:value-of select="name()"/></td>
-             <td><xsl:value-of select="."/></td>
-           </tr>
-         </xsl:for-each>
-       </table>
-       <br />
-       <table>
-          <tr class="rowh">
-            <th colspan="10">Memory Contexts</th>
-          </tr>
-         <tr class="rowh">
-           <th>ID</th>
-           <th>Name</th>
-           <th>References</th>
-           <th>TotalUse</th>
-           <th>InUse</th>
-           <th>MaxUse</th>
-           <th>BlockSize</th>
-           <th>Pools</th>
-           <th>HiWater</th>
-           <th>LoWater</th>
-         </tr>
-         <xsl:for-each select="memory/contexts/context">
-           <tr class="lrow">
-             <td>
-               <xsl:value-of select="id"/>
-             </td>
-              <td>
-                <xsl:value-of select="name"/>
-              </td>
-             <td>
-               <xsl:value-of select="references"/>
-             </td>
-             <td>
-               <xsl:value-of select="total"/>
-             </td>
-             <td>
-               <xsl:value-of select="inuse"/>
-             </td>
-             <td>
-               <xsl:value-of select="maxinuse"/>
-             </td>
-             <td>
-               <xsl:value-of select="blocksize"/>
-             </td>
-             <td>
-               <xsl:value-of select="pools"/>
-             </td>
-             <td>
-               <xsl:value-of select="hiwater"/>
-             </td>
-             <td>
-               <xsl:value-of select="lowater"/>
-             </td>
-           </tr>
-         </xsl:for-each>
-       </table>
-
-      </body>
-    </html>
-  </xsl:template>
+<!-- %Id: bind9.xsl,v 1.21 2009/01/27 23:47:54 tbox Exp % -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
+ <xsl:output method="html" indent="yes" version="4.0"/>
+ <xsl:template match="statistics[@version=&quot;3.0&quot;]">
+ <html>
+ <head>
+ <xsl:if test="system-property('xsl:vendor')!='Transformiix'">
+ <!-- Non Mozilla specific markup -->
+ <script type="text/javascript" src="https://www.google.com/jsapi"/>
+ <script type="text/javascript">
+ google.load("visualization", "1", {packages:["corechart"]});
+ google.setOnLoadCallback(loadGraphs);
+
+ var graphs=[];
+ function drawChart(chart_title,target,data) {
+ var data = google.visualization.arrayToDataTable(data);
+
+ var options = {
+ title: chart_title
+ };
+ var chart = new google.visualization.BarChart(document.getElementById(target));
+ chart.draw(data, options);
+ }
+ function loadGraphs(){
+ //alert("here we are!");
+ var g;
+ // Server Incoming query Types
+ while(g = graphs.shift()){
+ // alert("going for: " + g.target);
+ drawChart(g.title,g.target,g.data);
+ }
+ }
+ // Server Incoming Queries Types 
+ graphs.push({
+ 'title' : "Server Incoming Query Types",
+ 'target': 'chart_incoming_qtypes',
+ 'data': [['Type','Counter'],<xsl:for-each select="server/counters[@type=&quot;qtype&quot;]/counter">['<xsl:value-of select="@name"/>',<xsl:value-of select="."/>],</xsl:for-each>]
+ });
+
+
+ // Server Incoming Requests 
+ graphs.push({
+ 'title' : "Server Incoming Requests",
+ 'target': 'chart_incoming_requests',
+ 'data': [['Requests','Counter'],<xsl:for-each select="server/counters[@type=&quot;opcode&quot;]/counter">['<xsl:value-of select="@name"/>',<xsl:value-of select="."/>],</xsl:for-each>]});
+ </script>
+ </xsl:if>
+ <style type="text/css">
+ body {
+ font-family: sans-serif;
+ background-color: #ffffff;
+ color: #000000;
+ font-size: 10pt;
+ }
+ .odd{
+ background-color: #f0f0f0;
+ }
+ .even{
+ background-color: #ffffff;
+ }
+ p.footer{
+ font-style:italic;
+ color: grey;
+ }
+
+ table {
+ border-collapse: collapse;
+ border: 1px solid grey;
+ }
+
+ table.counters{
+ border: 1px solid grey;
+ width: 500px;
+ }
+ table.counters th {
+ text-align: center;
+ border: 1px solid grey;
+ width: 120px;
+ }
+ table.counters td{
+ text-align:center;
+ }
+ table.counters tr:hover{
+ background-color: #99ddff;
+ }
+ .totals {
+ background-color: rgb(1,169,206);
+ color: #ffffff;
+ }
+
+ td, th {
+ padding-right: 5px;
+ padding-left: 5px;
+ border: 1px solid grey;
+ }
+
+ .header h1 {
+ color: rgb(1,169,206);
+ padding: 0px;
+ }
+
+ .content {
+ background-color: #ffffff;
+ color: #000000;
+ padding: 4px;
+ }
+
+ .item {
+ padding: 4px;
+ text-align: right;
+ }
+
+ .value {
+ padding: 4px;
+ font-weight: bold;
+ }
+
+
+ h2 {
+ color: grey;
+ font-size: 14pt;
+ width:500px;
+ text-align:center;
+ }
+ h3 {
+ color: #444444;
+ font-size: 12pt;
+ width:500px;
+ text-align:center;
+ }
+ h4 {
+ color: rgb(1,169,206);
+ font-size: 10pt;
+ width:500px;
+ text-align:center;
+ }
+
+ .pie {
+ width:500px;
+ height: 500px;
+ }
+
+ </style>
+ <title>ISC BIND 9 Statistics</title>
+ </head>
+ <body>
+ <div class="header">
+ <h1>ISC Bind 9 Configuration and Statistics</h1>
+ </div>
+ <hr/>
+ <h2>Server Times</h2>
+ <table class="counters">
+ <tr>
+ <th>Boot time:</th>
+ <td>
+ <xsl:value-of select="server/boot-time"/>
+ </td>
+ </tr>
+ <tr>
+ <th>Sample time:</th>
+ <td>
+ <xsl:value-of select="server/current-time"/>
+ </td>
+ </tr>
+ </table>
+ <br/>
+ <h2>Incoming Requests</h2>
+ <xsl:if test="system-property('xsl:vendor')!='Transformiix'">
+ <!-- Non Mozilla specific markup -->
+ <div class="pie" id="chart_incoming_requests">[graph incoming requests]</div>
+ </xsl:if>
+ <table class="counters">
+ <xsl:for-each select="server/counters[@type=&quot;opcode&quot;]/counter">
+ <xsl:sort select="." data-type="number" order="descending"/>
+ <tr>
+ <th>
+ <xsl:value-of select="@name"/>
+ </th>
+ <td>
+ <xsl:value-of select="."/>
+ </td>
+ </tr>
+ </xsl:for-each>
+ <tr>
+ <th class="totals">Total:</th>
+ <td class="totals">
+ <xsl:value-of select="sum(server/counters[@type=&quot;opcode&quot;]/counter)"/>
+ </td>
+ </tr>
+ </table>
+ <br/>
+ <h3>Incoming Queries by Type</h3>
+ <xsl:if test="system-property('xsl:vendor')!='Transformiix'">
+ <!-- Non Mozilla specific markup -->
+ <div class="pie" id="chart_incoming_qtypes">[graph incoming qtypes]</div>
+ </xsl:if>
+ <table class="counters">
+ <xsl:for-each select="server/counters[@type=&quot;qtype&quot;]/counter">
+ <xsl:sort select="." data-type="number" order="descending"/>
+ <xsl:variable name="css-class">
+ <xsl:choose>
+ <xsl:when test="position() mod 2 = 0">even</xsl:when>
+ <xsl:otherwise>odd</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <tr class="{$css-class}">
+ <th>
+ <xsl:value-of select="@name"/>
+ </th>
+ <td>
+ <xsl:value-of select="."/>
+ </td>
+ </tr>
+ </xsl:for-each>
+ <tr>
+ <th class="totals">Total:</th>
+ <td class="totals">
+ <xsl:value-of select="sum(server/counters[@type=&quot;qtype&quot;]/counter)"/>
+ </td>
+ </tr>
+ </table>
+ <br/>
+ <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>
+ <xsl:if test="system-property('xsl:vendor')!='Transformiix'">
+ <!-- Non Mozilla specific markup -->
+ <script type="text/javascript">
+ graphs.push({
+ 'title': "Outgoing queries for view: <xsl:value-of select="@name"/>",
+ 'target': 'chart_outgoing_queries_view_<xsl:value-of select="@name"/>',
+ 'data': [['Type','Counter'],<xsl:for-each select="counters[@type=&quot;resqtype&quot;]/counter">['<xsl:value-of select="@name"/>',<xsl:value-of select="."/>],</xsl:for-each>]
+ });
+ </script>
+ <xsl:variable name="target">
+ <xsl:value-of select="@name"/>
+ </xsl:variable>
+ <div class="pie" id="chart_outgoing_queries_view_{$target}"/>
+ </xsl:if>
+ <table class="counters">
+ <xsl:for-each select="counters[@type=&quot;resqtype&quot;]/counter">
+ <xsl:sort select="." data-type="number" order="descending"/>
+ <xsl:variable name="css-class1">
+ <xsl:choose>
+ <xsl:when test="position() mod 2 = 0">even</xsl:when>
+ <xsl:otherwise>odd</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <tr class="{$css-class1}">
+ <th>
+ <xsl:value-of select="@name"/>
+ </th>
+ <td>
+ <xsl:value-of select="."/>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ <br/>
+ </xsl:for-each>
+ <h2>Server Statistics</h2>
+ <xsl:if test="system-property('xsl:vendor')!='Transformiix'">
+ <!-- Non Mozilla specific markup -->
+ <script type="text/javascript">
+ graphs.push({
+ 'title' : "Server Response Types",
+ 'target': 'chart_server_nsstat_restype',
+ 'data': [['Type','Counter'],<xsl:for-each select="server/counters[@type=&quot;nsstat&quot;]/counter[.&gt;0]">['<xsl:value-of select="@name"/>',<xsl:value-of select="."/>],</xsl:for-each>]
+ });
+ </script>
+ <div class="pie" id="chart_server_nsstat_restype"/>
+ </xsl:if>
+ <table class="counters">
+ <xsl:for-each select="server/counters[@type=&quot;nsstat&quot;]/counter[.&gt;0]">
+ <xsl:sort select="." data-type="number" order="descending"/>
+ <xsl:variable name="css-class2">
+ <xsl:choose>
+ <xsl:when test="position() mod 2 = 0">even</xsl:when>
+ <xsl:otherwise>odd</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <tr class="{$css-class2}">
+ <th>
+ <xsl:value-of select="@name"/>
+ </th>
+ <td>
+ <xsl:value-of select="."/>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ <br/>
+ <h2>Zone Maintenance Statistics</h2>
+ <xsl:if test="system-property('xsl:vendor')!='Transformiix'">
+ <script type="text/javascript">
+ graphs.push({
+ 'title' : "Zone Maintenance Stats",
+ 'target': 'chart_server_zone_maint',
+ 'data': [['Type','Counter'],<xsl:for-each select="server/counters[@type=&quot;zonestat&quot;]/counter">['<xsl:value-of select="@name"/>',<xsl:value-of select="."/>],</xsl:for-each>]
+ });
+
+ </script>
+ <!-- Non Mozilla specific markup -->
+ <div class="pie" id="chart_server_zone_maint"/>
+ </xsl:if>
+ <table class="counters">
+ <xsl:for-each select="server/counters[@type=&quot;zonestat&quot;]/counter">
+ <xsl:sort select="." data-type="number" order="descending"/>
+ <xsl:variable name="css-class3">
+ <xsl:choose>
+ <xsl:when test="position() mod 2 = 0">even</xsl:when>
+ <xsl:otherwise>odd</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <tr class="{$css-class3}">
+ <th>
+ <xsl:value-of select="@name"/>
+ </th>
+ <td>
+ <xsl:value-of select="."/>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ <h2>Resolver Statistics (Common)</h2>
+ <table class="counters">
+ <xsl:for-each select="server/counters[@type=&quot;restat&quot;]/counter">
+ <xsl:sort select="." data-type="number" order="descending"/>
+ <xsl:variable name="css-class4">
+ <xsl:choose>
+ <xsl:when test="position() mod 2 = 0">even</xsl:when>
+ <xsl:otherwise>odd</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <tr class="{$css-class4}">
+ <th>
+ <xsl:value-of select="@name"/>
+ </th>
+ <td>
+ <xsl:value-of select="."/>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ <xsl:for-each select="views/view">
+ <h3>Resolver Statistics for View <xsl:value-of select="@name"/></h3>
+ <table class="counters">
+ <xsl:for-each select="counters[@type=&quot;resstats&quot;]/counter[.&gt;0]">
+ <xsl:sort select="." data-type="number" order="descending"/>
+ <xsl:variable name="css-class5">
+ <xsl:choose>
+ <xsl:when test="position() mod 2 = 0">even</xsl:when>
+ <xsl:otherwise>odd</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <tr class="{$css-class5}">
+ <th>
+ <xsl:value-of select="@name"/>
+ </th>
+ <td>
+ <xsl:value-of select="."/>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ </xsl:for-each>
+ <h3>Cache DB RRsets for View <xsl:value-of select="@name"/></h3>
+ <xsl:for-each select="views/view">
+ <table class="counters">
+ <xsl:for-each select="cache/rrset">
+ <xsl:variable name="css-class6">
+ <xsl:choose>
+ <xsl:when test="position() mod 2 = 0">even</xsl:when>
+ <xsl:otherwise>odd</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <tr class="{$css-class6}">
+ <th>
+ <xsl:value-of select="name"/>
+ </th>
+ <td>
+ <xsl:value-of select="counter"/>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ <br/>
+ </xsl:for-each>
+ <h2>Socket I/O Statistics</h2>
+ <table class="counters">
+ <xsl:for-each select="server/counters[@type=&quot;sockstat&quot;]/counter[.&gt;0]">
+ <xsl:variable name="css-class7">
+ <xsl:choose>
+ <xsl:when test="position() mod 2 = 0">even</xsl:when>
+ <xsl:otherwise>odd</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <tr class="{$css-class7}">
+ <th>
+ <xsl:value-of select="@name"/>
+ </th>
+ <td>
+ <xsl:value-of select="."/>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ <br/>
+ <br/>
+ <h2>Response Codes per view/zone</h2>
+ <xsl:for-each select="views/view[zones/zone/counters[@type=&quot;rcode&quot;]/counter &gt;0]">
+ <h3>View <xsl:value-of select="@name"/></h3>
+ <xsl:variable name="thisview">
+ <xsl:value-of select="@name"/>
+ </xsl:variable>
+ <xsl:for-each select="zones/zone">
+ <xsl:if test="counters[@type=&quot;rcode&quot;]/counter[. &gt; 0]">
+ <h4>Zone <xsl:value-of select="@name"/></h4>
+ <xsl:if test="system-property('xsl:vendor')!='Transformiix'">
+ <!-- Non Mozilla specific markup -->
+ <script type="text/javascript">
+ graphs.push({
+ 'title': "Response Codes for zone <xsl:value-of select="@name"/>",
+ 'target': 'chart_rescode_<xsl:value-of select="../../@name"/>_<xsl:value-of select="@name"/>',
+ 'data': [['Type','Counter'],<xsl:for-each select="counters[@type=&quot;rcode&quot;]/counter[.&gt;0 and @name != &quot;QryAuthAns&quot;]">['<xsl:value-of select="@name"/>',<xsl:value-of select="."/>],</xsl:for-each>]
+ });
+
+ </script>
+ <xsl:variable name="target">
+ <xsl:value-of select="@name"/>
+ </xsl:variable>
+ <div class="pie" id="chart_rescode_{$thisview}_{$target}"/>
+ </xsl:if>
+ <table class="counters">
+ <xsl:for-each select="counters[@type=&quot;rcode&quot;]/counter[.&gt;0 and @name != &quot;QryAuthAns&quot;]">
+ <xsl:sort select="."/>
+ <xsl:variable name="css-class10">
+ <xsl:choose>
+ <xsl:when test="position() mod 2 = 0">even</xsl:when>
+ <xsl:otherwise>odd</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <tr class="{$css-class10}">
+ <th>
+ <xsl:value-of select="@name"/>
+ </th>
+ <td>
+ <xsl:value-of select="."/>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:for-each>
+ <h2>Received QTYPES per view/zone</h2>
+ <xsl:for-each select="views/view[zones/zone/counters[@type=&quot;qtype&quot;]/counter &gt;0]">
+ <h3>View <xsl:value-of select="@name"/></h3>
+ <xsl:variable name="thisview2">
+ <xsl:value-of select="@name"/>
+ </xsl:variable>
+ <xsl:for-each select="zones/zone">
+ <xsl:if test="counters[@type=&quot;qtype&quot;]/counter[count(.) &gt; 0]">
+ <h4>Zone <xsl:value-of select="@name"/></h4>
+ <xsl:if test="system-property('xsl:vendor')!='Transformiix'">
+ <!-- Non Mozilla specific markup -->
+ <script type="text/javascript">
+ graphs.push({
+ 'title': "Query Types for zone <xsl:value-of select="@name"/>",
+ 'target': 'chart_qtype_<xsl:value-of select="../../@name"/>_<xsl:value-of select="@name"/>',
+ 'data': [['Type','Counter'],<xsl:for-each select="counters[@type=&quot;qtype&quot;]/counter[.&gt;0 and @name != &quot;QryAuthAns&quot;]">['<xsl:value-of select="@name"/>',<xsl:value-of select="."/>],</xsl:for-each>]
+ });
+
+ </script>
+ <xsl:variable name="target">
+ <xsl:value-of select="@name"/>
+ </xsl:variable>
+ <div class="pie" id="chart_qtype_{$thisview2}_{$target}"/>
+ </xsl:if>
+ <table class="counters">
+ <xsl:for-each select="counters[@type=&quot;qtype&quot;]/counter">
+ <xsl:sort select="."/>
+ <xsl:variable name="css-class11">
+ <xsl:choose>
+ <xsl:when test="position() mod 2 = 0">even</xsl:when>
+ <xsl:otherwise>odd</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <tr class="{$css-class11}">
+ <th>
+ <xsl:value-of select="@name"/>
+ </th>
+ <td>
+ <xsl:value-of select="."/>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:for-each>
+ <h2>Network Status</h2>
+ <table class="counters">
+ <tr>
+ <th>ID</th>
+ <th>Name</th>
+ <th>Type</th>
+ <th>References</th>
+ <th>LocalAddress</th>
+ <th>PeerAddress</th>
+ <th>State</th>
+ </tr>
+ <xsl:for-each select="socketmgr/sockets/socket">
+ <xsl:sort select="id"/>
+ <xsl:variable name="css-class12">
+ <xsl:choose>
+ <xsl:when test="position() mod 2 = 0">even</xsl:when>
+ <xsl:otherwise>odd</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <tr class="{$css-class12}">
+ <td>
+ <xsl:value-of select="id"/>
+ </td>
+ <td>
+ <xsl:value-of select="name"/>
+ </td>
+ <td>
+ <xsl:value-of select="type"/>
+ </td>
+ <td>
+ <xsl:value-of select="references"/>
+ </td>
+ <td>
+ <xsl:value-of select="local-address"/>
+ </td>
+ <td>
+ <xsl:value-of select="peer-address"/>
+ </td>
+ <td>
+ <xsl:for-each select="states">
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ <br/>
+ <h2>Task Manager Configuration</h2>
+ <table class="counters">
+ <tr>
+ <th class="even">Thread-Model</th>
+ <td>
+ <xsl:value-of select="taskmgr/thread-model/type"/>
+ </td>
+ </tr>
+ <tr class="odd">
+ <th>Worker Threads</th>
+ <td>
+ <xsl:value-of select="taskmgr/thread-model/worker-threads"/>
+ </td>
+ </tr>
+ <tr class="even">
+ <th>Default Quantum</th>
+ <td>
+ <xsl:value-of select="taskmgr/thread-model/default-quantum"/>
+ </td>
+ </tr>
+ <tr class="odd">
+ <th>Tasks Running</th>
+ <td>
+ <xsl:value-of select="taskmgr/thread-model/tasks-running"/>
+ </td>
+ </tr>
+ </table>
+ <br/>
+ <h2>Tasks</h2>
+ <table class="counters">
+ <tr>
+ <th>ID</th>
+ <th>Name</th>
+ <th>References</th>
+ <th>State</th>
+ <th>Quantum</th>
+ </tr>
+ <xsl:for-each select="taskmgr/tasks/task">
+ <xsl:sort select="name"/>
+ <xsl:variable name="css-class14">
+ <xsl:choose>
+ <xsl:when test="position() mod 2 = 0">even</xsl:when>
+ <xsl:otherwise>odd</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <tr class="{$css-class14}">
+ <td>
+ <xsl:value-of select="id"/>
+ </td>
+ <td>
+ <xsl:value-of select="name"/>
+ </td>
+ <td>
+ <xsl:value-of select="references"/>
+ </td>
+ <td>
+ <xsl:value-of select="state"/>
+ </td>
+ <td>
+ <xsl:value-of select="quantum"/>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ <br/>
+ <h2>Memory Usage Summary</h2>
+ <table class="counters">
+ <xsl:for-each select="memory/summary/*">
+ <xsl:variable name="css-class13">
+ <xsl:choose>
+ <xsl:when test="position() mod 2 = 0">even</xsl:when>
+ <xsl:otherwise>odd</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <tr class="{$css-class13}">
+ <th>
+ <xsl:value-of select="name()"/>
+ </th>
+ <td>
+ <xsl:value-of select="."/>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ <br/>
+ <h2>Memory Contexts</h2>
+ <table class="counters">
+ <tr>
+ <th>ID</th>
+ <th>Name</th>
+ <th>References</th>
+ <th>TotalUse</th>
+ <th>InUse</th>
+ <th>MaxUse</th>
+ <th>BlockSize</th>
+ <th>Pools</th>
+ <th>HiWater</th>
+ <th>LoWater</th>
+ </tr>
+ <xsl:for-each select="memory/contexts/context">
+ <xsl:sort select="total" data-type="number" order="descending"/>
+ <xsl:variable name="css-class14">
+ <xsl:choose>
+ <xsl:when test="position() mod 2 = 0">even</xsl:when>
+ <xsl:otherwise>odd</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <tr class="{$css-class14}">
+ <td>
+ <xsl:value-of select="id"/>
+ </td>
+ <td>
+ <xsl:value-of select="name"/>
+ </td>
+ <td>
+ <xsl:value-of select="references"/>
+ </td>
+ <td>
+ <xsl:value-of select="total"/>
+ </td>
+ <td>
+ <xsl:value-of select="inuse"/>
+ </td>
+ <td>
+ <xsl:value-of select="maxinuse"/>
+ </td>
+ <td>
+ <xsl:value-of select="blocksize"/>
+ </td>
+ <td>
+ <xsl:value-of select="pools"/>
+ </td>
+ <td>
+ <xsl:value-of select="hiwater"/>
+ </td>
+ <td>
+ <xsl:value-of select="lowater"/>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ <hr/>
+ <p class="footer">Internet Systems Consortium Inc.<br/><a href="http://www.isc.org">http://www.isc.org</a></p>
+ </body>
+ </html>
+ </xsl:template>
 </xsl:stylesheet>
index 3992e9b4d549503ecf4d3618269dbc8eeee5eba6..c6042c7a5f3559a4d188e9333b9255a568c8ef80 100644 (file)
@@ -1,11 +1,11 @@
 /*
- * Generated by convertxsl.pl 1.14 2008/07/17 23:43:26 jinmei Exp
- * From bind9.xsl 1.21 2009/01/27 23:47:54 tbox Exp
+ * Generated by convertxsl.pl 1.14 2008/07/17 23:43:26 jinmei Exp  
+ * From <!-- %Id: bind9.xsl 1.21 2009/01/27 23:47:54 tbox Exp %
  */
 static char xslmsg[] =
        "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
        "<!--\n"
-       " - Copyright (C) 2006-2009, 2012 Internet Systems Consortium, Inc. (\"ISC\")\n"
+       " - Copyright (C) 2006-2009 Internet Systems Consortium, Inc. (\"ISC\")\n"
        " -\n"
        " - Permission to use, copy, modify, and/or distribute this software for any\n"
        " - purpose with or without fee is hereby granted, provided that the above\n"
@@ -19,356 +19,533 @@ static char xslmsg[] =
        " - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n"
        " - PERFORMANCE OF THIS SOFTWARE.\n"
        "-->\n"
-       "\n"
        "<!-- \045Id: bind9.xsl,v 1.21 2009/01/27 23:47:54 tbox Exp \045 -->\n"
-       "\n"
-       "<xsl:stylesheet version=\"1.0\"\n"
-       " xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"\n"
-       " xmlns=\"http://www.w3.org/1999/xhtml\">\n"
-       " <xsl:template match=\"isc/bind/statistics\">\n"
+       "<xsl:stylesheet xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns=\"http://www.w3.org/1999/xhtml\" version=\"1.0\">\n"
+       " <xsl:output method=\"html\" indent=\"yes\" version=\"4.0\"/>\n"
+       " <xsl:template match=\"statistics[@version=&quot;3.0&quot;]\">\n"
        " <html>\n"
        " <head>\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"
+       " <script type=\"text/javascript\">\n"
+       " \n"
+       " google.load(\"visualization\", \"1\", {packages:[\"corechart\"]});\n"
+       " google.setOnLoadCallback(loadGraphs);\n"
+       "\n"
+       " var graphs=[];\n"
+       " \n"
+       " function drawChart(chart_title,target,data) {\n"
+       " var data = google.visualization.arrayToDataTable(data);\n"
+       "\n"
+       " var options = {\n"
+       " title: chart_title\n"
+       " };\n"
+       " \n"
+       " var chart = new google.visualization.BarChart(document.getElementById(target));\n"
+       " chart.draw(data, options);\n"
+       " }\n"
+       " \n"
+       " function loadGraphs(){\n"
+       " //alert(\"here we are!\");\n"
+       " var g;\n"
+       " \n"
+       " // Server Incoming query Types\n"
+       " while(g = graphs.shift()){\n"
+       " // alert(\"going for: \" + g.target);\n"
+       " drawChart(g.title,g.target,g.data);\n"
+       " }\n"
+       " \n"
+       " }\n"
+       " \n"
+       " // Server Incoming Queries Types \n"
+       " graphs.push({\n"
+       " 'title' : \"Server Incoming Query Types\",\n"
+       " 'target': 'chart_incoming_qtypes',\n"
+       " 'data': [['Type','Counter'],<xsl:for-each select=\"server/counters[@type=&quot;qtype&quot;]/counter\">['<xsl:value-of select=\"@name\"/>',<xsl:value-of select=\".\"/>],</xsl:for-each>]\n"
+       " });\n"
+       "\n"
+       "\n"
+       " // Server Incoming Requests \n"
+       " graphs.push({\n"
+       " 'title' : \"Server Incoming Requests\",\n"
+       " 'target': 'chart_incoming_requests',\n"
+       " 'data': [['Requests','Counter'],<xsl:for-each select=\"server/counters[@type=&quot;opcode&quot;]/counter\">['<xsl:value-of select=\"@name\"/>',<xsl:value-of select=\".\"/>],</xsl:for-each>]});\n"
+       " \n"
+       " \n"
+       " \n"
+       " \n"
+       " </script>\n"
+       " </xsl:if>\n"
        " <style type=\"text/css\">\n"
-       "body {\n"
+       " body {\n"
        " font-family: sans-serif;\n"
        " background-color: #ffffff;\n"
        " color: #000000;\n"
-       "}\n"
-       "\n"
-       "table {\n"
+       " font-size: 10pt;\n"
+       " }\n"
+       " \n"
+       " .odd{\n"
+       " background-color: #f0f0f0;\n"
+       " }\n"
+       " \n"
+       " .even{\n"
+       " background-color: #ffffff;\n"
+       " }\n"
+       " \n"
+       " p.footer{\n"
+       " font-style:italic;\n"
+       " color: grey;\n"
+       " }\n"
+       "\n"
+       " table {\n"
        " border-collapse: collapse;\n"
-       "}\n"
-       "\n"
-       "tr.rowh {\n"
+       " border: 1px solid grey;\n"
+       " }\n"
+       "\n"
+       " table.counters{\n"
+       " border: 1px solid grey;\n"
+       " width: 500px;\n"
+       " }\n"
+       " \n"
+       " table.counters th {\n"
        " text-align: center;\n"
-       " border: 1px solid #000000;\n"
-       " background-color: #8080ff;\n"
-       " color: #ffffff;\n"
-       "}\n"
-       "\n"
-       "tr.row {\n"
-       " text-align: right;\n"
-       " border: 1px solid #000000;\n"
-       " background-color: teal;\n"
-       " color: #ffffff;\n"
-       "}\n"
-       "\n"
-       "tr.lrow {\n"
-       " text-align: left;\n"
-       " border: 1px solid #000000;\n"
-       " background-color: teal;\n"
+       " border: 1px solid grey;\n"
+       " width: 120px;\n"
+       " }\n"
+       " table.counters td{\n"
+       " text-align:center;\n"
+       " \n"
+       " }\n"
+       " \n"
+       " table.counters tr:hover{\n"
+       " background-color: #99ddff;\n"
+       " }\n"
+       " \n"
+       " .totals {\n"
+       " background-color: rgb(1,169,206);\n"
        " color: #ffffff;\n"
-       "}\n"
+       " }\n"
        "\n"
-       "td, th {\n"
+       " td, th {\n"
        " padding-right: 5px;\n"
        " padding-left: 5px;\n"
-       "}\n"
+       " border: 1px solid grey;\n"
+       " }\n"
        "\n"
-       ".header h1 {\n"
-       " background-color: teal;\n"
-       " color: #ffffff;\n"
-       " padding: 4px;\n"
-       "}\n"
+       " .header h1 {\n"
+       " color: rgb(1,169,206);\n"
+       " padding: 0px;\n"
+       " }\n"
        "\n"
-       ".content {\n"
+       " .content {\n"
        " background-color: #ffffff;\n"
        " color: #000000;\n"
        " padding: 4px;\n"
-       "}\n"
+       " }\n"
        "\n"
-       ".item {\n"
+       " .item {\n"
        " padding: 4px;\n"
-       " align: right;\n"
-       "}\n"
+       " text-align: right;\n"
+       " }\n"
        "\n"
-       ".value {\n"
+       " .value {\n"
        " padding: 4px;\n"
        " font-weight: bold;\n"
-       "}\n"
-       "\n"
-       "div.statcounter h2 {\n"
-       " text-align: center;\n"
-       " font-size: large;\n"
-       " border: 1px solid #000000;\n"
-       " background-color: #8080ff;\n"
-       " color: #ffffff;\n"
-       "}\n"
-       "\n"
-       "div.statcounter dl {\n"
-       " float: left;\n"
-       " margin-top: 0;\n"
-       " margin-bottom: 0;\n"
-       " margin-left: 0;\n"
-       " margin-right: 0;\n"
-       "}\n"
-       "\n"
-       "div.statcounter dt {\n"
-       " width: 200px;\n"
-       " text-align: center;\n"
-       " font-weight: bold;\n"
-       " border: 0.5px solid #000000;\n"
-       " background-color: #8080ff;\n"
-       " color: #ffffff;\n"
-       "}\n"
+       " }\n"
+       "\n"
+       "\n"
+       " h2 {\n"
+       " color: grey;\n"
+       " font-size: 14pt;\n"
+       " width:500px;\n"
+       " text-align:center;\n"
+       " }\n"
+       " \n"
+       " h3 {\n"
+       " color: #444444;\n"
+       " font-size: 12pt;\n"
+       " width:500px;\n"
+       " text-align:center;\n"
+       " \n"
+       " }\n"
+       " h4 {\n"
+       " color: rgb(1,169,206);\n"
+       " font-size: 10pt;\n"
+       " width:500px;\n"
+       " text-align:center;\n"
+       " \n"
+       " }\n"
+       "\n"
+       " .pie {\n"
+       " width:500px;\n"
+       " height: 500px;\n"
+       " }\n"
        "\n"
-       "div.statcounter dd {\n"
-       " width: 200px;\n"
-       " text-align: right;\n"
-       " border: 0.5px solid #000000;\n"
-       " background-color: teal;\n"
-       " color: #ffffff;\n"
-       " margin-left: 0;\n"
-       " margin-right: 0;\n"
-       "}\n"
-       "\n"
-       "div.statcounter br {\n"
-       " clear: left;\n"
-       "}\n"
        " </style>\n"
-       " <title>BIND 9 Statistics</title>\n"
+       " <title>ISC BIND 9 Statistics</title>\n"
        " </head>\n"
        " <body>\n"
        " <div class=\"header\">\n"
-       " <h1>Bind 9 Configuration and Statistics</h1>\n"
+       " <h1>ISC Bind 9 Configuration and Statistics</h1>\n"
        " </div>\n"
-       "\n"
-       " <br/>\n"
-       "\n"
-       " <table>\n"
-       " <tr class=\"rowh\"><th colspan=\"2\">Times</th></tr>\n"
-       " <tr class=\"lrow\">\n"
-       " <td>boot-time</td>\n"
-       " <td><xsl:value-of select=\"server/boot-time\"/></td>\n"
+       " <hr/>\n"
+       " <h2>Server Times</h2>\n"
+       " <table class=\"counters\">\n"
+       " <tr>\n"
+       " <th>Boot time:</th>\n"
+       " <td>\n"
+       " <xsl:value-of select=\"server/boot-time\"/>\n"
+       " </td>\n"
        " </tr>\n"
-       " <tr class=\"lrow\">\n"
-       " <td>current-time</td>\n"
-       " <td><xsl:value-of select=\"server/current-time\"/></td>\n"
+       " <tr>\n"
+       " <th>Sample time:</th>\n"
+       " <td>\n"
+       " <xsl:value-of select=\"server/current-time\"/>\n"
+       " </td>\n"
        " </tr>\n"
        " </table>\n"
-       "\n"
        " <br/>\n"
-       "\n"
-       " <table>\n"
-       " <tr class=\"rowh\"><th colspan=\"2\">Incoming Requests</th></tr>\n"
-       " <xsl:for-each select=\"server/requests/opcode\">\n"
-       " <tr class=\"lrow\">\n"
-       " <td><xsl:value-of select=\"name\"/></td>\n"
-       " <td><xsl:value-of select=\"counter\"/></td>\n"
+       " <h2>Incoming Requests</h2>\n"
+       " <xsl:if test=\"system-property('xsl:vendor')!='Transformiix'\">\n"
+       " <!-- Non Mozilla specific markup -->\n"
+       " <div class=\"pie\" id=\"chart_incoming_requests\">[graph incoming requests]</div>\n"
+       " </xsl:if>\n"
+       " <table class=\"counters\">\n"
+       " <xsl:for-each select=\"server/counters[@type=&quot;opcode&quot;]/counter\">\n"
+       " <xsl:sort select=\".\" data-type=\"number\" order=\"descending\"/>\n"
+       " <tr>\n"
+       " <th>\n"
+       " <xsl:value-of select=\"@name\"/>\n"
+       " </th>\n"
+       " <td>\n"
+       " <xsl:value-of select=\".\"/>\n"
+       " </td>\n"
        " </tr>\n"
        " </xsl:for-each>\n"
+       " <tr>\n"
+       " <th class=\"totals\">Total:</th>\n"
+       " <td class=\"totals\">\n"
+       " <xsl:value-of select=\"sum(server/counters[@type=&quot;opcode&quot;]/counter)\"/>\n"
+       " </td>\n"
+       " </tr>\n"
        " </table>\n"
-       "\n"
        " <br/>\n"
-       "\n"
-       " <table>\n"
-       " <tr class=\"rowh\"><th colspan=\"2\">Incoming Queries</th></tr>\n"
-       " <xsl:for-each select=\"server/queries-in/rdtype\">\n"
-       " <tr class=\"lrow\">\n"
-       " <td><xsl:value-of select=\"name\"/></td>\n"
-       " <td><xsl:value-of select=\"counter\"/></td>\n"
+       " <h3>Incoming Queries by Type</h3>\n"
+       " <xsl:if test=\"system-property('xsl:vendor')!='Transformiix'\">\n"
+       " <!-- Non Mozilla specific markup -->\n"
+       " <div class=\"pie\" id=\"chart_incoming_qtypes\">[graph incoming qtypes]</div>\n"
+       " </xsl:if>\n"
+       " <table class=\"counters\">\n"
+       " <xsl:for-each select=\"server/counters[@type=&quot;qtype&quot;]/counter\">\n"
+       " <xsl:sort select=\".\" data-type=\"number\" order=\"descending\"/>\n"
+       " <xsl:variable name=\"css-class\">\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-class}\">\n"
+       " <th>\n"
+       " <xsl:value-of select=\"@name\"/>\n"
+       " </th>\n"
+       " <td>\n"
+       " <xsl:value-of select=\".\"/>\n"
+       " </td>\n"
        " </tr>\n"
        " </xsl:for-each>\n"
+       " <tr>\n"
+       " <th class=\"totals\">Total:</th>\n"
+       " <td class=\"totals\">\n"
+       " <xsl:value-of select=\"sum(server/counters[@type=&quot;qtype&quot;]/counter)\"/>\n"
+       " </td>\n"
+       " </tr>\n"
        " </table>\n"
-       "\n"
        " <br/>\n"
-       "\n"
-       " <xsl:for-each select=\"views/view\">\n"
-       " <table>\n"
-       " <tr class=\"rowh\">\n"
-       " <th colspan=\"2\">Outgoing Queries from View <xsl:value-of select=\"name\"/></th>\n"
-       " </tr>\n"
-       " <xsl:for-each select=\"rdtype\">\n"
-       " <tr class=\"lrow\">\n"
-       " <td><xsl:value-of select=\"name\"/></td>\n"
-       " <td><xsl:value-of select=\"counter\"/></td>\n"
+       " <h2>Outgoing Queries per view</h2>\n"
+       " <xsl:for-each select=\"views/view[count(counters[@type=&quot;resqtype&quot;]/counter) &gt; 0]\">\n"
+       " <h3>View <xsl:value-of select=\"@name\"/></h3>\n"
+       " <xsl:if test=\"system-property('xsl:vendor')!='Transformiix'\">\n"
+       " <!-- Non Mozilla specific markup -->\n"
+       " <script type=\"text/javascript\">\n"
+       " graphs.push({\n"
+       " 'title': \"Outgoing queries for view: <xsl:value-of select=\"@name\"/>\",\n"
+       " 'target': 'chart_outgoing_queries_view_<xsl:value-of select=\"@name\"/>',\n"
+       " 'data': [['Type','Counter'],<xsl:for-each select=\"counters[@type=&quot;resqtype&quot;]/counter\">['<xsl:value-of select=\"@name\"/>',<xsl:value-of select=\".\"/>],</xsl:for-each>]\n"
+       " });\n"
+       " \n"
+       " </script>\n"
+       " <xsl:variable name=\"target\">\n"
+       " <xsl:value-of select=\"@name\"/>\n"
+       " </xsl:variable>\n"
+       " <div class=\"pie\" id=\"chart_outgoing_queries_view_{$target}\"/>\n"
+       " </xsl:if>\n"
+       " <table class=\"counters\">\n"
+       " <xsl:for-each select=\"counters[@type=&quot;resqtype&quot;]/counter\">\n"
+       " <xsl:sort select=\".\" data-type=\"number\" order=\"descending\"/>\n"
+       " <xsl:variable name=\"css-class1\">\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-class1}\">\n"
+       " <th>\n"
+       " <xsl:value-of select=\"@name\"/>\n"
+       " </th>\n"
+       " <td>\n"
+       " <xsl:value-of select=\".\"/>\n"
+       " </td>\n"
        " </tr>\n"
        " </xsl:for-each>\n"
        " </table>\n"
        " <br/>\n"
        " </xsl:for-each>\n"
-       "\n"
-       " <br/>\n"
-       "\n"
-       " <div class=\"statcounter\">\n"
        " <h2>Server Statistics</h2>\n"
-       " <xsl:for-each select=\"server/nsstat\">\n"
-       " <dl>\n"
-       " <dt><xsl:value-of select=\"name\"/></dt>\n"
-       " <dd><xsl:value-of select=\"counter\"/></dd>\n"
-       " </dl>\n"
+       " <xsl:if test=\"system-property('xsl:vendor')!='Transformiix'\">\n"
+       " <!-- Non Mozilla specific markup -->\n"
+       " <script type=\"text/javascript\">\n"
+       " graphs.push({\n"
+       " 'title' : \"Server Response Types\",\n"
+       " 'target': 'chart_server_nsstat_restype',\n"
+       " 'data': [['Type','Counter'],<xsl:for-each select=\"server/counters[@type=&quot;nsstat&quot;]/counter[.&gt;0]\">['<xsl:value-of select=\"@name\"/>',<xsl:value-of select=\".\"/>],</xsl:for-each>]\n"
+       " });\n"
+       " \n"
+       " </script>\n"
+       " <div class=\"pie\" id=\"chart_server_nsstat_restype\"/>\n"
+       " </xsl:if>\n"
+       " <table class=\"counters\">\n"
+       " <xsl:for-each select=\"server/counters[@type=&quot;nsstat&quot;]/counter[.&gt;0]\">\n"
+       " <xsl:sort select=\".\" data-type=\"number\" order=\"descending\"/>\n"
+       " <xsl:variable name=\"css-class2\">\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-class2}\">\n"
+       " <th>\n"
+       " <xsl:value-of select=\"@name\"/>\n"
+       " </th>\n"
+       " <td>\n"
+       " <xsl:value-of select=\".\"/>\n"
+       " </td>\n"
+       " </tr>\n"
        " </xsl:for-each>\n"
+       " </table>\n"
        " <br/>\n"
-       " </div>\n"
-       "\n"
-       " <div class=\"statcounter\">\n"
        " <h2>Zone Maintenance Statistics</h2>\n"
-       " <xsl:for-each select=\"server/zonestat\">\n"
-       " <dl>\n"
-       " <dt><xsl:value-of select=\"name\"/></dt>\n"
-       " <dd><xsl:value-of select=\"counter\"/></dd>\n"
-       " </dl>\n"
+       " <xsl:if test=\"system-property('xsl:vendor')!='Transformiix'\">\n"
+       " <script type=\"text/javascript\">\n"
+       " graphs.push({\n"
+       " 'title' : \"Zone Maintenance Stats\",\n"
+       " 'target': 'chart_server_zone_maint',\n"
+       " 'data': [['Type','Counter'],<xsl:for-each select=\"server/counters[@type=&quot;zonestat&quot;]/counter\">['<xsl:value-of select=\"@name\"/>',<xsl:value-of select=\".\"/>],</xsl:for-each>]\n"
+       " });\n"
+       "\n"
+       " </script>\n"
+       " <!-- Non Mozilla specific markup -->\n"
+       " <div class=\"pie\" id=\"chart_server_zone_maint\"/>\n"
+       " </xsl:if>\n"
+       " <table class=\"counters\">\n"
+       " <xsl:for-each select=\"server/counters[@type=&quot;zonestat&quot;]/counter\">\n"
+       " <xsl:sort select=\".\" data-type=\"number\" order=\"descending\"/>\n"
+       " <xsl:variable name=\"css-class3\">\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-class3}\">\n"
+       " <th>\n"
+       " <xsl:value-of select=\"@name\"/>\n"
+       " </th>\n"
+       " <td>\n"
+       " <xsl:value-of select=\".\"/>\n"
+       " </td>\n"
+       " </tr>\n"
        " </xsl:for-each>\n"
-       " <br />\n"
-       " </div>\n"
-       "\n"
-       " <div class=\"statcounter\">\n"
+       " </table>\n"
        " <h2>Resolver Statistics (Common)</h2>\n"
-       " <xsl:for-each select=\"server/resstat\">\n"
-       " <dl>\n"
-       " <dt><xsl:value-of select=\"name\"/></dt>\n"
-       " <dd><xsl:value-of select=\"counter\"/></dd>\n"
-       " </dl>\n"
-       " </xsl:for-each>\n"
-       " <br />\n"
-       " </div>\n"
-       "\n"
-       " <xsl:for-each select=\"views/view\">\n"
-       " <div class=\"statcounter\">\n"
-       " <h2>Resolver Statistics for View <xsl:value-of select=\"name\"/></h2>\n"
-       " <xsl:for-each select=\"resstat\">\n"
-       " <dl>\n"
-       " <dt><xsl:value-of select=\"name\"/></dt>\n"
-       " <dd><xsl:value-of select=\"counter\"/></dd>\n"
-       " </dl>\n"
-       " </xsl:for-each>\n"
-       " <br />\n"
-       " </div>\n"
-       " </xsl:for-each>\n"
-       "\n"
-       " <br />\n"
-       "\n"
-       " <div class=\"statcounter\">\n"
-       " <h2>ADB Statistics (Common)</h2>\n"
-       " <xsl:for-each select=\"server/adbstat\">\n"
-       " <dl>\n"
-       " <dt><xsl:value-of select=\"name\"/></dt>\n"
-       " <dd><xsl:value-of select=\"counter\"/></dd>\n"
-       " </dl>\n"
-       " </xsl:for-each>\n"
-       " <br />\n"
-       " </div>\n"
-       "\n"
-       " <xsl:for-each select=\"views/view\">\n"
-       " <div class=\"statcounter\">\n"
-       " <h2>ADB Statistics for View <xsl:value-of select=\"name\"/></h2>\n"
-       " <xsl:for-each select=\"adbstat\">\n"
-       " <dl>\n"
-       " <dt><xsl:value-of select=\"name\"/></dt>\n"
-       " <dd><xsl:value-of select=\"counter\"/></dd>\n"
-       " </dl>\n"
-       " </xsl:for-each>\n"
-       " <br />\n"
-       " </div>\n"
+       " <table class=\"counters\">\n"
+       " <xsl:for-each select=\"server/counters[@type=&quot;restat&quot;]/counter\">\n"
+       " <xsl:sort select=\".\" data-type=\"number\" order=\"descending\"/>\n"
+       " <xsl:variable name=\"css-class4\">\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-class4}\">\n"
+       " <th>\n"
+       " <xsl:value-of select=\"@name\"/>\n"
+       " </th>\n"
+       " <td>\n"
+       " <xsl:value-of select=\".\"/>\n"
+       " </td>\n"
+       " </tr>\n"
        " </xsl:for-each>\n"
-       "\n"
-       " <br />\n"
-       "\n"
+       " </table>\n"
        " <xsl:for-each select=\"views/view\">\n"
-       " <table>\n"
-       " <tr class=\"rowh\">\n"
-       " <th colspan=\"2\">Cache Statistics for View <xsl:value-of select=\"name\"/></th>\n"
-       " </tr>\n"
-       " <xsl:for-each select=\"cachestats/cachestat\">\n"
-       " <tr class=\"lrow\">\n"
-       " <td><xsl:value-of select=\"name\"/></td>\n"
-       " <td><xsl:value-of select=\"value\"/></td>\n"
+       " <h3>Resolver Statistics for View <xsl:value-of select=\"@name\"/></h3>\n"
+       " <table class=\"counters\">\n"
+       " <xsl:for-each select=\"counters[@type=&quot;resstats&quot;]/counter[.&gt;0]\">\n"
+       " <xsl:sort select=\".\" data-type=\"number\" order=\"descending\"/>\n"
+       " <xsl:variable name=\"css-class5\">\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-class5}\">\n"
+       " <th>\n"
+       " <xsl:value-of select=\"@name\"/>\n"
+       " </th>\n"
+       " <td>\n"
+       " <xsl:value-of select=\".\"/>\n"
+       " </td>\n"
        " </tr>\n"
        " </xsl:for-each>\n"
        " </table>\n"
-       " <br/>\n"
        " </xsl:for-each>\n"
-       "\n"
+       " <h3>Cache DB RRsets for View <xsl:value-of select=\"@name\"/></h3>\n"
        " <xsl:for-each select=\"views/view\">\n"
-       " <table>\n"
-       " <tr class=\"rowh\">\n"
-       " <th colspan=\"2\">Cache DB RRsets for View <xsl:value-of select=\"name\"/></th>\n"
-       " </tr>\n"
+       " <table class=\"counters\">\n"
        " <xsl:for-each select=\"cache/rrset\">\n"
-       " <tr class=\"lrow\">\n"
-       " <td><xsl:value-of select=\"name\"/></td>\n"
-       " <td><xsl:value-of select=\"counter\"/></td>\n"
+       " <xsl:variable name=\"css-class6\">\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-class6}\">\n"
+       " <th>\n"
+       " <xsl:value-of select=\"name\"/>\n"
+       " </th>\n"
+       " <td>\n"
+       " <xsl:value-of select=\"counter\"/>\n"
+       " </td>\n"
        " </tr>\n"
        " </xsl:for-each>\n"
        " </table>\n"
        " <br/>\n"
        " </xsl:for-each>\n"
-       "\n"
-       " <div class=\"statcounter\">\n"
        " <h2>Socket I/O Statistics</h2>\n"
-       " <xsl:for-each select=\"server/sockstat\">\n"
-       " <dl>\n"
-       " <dt><xsl:value-of select=\"name\"/></dt>\n"
-       " <dd><xsl:value-of select=\"counter\"/></dd>\n"
-       " </dl>\n"
+       " <table class=\"counters\">\n"
+       " <xsl:for-each select=\"server/counters[@type=&quot;sockstat&quot;]/counter[.&gt;0]\">\n"
+       " <xsl:variable name=\"css-class7\">\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-class7}\">\n"
+       " <th>\n"
+       " <xsl:value-of select=\"@name\"/>\n"
+       " </th>\n"
+       " <td>\n"
+       " <xsl:value-of select=\".\"/>\n"
+       " </td>\n"
+       " </tr>\n"
        " </xsl:for-each>\n"
+       " </table>\n"
        " <br/>\n"
-       " </div>\n"
-       "\n"
        " <br/>\n"
-       "\n"
-       " <xsl:for-each select=\"views/view\">\n"
-       " <table>\n"
-       " <tr class=\"rowh\">\n"
-       " <th colspan=\"10\">Zones for View <xsl:value-of select=\"name\"/></th>\n"
-       " </tr>\n"
-       " <tr class=\"rowh\">\n"
-       " <th>Name</th>\n"
-       " <th>Class</th>\n"
-       " <th>Serial</th>\n"
-       " <th>Success</th>\n"
-       " <th>Referral</th>\n"
-       " <th>NXRRSET</th>\n"
-       " <th>NXDOMAIN</th>\n"
-       " <th>Failure</th>\n"
-       " <th>XfrReqDone</th>\n"
-       " <th>XfrRej</th>\n"
-       " </tr>\n"
+       " <h2>Response Codes per view/zone</h2>\n"
+       " <xsl:for-each select=\"views/view[zones/zone/counters[@type=&quot;rcode&quot;]/counter &gt;0]\">\n"
+       " <h3>View <xsl:value-of select=\"@name\"/></h3>\n"
+       " <xsl:variable name=\"thisview\">\n"
+       " <xsl:value-of select=\"@name\"/>\n"
+       " </xsl:variable>\n"
        " <xsl:for-each select=\"zones/zone\">\n"
-       " <tr class=\"lrow\">\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=\"serial\"/>\n"
-       " </td>\n"
-       " <td>\n"
-       " <xsl:value-of select=\"counters/QrySuccess\"/>\n"
-       " </td>\n"
-       " <td>\n"
-       " <xsl:value-of select=\"counters/QryReferral\"/>\n"
-       " </td>\n"
-       " <td>\n"
-       " <xsl:value-of select=\"counters/QryNxrrset\"/>\n"
-       " </td>\n"
-       " <td>\n"
-       " <xsl:value-of select=\"counters/QryNXDOMAIN\"/>\n"
-       " </td>\n"
-       " <td>\n"
-       " <xsl:value-of select=\"counters/QryFailure\"/>\n"
-       " </td>\n"
+       " <xsl:if test=\"counters[@type=&quot;rcode&quot;]/counter[. &gt; 0]\">\n"
+       " <h4>Zone <xsl:value-of select=\"@name\"/></h4>\n"
+       " <xsl:if test=\"system-property('xsl:vendor')!='Transformiix'\">\n"
+       " <!-- Non Mozilla specific markup -->\n"
+       " <script type=\"text/javascript\">\n"
+       " graphs.push({\n"
+       " 'title': \"Response Codes for zone <xsl:value-of select=\"@name\"/>\",\n"
+       " 'target': 'chart_rescode_<xsl:value-of select=\"../../@name\"/>_<xsl:value-of select=\"@name\"/>',\n"
+       " 'data': [['Type','Counter'],<xsl:for-each select=\"counters[@type=&quot;rcode&quot;]/counter[.&gt;0 and @name != &quot;QryAuthAns&quot;]\">['<xsl:value-of select=\"@name\"/>',<xsl:value-of select=\".\"/>],</xsl:for-each>]\n"
+       " });\n"
+       "\n"
+       " </script>\n"
+       " <xsl:variable name=\"target\">\n"
+       " <xsl:value-of select=\"@name\"/>\n"
+       " </xsl:variable>\n"
+       " <div class=\"pie\" id=\"chart_rescode_{$thisview}_{$target}\"/>\n"
+       " </xsl:if>\n"
+       " <table class=\"counters\">\n"
+       " <xsl:for-each select=\"counters[@type=&quot;rcode&quot;]/counter[.&gt;0 and @name != &quot;QryAuthAns&quot;]\">\n"
+       " <xsl:sort select=\".\"/>\n"
+       " <xsl:variable name=\"css-class10\">\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-class10}\">\n"
+       " <th>\n"
+       " <xsl:value-of select=\"@name\"/>\n"
+       " </th>\n"
        " <td>\n"
-       " <xsl:value-of select=\"counters/XfrReqDone\"/>\n"
+       " <xsl:value-of select=\".\"/>\n"
        " </td>\n"
+       " </tr>\n"
+       " </xsl:for-each>\n"
+       " </table>\n"
+       " </xsl:if>\n"
+       " </xsl:for-each>\n"
+       " </xsl:for-each>\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"
+       " <h3>View <xsl:value-of select=\"@name\"/></h3>\n"
+       " <xsl:variable name=\"thisview2\">\n"
+       " <xsl:value-of select=\"@name\"/>\n"
+       " </xsl:variable>\n"
+       " <xsl:for-each select=\"zones/zone\">\n"
+       " <xsl:if test=\"counters[@type=&quot;qtype&quot;]/counter[count(.) &gt; 0]\">\n"
+       " <h4>Zone <xsl:value-of select=\"@name\"/></h4>\n"
+       " <xsl:if test=\"system-property('xsl:vendor')!='Transformiix'\">\n"
+       " <!-- Non Mozilla specific markup -->\n"
+       " <script type=\"text/javascript\">\n"
+       " graphs.push({\n"
+       " 'title': \"Query Types for zone <xsl:value-of select=\"@name\"/>\",\n"
+       " 'target': 'chart_qtype_<xsl:value-of select=\"../../@name\"/>_<xsl:value-of select=\"@name\"/>',\n"
+       " 'data': [['Type','Counter'],<xsl:for-each select=\"counters[@type=&quot;qtype&quot;]/counter[.&gt;0 and @name != &quot;QryAuthAns&quot;]\">['<xsl:value-of select=\"@name\"/>',<xsl:value-of select=\".\"/>],</xsl:for-each>]\n"
+       " });\n"
+       "\n"
+       " </script>\n"
+       " <xsl:variable name=\"target\">\n"
+       " <xsl:value-of select=\"@name\"/>\n"
+       " </xsl:variable>\n"
+       " <div class=\"pie\" id=\"chart_qtype_{$thisview2}_{$target}\"/>\n"
+       " </xsl:if>\n"
+       " <table class=\"counters\">\n"
+       " <xsl:for-each select=\"counters[@type=&quot;qtype&quot;]/counter\">\n"
+       " <xsl:sort select=\".\"/>\n"
+       " <xsl:variable name=\"css-class11\">\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-class11}\">\n"
+       " <th>\n"
+       " <xsl:value-of select=\"@name\"/>\n"
+       " </th>\n"
        " <td>\n"
-       " <xsl:value-of select=\"counters/XfrRej\"/>\n"
+       " <xsl:value-of select=\".\"/>\n"
        " </td>\n"
        " </tr>\n"
        " </xsl:for-each>\n"
        " </table>\n"
-       " <br/>\n"
+       " </xsl:if>\n"
        " </xsl:for-each>\n"
-       "\n"
-       " <br/>\n"
-       "\n"
-       " <table>\n"
-       " <tr class=\"rowh\">\n"
-       " <th colspan=\"7\">Network Status</th>\n"
-       " </tr>\n"
-       " <tr class=\"rowh\">\n"
+       " </xsl:for-each>\n"
+       " <h2>Network Status</h2>\n"
+       " <table class=\"counters\">\n"
+       " <tr>\n"
        " <th>ID</th>\n"
        " <th>Name</th>\n"
        " <th>Type</th>\n"
@@ -378,7 +555,14 @@ static char xslmsg[] =
        " <th>State</th>\n"
        " </tr>\n"
        " <xsl:for-each select=\"socketmgr/sockets/socket\">\n"
-       " <tr class=\"lrow\">\n"
+       " <xsl:sort select=\"id\"/>\n"
+       " <xsl:variable name=\"css-class12\">\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-class12}\">\n"
        " <td>\n"
        " <xsl:value-of select=\"id\"/>\n"
        " </td>\n"
@@ -406,56 +590,52 @@ static char xslmsg[] =
        " </xsl:for-each>\n"
        " </table>\n"
        " <br/>\n"
-       " <table>\n"
-       " <tr class=\"rowh\">\n"
-       " <th colspan=\"2\">Task Manager Configuration</th>\n"
-       " </tr>\n"
-       " <tr class=\"lrow\">\n"
-       " <td>Thread-Model</td>\n"
+       " <h2>Task Manager Configuration</h2>\n"
+       " <table class=\"counters\">\n"
+       " <tr>\n"
+       " <th class=\"even\">Thread-Model</th>\n"
        " <td>\n"
        " <xsl:value-of select=\"taskmgr/thread-model/type\"/>\n"
        " </td>\n"
        " </tr>\n"
-       " <tr class=\"lrow\">\n"
-       " <td>Worker Threads</td>\n"
+       " <tr class=\"odd\">\n"
+       " <th>Worker Threads</th>\n"
        " <td>\n"
        " <xsl:value-of select=\"taskmgr/thread-model/worker-threads\"/>\n"
        " </td>\n"
        " </tr>\n"
-       " <tr class=\"lrow\">\n"
-       " <td>Default Quantum</td>\n"
+       " <tr class=\"even\">\n"
+       " <th>Default Quantum</th>\n"
        " <td>\n"
        " <xsl:value-of select=\"taskmgr/thread-model/default-quantum\"/>\n"
        " </td>\n"
        " </tr>\n"
-       " <tr class=\"lrow\">\n"
-       " <td>Tasks Running</td>\n"
+       " <tr class=\"odd\">\n"
+       " <th>Tasks Running</th>\n"
        " <td>\n"
        " <xsl:value-of select=\"taskmgr/thread-model/tasks-running\"/>\n"
        " </td>\n"
        " </tr>\n"
-       " <tr class=\"lrow\">\n"
-       " <td>Tasks Ready</td>\n"
-       " <td>\n"
-       " <xsl:value-of select=\"taskmgr/thread-model/tasks-ready\"/>\n"
-       " </td>\n"
-       " </tr>\n"
        " </table>\n"
        " <br/>\n"
-       " <table>\n"
-       " <tr class=\"rowh\">\n"
-       " <th colspan=\"6\">Tasks</th>\n"
-       " </tr>\n"
-       " <tr class=\"rowh\">\n"
+       " <h2>Tasks</h2>\n"
+       " <table class=\"counters\">\n"
+       " <tr>\n"
        " <th>ID</th>\n"
        " <th>Name</th>\n"
        " <th>References</th>\n"
        " <th>State</th>\n"
        " <th>Quantum</th>\n"
-       " <th>Events</th>\n"
        " </tr>\n"
        " <xsl:for-each select=\"taskmgr/tasks/task\">\n"
-       " <tr class=\"lrow\">\n"
+       " <xsl:sort select=\"name\"/>\n"
+       " <xsl:variable name=\"css-class14\">\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-class14}\">\n"
        " <td>\n"
        " <xsl:value-of select=\"id\"/>\n"
        " </td>\n"
@@ -471,30 +651,33 @@ static char xslmsg[] =
        " <td>\n"
        " <xsl:value-of select=\"quantum\"/>\n"
        " </td>\n"
-       " <td>\n"
-       " <xsl:value-of select=\"events\"/>\n"
-       " </td>\n"
        " </tr>\n"
        " </xsl:for-each>\n"
        " </table>\n"
-       " <br />\n"
-       " <table>\n"
-       " <tr class=\"rowh\">\n"
-       " <th colspan=\"4\">Memory Usage Summary</th>\n"
-       " </tr>\n"
+       " <br/>\n"
+       " <h2>Memory Usage Summary</h2>\n"
+       " <table class=\"counters\">\n"
        " <xsl:for-each select=\"memory/summary/*\">\n"
-       " <tr class=\"lrow\">\n"
-       " <td><xsl:value-of select=\"name()\"/></td>\n"
-       " <td><xsl:value-of select=\".\"/></td>\n"
+       " <xsl:variable name=\"css-class13\">\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-class13}\">\n"
+       " <th>\n"
+       " <xsl:value-of select=\"name()\"/>\n"
+       " </th>\n"
+       " <td>\n"
+       " <xsl:value-of select=\".\"/>\n"
+       " </td>\n"
        " </tr>\n"
        " </xsl:for-each>\n"
        " </table>\n"
-       " <br />\n"
-       " <table>\n"
-       " <tr class=\"rowh\">\n"
-       " <th colspan=\"10\">Memory Contexts</th>\n"
-       " </tr>\n"
-       " <tr class=\"rowh\">\n"
+       " <br/>\n"
+       " <h2>Memory Contexts</h2>\n"
+       " <table class=\"counters\">\n"
+       " <tr>\n"
        " <th>ID</th>\n"
        " <th>Name</th>\n"
        " <th>References</th>\n"
@@ -507,7 +690,14 @@ static char xslmsg[] =
        " <th>LoWater</th>\n"
        " </tr>\n"
        " <xsl:for-each select=\"memory/contexts/context\">\n"
-       " <tr class=\"lrow\">\n"
+       " <xsl:sort select=\"total\" data-type=\"number\" order=\"descending\"/>\n"
+       " <xsl:variable name=\"css-class14\">\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-class14}\">\n"
        " <td>\n"
        " <xsl:value-of select=\"id\"/>\n"
        " </td>\n"
@@ -541,7 +731,8 @@ static char xslmsg[] =
        " </tr>\n"
        " </xsl:for-each>\n"
        " </table>\n"
-       "\n"
+       " <hr/>\n"
+       " <p class=\"footer\">Internet Systems Consortium Inc.<br/><a href=\"http://www.isc.org\">http://www.isc.org</a></p>\n"
        " </body>\n"
        " </html>\n"
        " </xsl:template>\n"
index b7abd19425687a1fb0bfd921526c85be2f77ee27..62529c9ea7931337f4e65cddeed6a233636bd4b1 100644 (file)
@@ -1140,7 +1140,7 @@ generatexml(ns_server_t *server, int *buflen, xmlChar **buf) {
 
        TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "counters"));
        TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "type",
-                                                                                                                                        ISC_XMLCHAR "opcode"));
+                                        ISC_XMLCHAR "opcode"));
 
        dns_opcodestats_dump(server->opcodestats, opcodestat_dump, &dumparg,
                             0);
index 1b3046825c5b364357252330f25c776d3fbec481..6e6e25e4903c9b17e004846ca29a196697877c57 100644 (file)
@@ -469,7 +469,7 @@ AC_ARG_ENABLE(newstats,
        [  --enable-newstats         use the new statistics])
 case "$enable_newstats" in
 yes)
-        AC_DEFINE(NEWSTATS, [], [Use the new XML schema for statistics])
+        AC_DEFINE(NEWSTATS, 1, [Use the new XML schema for statistics])
        ;;
 *)
        ;;