00001
00002
00003
00004
00005 static char xslmsg[] =
00006 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
00007 "<!--\n"
00008 " - Copyright (C) 2006-2009, 2012-2014 Internet Systems Consortium, Inc. (\"ISC\")\n"
00009 " -\n"
00010 " - Permission to use, copy, modify, and/or distribute this software for any\n"
00011 " - purpose with or without fee is hereby granted, provided that the above\n"
00012 " - copyright notice and this permission notice appear in all copies.\n"
00013 " -\n"
00014 " - THE SOFTWARE IS PROVIDED \"AS IS\" AND ISC DISCLAIMS ALL WARRANTIES WITH\n"
00015 " - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\n"
00016 " - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,\n"
00017 " - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n"
00018 " - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE\n"
00019 " - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n"
00020 " - PERFORMANCE OF THIS SOFTWARE.\n"
00021 "-->\n"
00022 "\n"
00023 "<!-- $Id$ -->\n"
00024 "\n"
00025 "<!-- \045Id: bind9.xsl,v 1.21 2009/01/27 23:47:54 tbox Exp \045 -->\n"
00026 "<xsl:stylesheet xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns=\"http://www.w3.org/1999/xhtml\" version=\"1.0\">\n"
00027 " <xsl:output method=\"html\" indent=\"yes\" version=\"4.0\"/>\n"
00028 " <xsl:template match=\"statistics[@version="3.5"]\">\n"
00029 " <html>\n"
00030 " <head>\n"
00031 " <xsl:if test=\"system-property('xsl:vendor')!='Transformiix'\">\n"
00032 " <!-- Non Mozilla specific markup -->\n"
00033 " <script type=\"text/javascript\" src=\"https://www.google.com/jsapi\"/>\n"
00034 " <script type=\"text/javascript\">\n"
00035 "\n"
00036 " google.load(\"visualization\", \"1\", {packages:[\"corechart\"]});\n"
00037 " google.setOnLoadCallback(loadGraphs);\n"
00038 "\n"
00039 " var graphs=[];\n"
00040 "\n"
00041 " function drawChart(chart_title,target,style,data) {\n"
00042 " var data = google.visualization.arrayToDataTable(data);\n"
00043 "\n"
00044 " var options = {\n"
00045 " title: chart_title\n"
00046 " };\n"
00047 "\n"
00048 " var chart;\n"
00049 " if (style == \"barchart\") {\n"
00050 " chart = new google.visualization.BarChart(document.getElementById(target));\n"
00051 " chart.draw(data, options);\n"
00052 " } else if (style == \"piechart\") {\n"
00053 " chart = new google.visualization.PieChart(document.getElementById(target));\n"
00054 " chart.draw(data, options);\n"
00055 " }\n"
00056 " }\n"
00057 "\n"
00058 " function loadGraphs(){\n"
00059 " var g;\n"
00060 "\n"
00061 " while(g = graphs.shift()){\n"
00062 " // alert(\"going for: \" + g.target);\n"
00063 " if(g.data.length > 1){\n"
00064 " drawChart(g.title,g.target,g.style,g.data);\n"
00065 " }\n"
00066 " }\n"
00067 " }\n"
00068 "\n"
00069 " <xsl:if test=\"server/counters[@type="qtype"]/counter\">\n"
00070 " // Server Incoming Query Types\n"
00071 " graphs.push({\n"
00072 " 'title' : \"Server Incoming Query Types\",\n"
00073 " 'target': 'chart_incoming_qtypes',\n"
00074 " 'style': 'barchart',\n"
00075 " 'data': [['Type','Counter'],<xsl:for-each select=\"server/counters[@type="qtype"]/counter\">['<xsl:value-of select=\"@name\"/>',<xsl:value-of select=\".\"/>],</xsl:for-each>]\n"
00076 " });\n"
00077 " </xsl:if>\n"
00078 "\n"
00079 " <xsl:if test=\"server/counters[@type="opcode"]/counter\">\n"
00080 " // Server Incoming Requests by opcode\n"
00081 " graphs.push({\n"
00082 " 'title' : \"Server Incoming Requests by DNS Opcode\",\n"
00083 " 'target': 'chart_incoming_opcodes',\n"
00084 " 'style': 'barchart',\n"
00085 " 'data': [['Opcode','Counter'],<xsl:for-each select=\"server/counters[@type="opcode"]/counter[. > 0 or substring(@name,1,3) != 'RES']\">['<xsl:value-of select=\"@name\"/>',<xsl:value-of select=\".\"/>],</xsl:for-each>]});\n"
00086 " </xsl:if>\n"
00087 " </script>\n"
00088 " </xsl:if>\n"
00089 " <style type=\"text/css\">\n"
00090 " body {\n"
00091 " font-family: sans-serif;\n"
00092 " background-color: #ffffff;\n"
00093 " color: #000000;\n"
00094 " font-size: 10pt;\n"
00095 " }\n"
00096 "\n"
00097 " .odd{\n"
00098 " background-color: #f0f0f0;\n"
00099 " }\n"
00100 "\n"
00101 " .even{\n"
00102 " background-color: #ffffff;\n"
00103 " }\n"
00104 "\n"
00105 " p.footer{\n"
00106 " font-style:italic;\n"
00107 " color: grey;\n"
00108 " }\n"
00109 "\n"
00110 " table {\n"
00111 " border-collapse: collapse;\n"
00112 " border: 1px solid grey;\n"
00113 " }\n"
00114 "\n"
00115 " table.counters{\n"
00116 " border: 1px solid grey;\n"
00117 " width: 500px;\n"
00118 " }\n"
00119 " table.counters th {\n"
00120 " text-align: right;\n"
00121 " border: 1px solid grey;\n"
00122 " width: 150px;\n"
00123 " }\n"
00124 " table.counters td {\n"
00125 " text-align: right;\n"
00126 " font-family: monospace;\n"
00127 " }\n"
00128 " table.counters tr:hover{\n"
00129 " background-color: #99ddff;\n"
00130 " }\n"
00131 "\n"
00132 " table.info {\n"
00133 " border: 1px solid grey;\n"
00134 " width: 500px;\n"
00135 " }\n"
00136 " table.info th {\n"
00137 " text-align: center;\n"
00138 " border: 1px solid grey;\n"
00139 " width: 150px;\n"
00140 " }\n"
00141 " table.info td {\n"
00142 " text-align: center;\n"
00143 " }\n"
00144 " table.info tr:hover{\n"
00145 " background-color: #99ddff;\n"
00146 " }\n"
00147 "\n"
00148 " table.tasks {\n"
00149 " border: 1px solid grey;\n"
00150 " width: 500px;\n"
00151 " }\n"
00152 " table.tasks th {\n"
00153 " text-align: center;\n"
00154 " border: 1px solid grey;\n"
00155 " width: 150px;\n"
00156 " }\n"
00157 " table.tasks td {\n"
00158 " text-align: right;\n"
00159 " font-family: monospace;\n"
00160 " }\n"
00161 " table.tasks td:nth-child(2) {\n"
00162 " text-align: center;\n"
00163 " }\n"
00164 " table.tasks td:nth-child(4) {\n"
00165 " text-align: center;\n"
00166 " }\n"
00167 " table.tasks tr:hover{\n"
00168 " background-color: #99ddff;\n"
00169 " }\n"
00170 "\n"
00171 " table.netstat {\n"
00172 " border: 1px solid grey;\n"
00173 " width: 500px;\n"
00174 " }\n"
00175 " table.netstat th {\n"
00176 " text-align: center;\n"
00177 " border: 1px solid grey;\n"
00178 " width: 150px;\n"
00179 " }\n"
00180 " table.netstat td {\n"
00181 " text-align: center;\n"
00182 " }\n"
00183 " table.netstat td:nth-child(4) {\n"
00184 " text-align: right;\n"
00185 " font-family: monospace;\n"
00186 " }\n"
00187 " table.netstat td:nth-child(7) {\n"
00188 " text-align: left;\n"
00189 " }\n"
00190 " table.netstat tr:hover{\n"
00191 " background-color: #99ddff;\n"
00192 " }\n"
00193 "\n"
00194 " table.mctx {\n"
00195 " border: 1px solid grey;\n"
00196 " width: 500px;\n"
00197 " }\n"
00198 " table.mctx th {\n"
00199 " text-align: center;\n"
00200 " border: 1px solid grey;\n"
00201 " }\n"
00202 " table.mctx td {\n"
00203 " text-align: right;\n"
00204 " font-family: monospace;\n"
00205 " }\n"
00206 " table.mctx td:nth-child(-n+2) {\n"
00207 " text-align: left;\n"
00208 " width: 100px;\n"
00209 " }\n"
00210 " table.mctx tr:hover{\n"
00211 " background-color: #99ddff;\n"
00212 " }\n"
00213 "\n"
00214 " .totals {\n"
00215 " background-color: rgb(1,169,206);\n"
00216 " color: #ffffff;\n"
00217 " }\n"
00218 "\n"
00219 " td, th {\n"
00220 " padding-right: 5px;\n"
00221 " padding-left: 5px;\n"
00222 " border: 1px solid grey;\n"
00223 " }\n"
00224 "\n"
00225 " .header h1 {\n"
00226 " color: rgb(1,169,206);\n"
00227 " padding: 0px;\n"
00228 " }\n"
00229 "\n"
00230 " .content {\n"
00231 " background-color: #ffffff;\n"
00232 " color: #000000;\n"
00233 " padding: 4px;\n"
00234 " }\n"
00235 "\n"
00236 " .item {\n"
00237 " padding: 4px;\n"
00238 " text-align: right;\n"
00239 " }\n"
00240 "\n"
00241 " .value {\n"
00242 " padding: 4px;\n"
00243 " font-weight: bold;\n"
00244 " }\n"
00245 "\n"
00246 "\n"
00247 " h2 {\n"
00248 " color: grey;\n"
00249 " font-size: 14pt;\n"
00250 " width:500px;\n"
00251 " text-align:center;\n"
00252 " }\n"
00253 "\n"
00254 " h3 {\n"
00255 " color: #444444;\n"
00256 " font-size: 12pt;\n"
00257 " width:500px;\n"
00258 " text-align:center;\n"
00259 " }\n"
00260 " h4 {\n"
00261 " color: rgb(1,169,206);\n"
00262 " font-size: 10pt;\n"
00263 " width:500px;\n"
00264 " text-align:center;\n"
00265 " }\n"
00266 "\n"
00267 " .pie {\n"
00268 " width:500px;\n"
00269 " height: 500px;\n"
00270 " }\n"
00271 "\n"
00272 " </style>\n"
00273 " <title>ISC BIND 9 Statistics</title>\n"
00274 " </head>\n"
00275 " <body>\n"
00276 " <div class=\"header\">\n"
00277 " <h1>ISC Bind 9 Configuration and Statistics</h1>\n"
00278 " </div>\n"
00279 " <p>Alternate statistics views: <a href=\"/\">All</a>,\n"
00280 " <a href=\"/xml/v3/status\">Status</a>,\n"
00281 " <a href=\"/xml/v3/server\">Server</a>,\n"
00282 " <a href=\"/xml/v3/zones\">Zones</a>,\n"
00283 " <a href=\"/xml/v3/net\">Network</a>,\n"
00284 " <a href=\"/xml/v3/tasks\">Tasks</a> and\n"
00285 " <a href=\"/xml/v3/mem\">Memory</a></p>\n"
00286 " <hr/>\n"
00287 " <h2>Server Status</h2>\n"
00288 " <table class=\"info\">\n"
00289 " <tr>\n"
00290 " <th>Boot time:</th>\n"
00291 " <td>\n"
00292 " <xsl:value-of select=\"server/boot-time\"/>\n"
00293 " </td>\n"
00294 " </tr>\n"
00295 " <tr>\n"
00296 " <th>Last reconfigured:</th>\n"
00297 " <td>\n"
00298 " <xsl:value-of select=\"server/config-time\"/>\n"
00299 " </td>\n"
00300 " </tr>\n"
00301 " <tr>\n"
00302 " <th>Current time:</th>\n"
00303 " <td>\n"
00304 " <xsl:value-of select=\"server/current-time\"/>\n"
00305 " </td>\n"
00306 " </tr>\n"
00307 " </table>\n"
00308 " <br/>\n"
00309 " <xsl:if test=\"server/counters[@type="opcode"]/counter[. > 0]\">\n"
00310 " <xsl:if test=\"system-property('xsl:vendor')!='Transformiix'\">\n"
00311 " <h2>Incoming Requests by DNS Opcode</h2>\n"
00312 " <!-- Non Mozilla specific markup -->\n"
00313 " <div class=\"pie\" id=\"chart_incoming_opcodes\">\n"
00314 " [cannot display chart]\n"
00315 " </div>\n"
00316 " </xsl:if>\n"
00317 " <table class=\"counters\">\n"
00318 " <xsl:for-each select=\"server/counters[@type="opcode"]/counter[. > 0 or substring(@name,1,3) != 'RES']\">\n"
00319 " <xsl:sort select=\".\" data-type=\"number\" order=\"descending\"/>\n"
00320 " <tr>\n"
00321 " <th>\n"
00322 " <xsl:value-of select=\"@name\"/>\n"
00323 " </th>\n"
00324 " <td>\n"
00325 " <xsl:value-of select=\".\"/>\n"
00326 " </td>\n"
00327 " </tr>\n"
00328 " </xsl:for-each>\n"
00329 " <tr>\n"
00330 " <th class=\"totals\">Total:</th>\n"
00331 " <td class=\"totals\">\n"
00332 " <xsl:value-of select=\"sum(server/counters[@type="opcode"]/counter)\"/>\n"
00333 " </td>\n"
00334 " </tr>\n"
00335 " </table>\n"
00336 " <br/>\n"
00337 " </xsl:if>\n"
00338 " <xsl:if test=\"server/counters[@type="qtype"]/counter\">\n"
00339 " <xsl:if test=\"system-property('xsl:vendor')!='Transformiix'\">\n"
00340 " <!-- Non Mozilla specific markup -->\n"
00341 " <h3>Incoming Queries by Query Type</h3>\n"
00342 " <div class=\"pie\" id=\"chart_incoming_qtypes\">\n"
00343 " [cannot display chart]\n"
00344 " </div>\n"
00345 " </xsl:if>\n"
00346 " <table class=\"counters\">\n"
00347 " <xsl:for-each select=\"server/counters[@type="qtype"]/counter\">\n"
00348 " <xsl:sort select=\".\" data-type=\"number\" order=\"descending\"/>\n"
00349 " <xsl:variable name=\"css-class\">\n"
00350 " <xsl:choose>\n"
00351 " <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
00352 " <xsl:otherwise>odd</xsl:otherwise>\n"
00353 " </xsl:choose>\n"
00354 " </xsl:variable>\n"
00355 " <tr class=\"{$css-class}\">\n"
00356 " <th>\n"
00357 " <xsl:value-of select=\"@name\"/>\n"
00358 " </th>\n"
00359 " <td>\n"
00360 " <xsl:value-of select=\".\"/>\n"
00361 " </td>\n"
00362 " </tr>\n"
00363 " </xsl:for-each>\n"
00364 " <tr>\n"
00365 " <th class=\"totals\">Total:</th>\n"
00366 " <td class=\"totals\">\n"
00367 " <xsl:value-of select=\"sum(server/counters[@type="qtype"]/counter)\"/>\n"
00368 " </td>\n"
00369 " </tr>\n"
00370 " </table>\n"
00371 " <br/>\n"
00372 " </xsl:if>\n"
00373 " <xsl:if test=\"views/view[count(counters[@type="resqtype"]/counter) > 0]\">\n"
00374 " <h2>Outgoing Queries per view</h2>\n"
00375 " <xsl:for-each select=\"views/view[count(counters[@type="resqtype"]/counter) > 0]\">\n"
00376 " <h3>View <xsl:value-of select=\"@name\"/></h3>\n"
00377 " <xsl:if test=\"system-property('xsl:vendor')!='Transformiix'\">\n"
00378 " <!-- Non Mozilla specific markup -->\n"
00379 " <script type=\"text/javascript\">\n"
00380 " graphs.push({\n"
00381 " 'title': \"Outgoing Queries for view: <xsl:value-of select=\"@name\"/>\",\n"
00382 " 'target': 'chart_outgoing_queries_view_<xsl:value-of select=\"@name\"/>',\n"
00383 " 'style': 'barchart',\n"
00384 " 'data': [['Type','Counter'],<xsl:for-each select=\"counters[@type="resqtype"]/counter\">['<xsl:value-of select=\"@name\"/>',<xsl:value-of select=\".\"/>],</xsl:for-each>]\n"
00385 " });\n"
00386 " </script>\n"
00387 " <xsl:variable name=\"target\">\n"
00388 " <xsl:value-of select=\"@name\"/>\n"
00389 " </xsl:variable>\n"
00390 " <div class=\"pie\" id=\"chart_outgoing_queries_view_{$target}\">[no data to display]</div>\n"
00391 " </xsl:if>\n"
00392 " <table class=\"counters\">\n"
00393 " <xsl:for-each select=\"counters[@type="resqtype"]/counter\">\n"
00394 " <xsl:sort select=\".\" data-type=\"number\" order=\"descending\"/>\n"
00395 " <xsl:variable name=\"css-class1\">\n"
00396 " <xsl:choose>\n"
00397 " <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
00398 " <xsl:otherwise>odd</xsl:otherwise>\n"
00399 " </xsl:choose>\n"
00400 " </xsl:variable>\n"
00401 " <tr class=\"{$css-class1}\">\n"
00402 " <th>\n"
00403 " <xsl:value-of select=\"@name\"/>\n"
00404 " </th>\n"
00405 " <td>\n"
00406 " <xsl:value-of select=\".\"/>\n"
00407 " </td>\n"
00408 " </tr>\n"
00409 " </xsl:for-each>\n"
00410 " </table>\n"
00411 " <br/>\n"
00412 " </xsl:for-each>\n"
00413 " </xsl:if>\n"
00414 " <xsl:if test=\"server/counters[@type="nsstat"]/counter[.>0]\">\n"
00415 " <h2>Server Statistics</h2>\n"
00416 " <xsl:if test=\"system-property('xsl:vendor')!='Transformiix'\">\n"
00417 " <!-- Non Mozilla specific markup -->\n"
00418 " <script type=\"text/javascript\">\n"
00419 " graphs.push({\n"
00420 " 'title' : \"Server Counters\",\n"
00421 " 'target': 'chart_server_nsstat_restype',\n"
00422 " 'style': 'barchart',\n"
00423 " 'data': [['Type','Counter'],<xsl:for-each select=\"server/counters[@type="nsstat"]/counter[.>0]\">['<xsl:value-of select=\"@name\"/>',<xsl:value-of select=\".\"/>],</xsl:for-each>]\n"
00424 " });\n"
00425 " </script>\n"
00426 " <div class=\"pie\" id=\"chart_server_nsstat_restype\">[no data to display]</div>\n"
00427 " </xsl:if>\n"
00428 " <table class=\"counters\">\n"
00429 " <xsl:for-each select=\"server/counters[@type="nsstat"]/counter[.>0]\">\n"
00430 " <xsl:sort select=\".\" data-type=\"number\" order=\"descending\"/>\n"
00431 " <xsl:variable name=\"css-class2\">\n"
00432 " <xsl:choose>\n"
00433 " <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
00434 " <xsl:otherwise>odd</xsl:otherwise>\n"
00435 " </xsl:choose>\n"
00436 " </xsl:variable>\n"
00437 " <tr class=\"{$css-class2}\">\n"
00438 " <th>\n"
00439 " <xsl:value-of select=\"@name\"/>\n"
00440 " </th>\n"
00441 " <td>\n"
00442 " <xsl:value-of select=\".\"/>\n"
00443 " </td>\n"
00444 " </tr>\n"
00445 " </xsl:for-each>\n"
00446 " </table>\n"
00447 " <br/>\n"
00448 " </xsl:if>\n"
00449 " <xsl:if test=\"server/counters[@type="zonestat"]/counter[.>0]\">\n"
00450 " <xsl:if test=\"system-property('xsl:vendor')!='Transformiix'\">\n"
00451 " <h2>Zone Maintenance Statistics</h2>\n"
00452 " <script type=\"text/javascript\">\n"
00453 " graphs.push({\n"
00454 " 'title' : \"Zone Maintenance Stats\",\n"
00455 " 'target': 'chart_server_zone_maint',\n"
00456 " 'style': 'barchart',\n"
00457 " 'data': [['Type','Counter'],<xsl:for-each select=\"server/counters[@type="zonestat"]/counter[.>0]\">['<xsl:value-of select=\"@name\"/>',<xsl:value-of select=\".\"/>],</xsl:for-each>]\n"
00458 " });\n"
00459 " </script>\n"
00460 " <!-- Non Mozilla specific markup -->\n"
00461 " <div class=\"pie\" id=\"chart_server_zone_maint\">[no data to display]</div>\n"
00462 " </xsl:if>\n"
00463 " <table class=\"counters\">\n"
00464 " <xsl:for-each select=\"server/counters[@type="zonestat"]/counter\">\n"
00465 " <xsl:sort select=\".\" data-type=\"number\" order=\"descending\"/>\n"
00466 " <xsl:variable name=\"css-class3\">\n"
00467 " <xsl:choose>\n"
00468 " <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
00469 " <xsl:otherwise>odd</xsl:otherwise>\n"
00470 " </xsl:choose>\n"
00471 " </xsl:variable>\n"
00472 " <tr class=\"{$css-class3}\">\n"
00473 " <th>\n"
00474 " <xsl:value-of select=\"@name\"/>\n"
00475 " </th>\n"
00476 " <td>\n"
00477 " <xsl:value-of select=\".\"/>\n"
00478 " </td>\n"
00479 " </tr>\n"
00480 " </xsl:for-each>\n"
00481 " </table>\n"
00482 " </xsl:if>\n"
00483 " <xsl:if test=\"server/counters[@type="resstat"]/counter[.>0]\">\n"
00484 " <h2>Resolver Statistics (Common)</h2>\n"
00485 " <table class=\"counters\">\n"
00486 " <xsl:for-each select=\"server/counters[@type="resstat"]/counter\">\n"
00487 " <xsl:sort select=\".\" data-type=\"number\" order=\"descending\"/>\n"
00488 " <xsl:variable name=\"css-class4\">\n"
00489 " <xsl:choose>\n"
00490 " <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
00491 " <xsl:otherwise>odd</xsl:otherwise>\n"
00492 " </xsl:choose>\n"
00493 " </xsl:variable>\n"
00494 " <tr class=\"{$css-class4}\">\n"
00495 " <th>\n"
00496 " <xsl:value-of select=\"@name\"/>\n"
00497 " </th>\n"
00498 " <td>\n"
00499 " <xsl:value-of select=\".\"/>\n"
00500 " </td>\n"
00501 " </tr>\n"
00502 " </xsl:for-each>\n"
00503 " </table>\n"
00504 " </xsl:if>\n"
00505 " <xsl:for-each select=\"views/view\">\n"
00506 " <xsl:if test=\"counters[@type="resstats"]/counter[.>0]\">\n"
00507 " <h3>Resolver Statistics for View <xsl:value-of select=\"@name\"/></h3>\n"
00508 " <table class=\"counters\">\n"
00509 " <xsl:for-each select=\"counters[@type="resstats"]/counter[.>0]\">\n"
00510 " <xsl:sort select=\".\" data-type=\"number\" order=\"descending\"/>\n"
00511 " <xsl:variable name=\"css-class5\">\n"
00512 " <xsl:choose>\n"
00513 " <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
00514 " <xsl:otherwise>odd</xsl:otherwise>\n"
00515 " </xsl:choose>\n"
00516 " </xsl:variable>\n"
00517 " <tr class=\"{$css-class5}\">\n"
00518 " <th>\n"
00519 " <xsl:value-of select=\"@name\"/>\n"
00520 " </th>\n"
00521 " <td>\n"
00522 " <xsl:value-of select=\".\"/>\n"
00523 " </td>\n"
00524 " </tr>\n"
00525 " </xsl:for-each>\n"
00526 " </table>\n"
00527 " </xsl:if>\n"
00528 " </xsl:for-each>\n"
00529 " <xsl:for-each select=\"views/view\">\n"
00530 " <xsl:if test=\"counters[@type="adbstat"]/counter[.>0]\">\n"
00531 " <h3>ADB Statistics for View <xsl:value-of select=\"@name\"/></h3>\n"
00532 " <table class=\"counters\">\n"
00533 " <xsl:for-each select=\"counters[@type="adbstat"]/counter[.>0]\">\n"
00534 " <xsl:sort select=\".\" data-type=\"number\" order=\"descending\"/>\n"
00535 " <xsl:variable name=\"css-class5\">\n"
00536 " <xsl:choose>\n"
00537 " <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
00538 " <xsl:otherwise>odd</xsl:otherwise>\n"
00539 " </xsl:choose>\n"
00540 " </xsl:variable>\n"
00541 " <tr class=\"{$css-class5}\">\n"
00542 " <th>\n"
00543 " <xsl:value-of select=\"@name\"/>\n"
00544 " </th>\n"
00545 " <td>\n"
00546 " <xsl:value-of select=\".\"/>\n"
00547 " </td>\n"
00548 " </tr>\n"
00549 " </xsl:for-each>\n"
00550 " </table>\n"
00551 " </xsl:if>\n"
00552 " </xsl:for-each>\n"
00553 "\n"
00554 " <xsl:for-each select=\"views/view\">\n"
00555 " <xsl:if test=\"counters[@type="cachestats"]/counter[.>0]\">\n"
00556 " <h3>Cache Statistics for View <xsl:value-of select=\"@name\"/></h3>\n"
00557 " <table class=\"counters\">\n"
00558 " <xsl:for-each select=\"counters[@type="cachestats"]/counter[.>0]\">\n"
00559 " <xsl:sort select=\".\" data-type=\"number\" order=\"descending\"/>\n"
00560 " <xsl:variable name=\"css-class5\">\n"
00561 " <xsl:choose>\n"
00562 " <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
00563 " <xsl:otherwise>odd</xsl:otherwise>\n"
00564 " </xsl:choose>\n"
00565 " </xsl:variable>\n"
00566 " <tr class=\"{$css-class5}\">\n"
00567 " <th>\n"
00568 " <xsl:value-of select=\"@name\"/>\n"
00569 " </th>\n"
00570 " <td>\n"
00571 " <xsl:value-of select=\".\"/>\n"
00572 " </td>\n"
00573 " </tr>\n"
00574 " </xsl:for-each>\n"
00575 " </table>\n"
00576 " </xsl:if>\n"
00577 " </xsl:for-each>\n"
00578 "\n"
00579 " <xsl:for-each select=\"views/view\">\n"
00580 " <xsl:if test=\"cache/rrset\">\n"
00581 " <h3>Cache DB RRsets for View <xsl:value-of select=\"@name\"/></h3>\n"
00582 " <table class=\"counters\">\n"
00583 " <xsl:for-each select=\"cache/rrset\">\n"
00584 " <xsl:variable name=\"css-class6\">\n"
00585 " <xsl:choose>\n"
00586 " <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
00587 " <xsl:otherwise>odd</xsl:otherwise>\n"
00588 " </xsl:choose>\n"
00589 " </xsl:variable>\n"
00590 " <tr class=\"{$css-class6}\">\n"
00591 " <th>\n"
00592 " <xsl:value-of select=\"name\"/>\n"
00593 " </th>\n"
00594 " <td>\n"
00595 " <xsl:value-of select=\"counter\"/>\n"
00596 " </td>\n"
00597 " </tr>\n"
00598 " </xsl:for-each>\n"
00599 " </table>\n"
00600 " <br/>\n"
00601 " </xsl:if>\n"
00602 " </xsl:for-each>\n"
00603 "\n"
00604 " <xsl:if test=\"server/counters[@type="sockstat"]/counter[.>0]\">\n"
00605 " <h2>Socket I/O Statistics</h2>\n"
00606 " <table class=\"counters\">\n"
00607 " <xsl:for-each select=\"server/counters[@type="sockstat"]/counter[.>0]\">\n"
00608 " <xsl:variable name=\"css-class7\">\n"
00609 " <xsl:choose>\n"
00610 " <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
00611 " <xsl:otherwise>odd</xsl:otherwise>\n"
00612 " </xsl:choose>\n"
00613 " </xsl:variable>\n"
00614 " <tr class=\"{$css-class7}\">\n"
00615 " <th>\n"
00616 " <xsl:value-of select=\"@name\"/>\n"
00617 " </th>\n"
00618 " <td>\n"
00619 " <xsl:value-of select=\".\"/>\n"
00620 " </td>\n"
00621 " </tr>\n"
00622 " </xsl:for-each>\n"
00623 " </table>\n"
00624 " <br/>\n"
00625 " </xsl:if>\n"
00626 " <xsl:if test=\"views/view[zones/zone/counters[@type="qtype"]/counter >0]\">\n"
00627 " <h2>Received QTYPES per view/zone</h2>\n"
00628 " <xsl:for-each select=\"views/view[zones/zone/counters[@type="qtype"]/counter >0]\">\n"
00629 " <h3>View <xsl:value-of select=\"@name\"/></h3>\n"
00630 " <xsl:variable name=\"thisview\">\n"
00631 " <xsl:value-of select=\"@name\"/>\n"
00632 " </xsl:variable>\n"
00633 " <xsl:for-each select=\"zones/zone\">\n"
00634 " <xsl:if test=\"counters[@type="qtype"]/counter[count(.) > 0]\">\n"
00635 " <h4>Zone <xsl:value-of select=\"@name\"/></h4>\n"
00636 " <xsl:if test=\"system-property('xsl:vendor')!='Transformiix'\">\n"
00637 " <!-- Non Mozilla specific markup -->\n"
00638 " <script type=\"text/javascript\">\n"
00639 " graphs.push({\n"
00640 " 'title': \"Query types for zone <xsl:value-of select=\"@name\"/>\",\n"
00641 " 'target': 'chart_qtype_<xsl:value-of select=\"../../@name\"/>_<xsl:value-of select=\"@name\"/>',\n"
00642 " 'style': 'barchart',\n"
00643 " 'data': [['Type','Counter'],<xsl:for-each select=\"counters[@type="qtype"]/counter[.>0 and @name != "QryAuthAns"]\">['<xsl:value-of select=\"@name\"/>',<xsl:value-of select=\".\"/>],</xsl:for-each>]\n"
00644 " });\n"
00645 "\n"
00646 " </script>\n"
00647 " <xsl:variable name=\"target\">\n"
00648 " <xsl:value-of select=\"@name\"/>\n"
00649 " </xsl:variable>\n"
00650 " <div class=\"pie\" id=\"chart_qtype_{$thisview}_{$target}\">[no data to display]</div>\n"
00651 " </xsl:if>\n"
00652 " <table class=\"counters\">\n"
00653 " <xsl:for-each select=\"counters[@type="qtype"]/counter\">\n"
00654 " <xsl:sort select=\".\"/>\n"
00655 " <xsl:variable name=\"css-class10\">\n"
00656 " <xsl:choose>\n"
00657 " <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
00658 " <xsl:otherwise>odd</xsl:otherwise>\n"
00659 " </xsl:choose>\n"
00660 " </xsl:variable>\n"
00661 " <tr class=\"{$css-class10}\">\n"
00662 " <th>\n"
00663 " <xsl:value-of select=\"@name\"/>\n"
00664 " </th>\n"
00665 " <td>\n"
00666 " <xsl:value-of select=\".\"/>\n"
00667 " </td>\n"
00668 " </tr>\n"
00669 " </xsl:for-each>\n"
00670 " </table>\n"
00671 " </xsl:if>\n"
00672 " </xsl:for-each>\n"
00673 " </xsl:for-each>\n"
00674 " </xsl:if>\n"
00675 " <xsl:if test=\"views/view[zones/zone/counters[@type="rcode"]/counter >0]\">\n"
00676 " <h2>Response Codes per view/zone</h2>\n"
00677 " <xsl:for-each select=\"views/view[zones/zone/counters[@type="rcode"]/counter >0]\">\n"
00678 " <h3>View <xsl:value-of select=\"@name\"/></h3>\n"
00679 " <xsl:variable name=\"thisview2\">\n"
00680 " <xsl:value-of select=\"@name\"/>\n"
00681 " </xsl:variable>\n"
00682 " <xsl:for-each select=\"zones/zone\">\n"
00683 " <xsl:if test=\"counters[@type="rcode"]/counter[. > 0]\">\n"
00684 " <h4>Zone <xsl:value-of select=\"@name\"/></h4>\n"
00685 " <xsl:if test=\"system-property('xsl:vendor')!='Transformiix'\">\n"
00686 " <!-- Non Mozilla specific markup -->\n"
00687 " <script type=\"text/javascript\">\n"
00688 " graphs.push({\n"
00689 " 'title': \"Response codes for zone <xsl:value-of select=\"@name\"/>\",\n"
00690 " 'target': 'chart_rescode_<xsl:value-of select=\"../../@name\"/>_<xsl:value-of select=\"@name\"/>',\n"
00691 " 'style': 'barchart',\n"
00692 " 'data': [['Type','Counter'],<xsl:for-each select=\"counters[@type="rcode"]/counter[.>0 and @name != "QryAuthAns"]\">['<xsl:value-of select=\"@name\"/>',<xsl:value-of select=\".\"/>],</xsl:for-each>]\n"
00693 " });\n"
00694 "\n"
00695 " </script>\n"
00696 " <xsl:variable name=\"target\">\n"
00697 " <xsl:value-of select=\"@name\"/>\n"
00698 " </xsl:variable>\n"
00699 " <div class=\"pie\" id=\"chart_rescode_{$thisview2}_{$target}\">[no data to display]</div>\n"
00700 " </xsl:if>\n"
00701 " <table class=\"counters\">\n"
00702 " <xsl:for-each select=\"counters[@type="rcode"]/counter[.>0 and @name != "QryAuthAns"]\">\n"
00703 " <xsl:sort select=\".\"/>\n"
00704 " <xsl:variable name=\"css-class11\">\n"
00705 " <xsl:choose>\n"
00706 " <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
00707 " <xsl:otherwise>odd</xsl:otherwise>\n"
00708 " </xsl:choose>\n"
00709 " </xsl:variable>\n"
00710 " <tr class=\"{$css-class11}\">\n"
00711 " <th>\n"
00712 " <xsl:value-of select=\"@name\"/>\n"
00713 " </th>\n"
00714 " <td>\n"
00715 " <xsl:value-of select=\".\"/>\n"
00716 " </td>\n"
00717 " </tr>\n"
00718 " </xsl:for-each>\n"
00719 " </table>\n"
00720 " </xsl:if>\n"
00721 " </xsl:for-each>\n"
00722 " </xsl:for-each>\n"
00723 " </xsl:if>\n"
00724 " <xsl:if test=\"socketmgr/sockets/socket\">\n"
00725 " <h2>Network Status</h2>\n"
00726 " <table class=\"netstat\">\n"
00727 " <tr>\n"
00728 " <th>ID</th>\n"
00729 " <th>Name</th>\n"
00730 " <th>Type</th>\n"
00731 " <th>References</th>\n"
00732 " <th>LocalAddress</th>\n"
00733 " <th>PeerAddress</th>\n"
00734 " <th>State</th>\n"
00735 " </tr>\n"
00736 " <xsl:for-each select=\"socketmgr/sockets/socket\">\n"
00737 " <xsl:sort select=\"id\"/>\n"
00738 " <xsl:variable name=\"css-class12\">\n"
00739 " <xsl:choose>\n"
00740 " <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
00741 " <xsl:otherwise>odd</xsl:otherwise>\n"
00742 " </xsl:choose>\n"
00743 " </xsl:variable>\n"
00744 " <tr class=\"{$css-class12}\">\n"
00745 " <td>\n"
00746 " <xsl:value-of select=\"id\"/>\n"
00747 " </td>\n"
00748 " <td>\n"
00749 " <xsl:value-of select=\"name\"/>\n"
00750 " </td>\n"
00751 " <td>\n"
00752 " <xsl:value-of select=\"type\"/>\n"
00753 " </td>\n"
00754 " <td>\n"
00755 " <xsl:value-of select=\"references\"/>\n"
00756 " </td>\n"
00757 " <td>\n"
00758 " <xsl:value-of select=\"local-address\"/>\n"
00759 " </td>\n"
00760 " <td>\n"
00761 " <xsl:value-of select=\"peer-address\"/>\n"
00762 " </td>\n"
00763 " <td>\n"
00764 " <xsl:for-each select=\"states\">\n"
00765 " <xsl:value-of select=\".\"/>\n"
00766 " </xsl:for-each>\n"
00767 " </td>\n"
00768 " </tr>\n"
00769 " </xsl:for-each>\n"
00770 " </table>\n"
00771 " <br/>\n"
00772 " </xsl:if>\n"
00773 " <xsl:if test=\"taskmgr/thread-model/type\">\n"
00774 " <h2>Task Manager Configuration</h2>\n"
00775 " <table class=\"counters\">\n"
00776 " <tr>\n"
00777 " <th class=\"even\">Thread-Model</th>\n"
00778 " <td>\n"
00779 " <xsl:value-of select=\"taskmgr/thread-model/type\"/>\n"
00780 " </td>\n"
00781 " </tr>\n"
00782 " <tr class=\"odd\">\n"
00783 " <th>Worker Threads</th>\n"
00784 " <td>\n"
00785 " <xsl:value-of select=\"taskmgr/thread-model/worker-threads\"/>\n"
00786 " </td>\n"
00787 " </tr>\n"
00788 " <tr class=\"even\">\n"
00789 " <th>Default Quantum</th>\n"
00790 " <td>\n"
00791 " <xsl:value-of select=\"taskmgr/thread-model/default-quantum\"/>\n"
00792 " </td>\n"
00793 " </tr>\n"
00794 " <tr class=\"odd\">\n"
00795 " <th>Tasks Running</th>\n"
00796 " <td>\n"
00797 " <xsl:value-of select=\"taskmgr/thread-model/tasks-running\"/>\n"
00798 " </td>\n"
00799 " </tr>\n"
00800 " <tr class=\"even\">\n"
00801 " <th>Tasks Ready</th>\n"
00802 " <td>\n"
00803 " <xsl:value-of select=\"taskmgr/thread-model/tasks-ready\"/>\n"
00804 " </td>\n"
00805 " </tr>\n"
00806 " </table>\n"
00807 " <br/>\n"
00808 " </xsl:if>\n"
00809 " <xsl:if test=\"taskmgr/tasks/task\">\n"
00810 " <h2>Tasks</h2>\n"
00811 " <table class=\"tasks\">\n"
00812 " <tr>\n"
00813 " <th>ID</th>\n"
00814 " <th>Name</th>\n"
00815 " <th>References</th>\n"
00816 " <th>State</th>\n"
00817 " <th>Quantum</th>\n"
00818 " <th>Events</th>\n"
00819 " </tr>\n"
00820 " <xsl:for-each select=\"taskmgr/tasks/task\">\n"
00821 " <xsl:sort select=\"name\"/>\n"
00822 " <xsl:variable name=\"css-class14\">\n"
00823 " <xsl:choose>\n"
00824 " <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
00825 " <xsl:otherwise>odd</xsl:otherwise>\n"
00826 " </xsl:choose>\n"
00827 " </xsl:variable>\n"
00828 " <tr class=\"{$css-class14}\">\n"
00829 " <td>\n"
00830 " <xsl:value-of select=\"id\"/>\n"
00831 " </td>\n"
00832 " <td>\n"
00833 " <xsl:value-of select=\"name\"/>\n"
00834 " </td>\n"
00835 " <td>\n"
00836 " <xsl:value-of select=\"references\"/>\n"
00837 " </td>\n"
00838 " <td>\n"
00839 " <xsl:value-of select=\"state\"/>\n"
00840 " </td>\n"
00841 " <td>\n"
00842 " <xsl:value-of select=\"quantum\"/>\n"
00843 " </td>\n"
00844 " <td>\n"
00845 " <xsl:value-of select=\"events\"/>\n"
00846 " </td>\n"
00847 " </tr>\n"
00848 " </xsl:for-each>\n"
00849 " </table>\n"
00850 " <br/>\n"
00851 " </xsl:if>\n"
00852 " <xsl:if test=\"memory/summary\">\n"
00853 " <h2>Memory Usage Summary</h2>\n"
00854 " <table class=\"counters\">\n"
00855 " <xsl:for-each select=\"memory/summary/*\">\n"
00856 " <xsl:variable name=\"css-class13\">\n"
00857 " <xsl:choose>\n"
00858 " <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
00859 " <xsl:otherwise>odd</xsl:otherwise>\n"
00860 " </xsl:choose>\n"
00861 " </xsl:variable>\n"
00862 " <tr class=\"{$css-class13}\">\n"
00863 " <th>\n"
00864 " <xsl:value-of select=\"name()\"/>\n"
00865 " </th>\n"
00866 " <td>\n"
00867 " <xsl:value-of select=\".\"/>\n"
00868 " </td>\n"
00869 " </tr>\n"
00870 " </xsl:for-each>\n"
00871 " </table>\n"
00872 " <br/>\n"
00873 " </xsl:if>\n"
00874 " <xsl:if test=\"memory/contexts/context\">\n"
00875 " <h2>Memory Contexts</h2>\n"
00876 " <table class=\"mctx\">\n"
00877 " <tr>\n"
00878 " <th>ID</th>\n"
00879 " <th>Name</th>\n"
00880 " <th>References</th>\n"
00881 " <th>TotalUse</th>\n"
00882 " <th>InUse</th>\n"
00883 " <th>MaxUse</th>\n"
00884 " <th>BlockSize</th>\n"
00885 " <th>Pools</th>\n"
00886 " <th>HiWater</th>\n"
00887 " <th>LoWater</th>\n"
00888 " </tr>\n"
00889 " <xsl:for-each select=\"memory/contexts/context\">\n"
00890 " <xsl:sort select=\"total\" data-type=\"number\" order=\"descending\"/>\n"
00891 " <xsl:variable name=\"css-class14\">\n"
00892 " <xsl:choose>\n"
00893 " <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
00894 " <xsl:otherwise>odd</xsl:otherwise>\n"
00895 " </xsl:choose>\n"
00896 " </xsl:variable>\n"
00897 " <tr class=\"{$css-class14}\">\n"
00898 " <td>\n"
00899 " <xsl:value-of select=\"id\"/>\n"
00900 " </td>\n"
00901 " <td>\n"
00902 " <xsl:value-of select=\"name\"/>\n"
00903 " </td>\n"
00904 " <td>\n"
00905 " <xsl:value-of select=\"references\"/>\n"
00906 " </td>\n"
00907 " <td>\n"
00908 " <xsl:value-of select=\"total\"/>\n"
00909 " </td>\n"
00910 " <td>\n"
00911 " <xsl:value-of select=\"inuse\"/>\n"
00912 " </td>\n"
00913 " <td>\n"
00914 " <xsl:value-of select=\"maxinuse\"/>\n"
00915 " </td>\n"
00916 " <td>\n"
00917 " <xsl:value-of select=\"blocksize\"/>\n"
00918 " </td>\n"
00919 " <td>\n"
00920 " <xsl:value-of select=\"pools\"/>\n"
00921 " </td>\n"
00922 " <td>\n"
00923 " <xsl:value-of select=\"hiwater\"/>\n"
00924 " </td>\n"
00925 " <td>\n"
00926 " <xsl:value-of select=\"lowater\"/>\n"
00927 " </td>\n"
00928 " </tr>\n"
00929 " </xsl:for-each>\n"
00930 " </table>\n"
00931 " </xsl:if>\n"
00932 " <hr/>\n"
00933 " <p class=\"footer\">Internet Systems Consortium Inc.<br/><a href=\"http://www.isc.org\">http://www.isc.org</a></p>\n"
00934 " </body>\n"
00935 " </html>\n"
00936 " </xsl:template>\n"
00937 "</xsl:stylesheet>\n";