etc/services - sync with NetBSD-8
[minix.git] / external / bsd / bind / dist / bin / named / bind9.xsl
blobdf4d6153b770ea67bd13d0b78dcb5dc8607b557a
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 - Copyright (C) 2006-2009, 2012-2014 Internet Systems Consortium, Inc. ("ISC")
5 - Permission to use, copy, modify, and/or distribute this software for any
6 - purpose with or without fee is hereby granted, provided that the above
7 - copyright notice and this permission notice appear in all copies.
9 - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10 - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 - PERFORMANCE OF THIS SOFTWARE.
16 -->
18 <!-- Id -->
20 <!-- %Id: bind9.xsl,v 1.21 2009/01/27 23:47:54 tbox Exp % -->
21 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
22 <xsl:output method="html" indent="yes" version="4.0"/>
23 <xsl:template match="statistics[@version=&quot;3.5&quot;]">
24 <html>
25 <head>
26 <xsl:if test="system-property('xsl:vendor')!='Transformiix'">
27 <!-- Non Mozilla specific markup -->
28 <script type="text/javascript" src="https://www.google.com/jsapi"/>
29 <script type="text/javascript">
31 google.load("visualization", "1", {packages:["corechart"]});
32 google.setOnLoadCallback(loadGraphs);
34 var graphs=[];
36 function drawChart(chart_title,target,style,data) {
37 var data = google.visualization.arrayToDataTable(data);
39 var options = {
40 title: chart_title
43 var chart;
44 if (style == "barchart") {
45 chart = new google.visualization.BarChart(document.getElementById(target));
46 chart.draw(data, options);
47 } else if (style == "piechart") {
48 chart = new google.visualization.PieChart(document.getElementById(target));
49 chart.draw(data, options);
53 function loadGraphs(){
54 var g;
56 while(g = graphs.shift()){
57 // alert("going for: " + g.target);
58 if(g.data.length > 1){
59 drawChart(g.title,g.target,g.style,g.data);
64 <xsl:if test="server/counters[@type=&quot;qtype&quot;]/counter">
65 // Server Incoming Query Types
66 graphs.push({
67 'title' : "Server Incoming Query Types",
68 'target': 'chart_incoming_qtypes',
69 'style': 'barchart',
70 '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>]
71 });
72 </xsl:if>
74 <xsl:if test="server/counters[@type=&quot;opcode&quot;]/counter">
75 // Server Incoming Requests by opcode
76 graphs.push({
77 'title' : "Server Incoming Requests by DNS Opcode",
78 'target': 'chart_incoming_opcodes',
79 'style': 'barchart',
80 'data': [['Opcode','Counter'],<xsl:for-each select="server/counters[@type=&quot;opcode&quot;]/counter[. &gt; 0 or substring(@name,1,3) != 'RES']">['<xsl:value-of select="@name"/>',<xsl:value-of select="."/>],</xsl:for-each>]});
81 </xsl:if>
82 </script>
83 </xsl:if>
84 <style type="text/css">
85 body {
86 font-family: sans-serif;
87 background-color: #ffffff;
88 color: #000000;
89 font-size: 10pt;
92 .odd{
93 background-color: #f0f0f0;
96 .even{
97 background-color: #ffffff;
100 p.footer{
101 font-style:italic;
102 color: grey;
105 table {
106 border-collapse: collapse;
107 border: 1px solid grey;
110 table.counters{
111 border: 1px solid grey;
112 width: 500px;
114 table.counters th {
115 text-align: right;
116 border: 1px solid grey;
117 width: 150px;
119 table.counters td {
120 text-align: right;
121 font-family: monospace;
123 table.counters tr:hover{
124 background-color: #99ddff;
127 table.info {
128 border: 1px solid grey;
129 width: 500px;
131 table.info th {
132 text-align: center;
133 border: 1px solid grey;
134 width: 150px;
136 table.info td {
137 text-align: center;
139 table.info tr:hover{
140 background-color: #99ddff;
143 table.tasks {
144 border: 1px solid grey;
145 width: 500px;
147 table.tasks th {
148 text-align: center;
149 border: 1px solid grey;
150 width: 150px;
152 table.tasks td {
153 text-align: right;
154 font-family: monospace;
156 table.tasks td:nth-child(2) {
157 text-align: center;
159 table.tasks td:nth-child(4) {
160 text-align: center;
162 table.tasks tr:hover{
163 background-color: #99ddff;
166 table.netstat {
167 border: 1px solid grey;
168 width: 500px;
170 table.netstat th {
171 text-align: center;
172 border: 1px solid grey;
173 width: 150px;
175 table.netstat td {
176 text-align: center;
178 table.netstat td:nth-child(4) {
179 text-align: right;
180 font-family: monospace;
182 table.netstat td:nth-child(7) {
183 text-align: left;
185 table.netstat tr:hover{
186 background-color: #99ddff;
189 table.mctx {
190 border: 1px solid grey;
191 width: 500px;
193 table.mctx th {
194 text-align: center;
195 border: 1px solid grey;
197 table.mctx td {
198 text-align: right;
199 font-family: monospace;
201 table.mctx td:nth-child(-n+2) {
202 text-align: left;
203 width: 100px;
205 table.mctx tr:hover{
206 background-color: #99ddff;
209 .totals {
210 background-color: rgb(1,169,206);
211 color: #ffffff;
214 td, th {
215 padding-right: 5px;
216 padding-left: 5px;
217 border: 1px solid grey;
220 .header h1 {
221 color: rgb(1,169,206);
222 padding: 0px;
225 .content {
226 background-color: #ffffff;
227 color: #000000;
228 padding: 4px;
231 .item {
232 padding: 4px;
233 text-align: right;
236 .value {
237 padding: 4px;
238 font-weight: bold;
242 h2 {
243 color: grey;
244 font-size: 14pt;
245 width:500px;
246 text-align:center;
249 h3 {
250 color: #444444;
251 font-size: 12pt;
252 width:500px;
253 text-align:center;
255 h4 {
256 color: rgb(1,169,206);
257 font-size: 10pt;
258 width:500px;
259 text-align:center;
262 .pie {
263 width:500px;
264 height: 500px;
267 </style>
268 <title>ISC BIND 9 Statistics</title>
269 </head>
270 <body>
271 <div class="header">
272 <h1>ISC Bind 9 Configuration and Statistics</h1>
273 </div>
274 <p>Alternate statistics views: <a href="/">All</a>,
275 <a href="/xml/v3/status">Status</a>,
276 <a href="/xml/v3/server">Server</a>,
277 <a href="/xml/v3/zones">Zones</a>,
278 <a href="/xml/v3/net">Network</a>,
279 <a href="/xml/v3/tasks">Tasks</a> and
280 <a href="/xml/v3/mem">Memory</a></p>
281 <hr/>
282 <h2>Server Status</h2>
283 <table class="info">
284 <tr>
285 <th>Boot time:</th>
286 <td>
287 <xsl:value-of select="server/boot-time"/>
288 </td>
289 </tr>
290 <tr>
291 <th>Last reconfigured:</th>
292 <td>
293 <xsl:value-of select="server/config-time"/>
294 </td>
295 </tr>
296 <tr>
297 <th>Current time:</th>
298 <td>
299 <xsl:value-of select="server/current-time"/>
300 </td>
301 </tr>
302 </table>
303 <br/>
304 <xsl:if test="server/counters[@type=&quot;opcode&quot;]/counter[. &gt; 0]">
305 <xsl:if test="system-property('xsl:vendor')!='Transformiix'">
306 <h2>Incoming Requests by DNS Opcode</h2>
307 <!-- Non Mozilla specific markup -->
308 <div class="pie" id="chart_incoming_opcodes">
309 [cannot display chart]
310 </div>
311 </xsl:if>
312 <table class="counters">
313 <xsl:for-each select="server/counters[@type=&quot;opcode&quot;]/counter[. &gt; 0 or substring(@name,1,3) != 'RES']">
314 <xsl:sort select="." data-type="number" order="descending"/>
315 <tr>
316 <th>
317 <xsl:value-of select="@name"/>
318 </th>
319 <td>
320 <xsl:value-of select="."/>
321 </td>
322 </tr>
323 </xsl:for-each>
324 <tr>
325 <th class="totals">Total:</th>
326 <td class="totals">
327 <xsl:value-of select="sum(server/counters[@type=&quot;opcode&quot;]/counter)"/>
328 </td>
329 </tr>
330 </table>
331 <br/>
332 </xsl:if>
333 <xsl:if test="server/counters[@type=&quot;qtype&quot;]/counter">
334 <xsl:if test="system-property('xsl:vendor')!='Transformiix'">
335 <!-- Non Mozilla specific markup -->
336 <h3>Incoming Queries by Query Type</h3>
337 <div class="pie" id="chart_incoming_qtypes">
338 [cannot display chart]
339 </div>
340 </xsl:if>
341 <table class="counters">
342 <xsl:for-each select="server/counters[@type=&quot;qtype&quot;]/counter">
343 <xsl:sort select="." data-type="number" order="descending"/>
344 <xsl:variable name="css-class">
345 <xsl:choose>
346 <xsl:when test="position() mod 2 = 0">even</xsl:when>
347 <xsl:otherwise>odd</xsl:otherwise>
348 </xsl:choose>
349 </xsl:variable>
350 <tr class="{$css-class}">
351 <th>
352 <xsl:value-of select="@name"/>
353 </th>
354 <td>
355 <xsl:value-of select="."/>
356 </td>
357 </tr>
358 </xsl:for-each>
359 <tr>
360 <th class="totals">Total:</th>
361 <td class="totals">
362 <xsl:value-of select="sum(server/counters[@type=&quot;qtype&quot;]/counter)"/>
363 </td>
364 </tr>
365 </table>
366 <br/>
367 </xsl:if>
368 <xsl:if test="views/view[count(counters[@type=&quot;resqtype&quot;]/counter) &gt; 0]">
369 <h2>Outgoing Queries per view</h2>
370 <xsl:for-each select="views/view[count(counters[@type=&quot;resqtype&quot;]/counter) &gt; 0]">
371 <h3>View <xsl:value-of select="@name"/></h3>
372 <xsl:if test="system-property('xsl:vendor')!='Transformiix'">
373 <!-- Non Mozilla specific markup -->
374 <script type="text/javascript">
375 graphs.push({
376 'title': "Outgoing Queries for view: <xsl:value-of select="@name"/>",
377 'target': 'chart_outgoing_queries_view_<xsl:value-of select="@name"/>',
378 'style': 'barchart',
379 '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>]
381 </script>
382 <xsl:variable name="target">
383 <xsl:value-of select="@name"/>
384 </xsl:variable>
385 <div class="pie" id="chart_outgoing_queries_view_{$target}">[no data to display]</div>
386 </xsl:if>
387 <table class="counters">
388 <xsl:for-each select="counters[@type=&quot;resqtype&quot;]/counter">
389 <xsl:sort select="." data-type="number" order="descending"/>
390 <xsl:variable name="css-class1">
391 <xsl:choose>
392 <xsl:when test="position() mod 2 = 0">even</xsl:when>
393 <xsl:otherwise>odd</xsl:otherwise>
394 </xsl:choose>
395 </xsl:variable>
396 <tr class="{$css-class1}">
397 <th>
398 <xsl:value-of select="@name"/>
399 </th>
400 <td>
401 <xsl:value-of select="."/>
402 </td>
403 </tr>
404 </xsl:for-each>
405 </table>
406 <br/>
407 </xsl:for-each>
408 </xsl:if>
409 <xsl:if test="server/counters[@type=&quot;nsstat&quot;]/counter[.&gt;0]">
410 <h2>Server Statistics</h2>
411 <xsl:if test="system-property('xsl:vendor')!='Transformiix'">
412 <!-- Non Mozilla specific markup -->
413 <script type="text/javascript">
414 graphs.push({
415 'title' : "Server Counters",
416 'target': 'chart_server_nsstat_restype',
417 'style': 'barchart',
418 '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>]
420 </script>
421 <div class="pie" id="chart_server_nsstat_restype">[no data to display]</div>
422 </xsl:if>
423 <table class="counters">
424 <xsl:for-each select="server/counters[@type=&quot;nsstat&quot;]/counter[.&gt;0]">
425 <xsl:sort select="." data-type="number" order="descending"/>
426 <xsl:variable name="css-class2">
427 <xsl:choose>
428 <xsl:when test="position() mod 2 = 0">even</xsl:when>
429 <xsl:otherwise>odd</xsl:otherwise>
430 </xsl:choose>
431 </xsl:variable>
432 <tr class="{$css-class2}">
433 <th>
434 <xsl:value-of select="@name"/>
435 </th>
436 <td>
437 <xsl:value-of select="."/>
438 </td>
439 </tr>
440 </xsl:for-each>
441 </table>
442 <br/>
443 </xsl:if>
444 <xsl:if test="server/counters[@type=&quot;zonestat&quot;]/counter[.&gt;0]">
445 <xsl:if test="system-property('xsl:vendor')!='Transformiix'">
446 <h2>Zone Maintenance Statistics</h2>
447 <script type="text/javascript">
448 graphs.push({
449 'title' : "Zone Maintenance Stats",
450 'target': 'chart_server_zone_maint',
451 'style': 'barchart',
452 'data': [['Type','Counter'],<xsl:for-each select="server/counters[@type=&quot;zonestat&quot;]/counter[.&gt;0]">['<xsl:value-of select="@name"/>',<xsl:value-of select="."/>],</xsl:for-each>]
454 </script>
455 <!-- Non Mozilla specific markup -->
456 <div class="pie" id="chart_server_zone_maint">[no data to display]</div>
457 </xsl:if>
458 <table class="counters">
459 <xsl:for-each select="server/counters[@type=&quot;zonestat&quot;]/counter">
460 <xsl:sort select="." data-type="number" order="descending"/>
461 <xsl:variable name="css-class3">
462 <xsl:choose>
463 <xsl:when test="position() mod 2 = 0">even</xsl:when>
464 <xsl:otherwise>odd</xsl:otherwise>
465 </xsl:choose>
466 </xsl:variable>
467 <tr class="{$css-class3}">
468 <th>
469 <xsl:value-of select="@name"/>
470 </th>
471 <td>
472 <xsl:value-of select="."/>
473 </td>
474 </tr>
475 </xsl:for-each>
476 </table>
477 </xsl:if>
478 <xsl:if test="server/counters[@type=&quot;resstat&quot;]/counter[.&gt;0]">
479 <h2>Resolver Statistics (Common)</h2>
480 <table class="counters">
481 <xsl:for-each select="server/counters[@type=&quot;resstat&quot;]/counter">
482 <xsl:sort select="." data-type="number" order="descending"/>
483 <xsl:variable name="css-class4">
484 <xsl:choose>
485 <xsl:when test="position() mod 2 = 0">even</xsl:when>
486 <xsl:otherwise>odd</xsl:otherwise>
487 </xsl:choose>
488 </xsl:variable>
489 <tr class="{$css-class4}">
490 <th>
491 <xsl:value-of select="@name"/>
492 </th>
493 <td>
494 <xsl:value-of select="."/>
495 </td>
496 </tr>
497 </xsl:for-each>
498 </table>
499 </xsl:if>
500 <xsl:for-each select="views/view">
501 <xsl:if test="counters[@type=&quot;resstats&quot;]/counter[.&gt;0]">
502 <h3>Resolver Statistics for View <xsl:value-of select="@name"/></h3>
503 <table class="counters">
504 <xsl:for-each select="counters[@type=&quot;resstats&quot;]/counter[.&gt;0]">
505 <xsl:sort select="." data-type="number" order="descending"/>
506 <xsl:variable name="css-class5">
507 <xsl:choose>
508 <xsl:when test="position() mod 2 = 0">even</xsl:when>
509 <xsl:otherwise>odd</xsl:otherwise>
510 </xsl:choose>
511 </xsl:variable>
512 <tr class="{$css-class5}">
513 <th>
514 <xsl:value-of select="@name"/>
515 </th>
516 <td>
517 <xsl:value-of select="."/>
518 </td>
519 </tr>
520 </xsl:for-each>
521 </table>
522 </xsl:if>
523 </xsl:for-each>
524 <xsl:for-each select="views/view">
525 <xsl:if test="counters[@type=&quot;adbstat&quot;]/counter[.&gt;0]">
526 <h3>ADB Statistics for View <xsl:value-of select="@name"/></h3>
527 <table class="counters">
528 <xsl:for-each select="counters[@type=&quot;adbstat&quot;]/counter[.&gt;0]">
529 <xsl:sort select="." data-type="number" order="descending"/>
530 <xsl:variable name="css-class5">
531 <xsl:choose>
532 <xsl:when test="position() mod 2 = 0">even</xsl:when>
533 <xsl:otherwise>odd</xsl:otherwise>
534 </xsl:choose>
535 </xsl:variable>
536 <tr class="{$css-class5}">
537 <th>
538 <xsl:value-of select="@name"/>
539 </th>
540 <td>
541 <xsl:value-of select="."/>
542 </td>
543 </tr>
544 </xsl:for-each>
545 </table>
546 </xsl:if>
547 </xsl:for-each>
549 <xsl:for-each select="views/view">
550 <xsl:if test="counters[@type=&quot;cachestats&quot;]/counter[.&gt;0]">
551 <h3>Cache Statistics for View <xsl:value-of select="@name"/></h3>
552 <table class="counters">
553 <xsl:for-each select="counters[@type=&quot;cachestats&quot;]/counter[.&gt;0]">
554 <xsl:sort select="." data-type="number" order="descending"/>
555 <xsl:variable name="css-class5">
556 <xsl:choose>
557 <xsl:when test="position() mod 2 = 0">even</xsl:when>
558 <xsl:otherwise>odd</xsl:otherwise>
559 </xsl:choose>
560 </xsl:variable>
561 <tr class="{$css-class5}">
562 <th>
563 <xsl:value-of select="@name"/>
564 </th>
565 <td>
566 <xsl:value-of select="."/>
567 </td>
568 </tr>
569 </xsl:for-each>
570 </table>
571 </xsl:if>
572 </xsl:for-each>
574 <xsl:for-each select="views/view">
575 <xsl:if test="cache/rrset">
576 <h3>Cache DB RRsets for View <xsl:value-of select="@name"/></h3>
577 <table class="counters">
578 <xsl:for-each select="cache/rrset">
579 <xsl:variable name="css-class6">
580 <xsl:choose>
581 <xsl:when test="position() mod 2 = 0">even</xsl:when>
582 <xsl:otherwise>odd</xsl:otherwise>
583 </xsl:choose>
584 </xsl:variable>
585 <tr class="{$css-class6}">
586 <th>
587 <xsl:value-of select="name"/>
588 </th>
589 <td>
590 <xsl:value-of select="counter"/>
591 </td>
592 </tr>
593 </xsl:for-each>
594 </table>
595 <br/>
596 </xsl:if>
597 </xsl:for-each>
599 <xsl:if test="server/counters[@type=&quot;sockstat&quot;]/counter[.&gt;0]">
600 <h2>Socket I/O Statistics</h2>
601 <table class="counters">
602 <xsl:for-each select="server/counters[@type=&quot;sockstat&quot;]/counter[.&gt;0]">
603 <xsl:variable name="css-class7">
604 <xsl:choose>
605 <xsl:when test="position() mod 2 = 0">even</xsl:when>
606 <xsl:otherwise>odd</xsl:otherwise>
607 </xsl:choose>
608 </xsl:variable>
609 <tr class="{$css-class7}">
610 <th>
611 <xsl:value-of select="@name"/>
612 </th>
613 <td>
614 <xsl:value-of select="."/>
615 </td>
616 </tr>
617 </xsl:for-each>
618 </table>
619 <br/>
620 </xsl:if>
621 <xsl:if test="views/view[zones/zone/counters[@type=&quot;qtype&quot;]/counter &gt;0]">
622 <h2>Received QTYPES per view/zone</h2>
623 <xsl:for-each select="views/view[zones/zone/counters[@type=&quot;qtype&quot;]/counter &gt;0]">
624 <h3>View <xsl:value-of select="@name"/></h3>
625 <xsl:variable name="thisview">
626 <xsl:value-of select="@name"/>
627 </xsl:variable>
628 <xsl:for-each select="zones/zone">
629 <xsl:if test="counters[@type=&quot;qtype&quot;]/counter[count(.) &gt; 0]">
630 <h4>Zone <xsl:value-of select="@name"/></h4>
631 <xsl:if test="system-property('xsl:vendor')!='Transformiix'">
632 <!-- Non Mozilla specific markup -->
633 <script type="text/javascript">
634 graphs.push({
635 'title': "Query types for zone <xsl:value-of select="@name"/>",
636 'target': 'chart_qtype_<xsl:value-of select="../../@name"/>_<xsl:value-of select="@name"/>',
637 'style': 'barchart',
638 '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>]
641 </script>
642 <xsl:variable name="target">
643 <xsl:value-of select="@name"/>
644 </xsl:variable>
645 <div class="pie" id="chart_qtype_{$thisview}_{$target}">[no data to display]</div>
646 </xsl:if>
647 <table class="counters">
648 <xsl:for-each select="counters[@type=&quot;qtype&quot;]/counter">
649 <xsl:sort select="."/>
650 <xsl:variable name="css-class10">
651 <xsl:choose>
652 <xsl:when test="position() mod 2 = 0">even</xsl:when>
653 <xsl:otherwise>odd</xsl:otherwise>
654 </xsl:choose>
655 </xsl:variable>
656 <tr class="{$css-class10}">
657 <th>
658 <xsl:value-of select="@name"/>
659 </th>
660 <td>
661 <xsl:value-of select="."/>
662 </td>
663 </tr>
664 </xsl:for-each>
665 </table>
666 </xsl:if>
667 </xsl:for-each>
668 </xsl:for-each>
669 </xsl:if>
670 <xsl:if test="views/view[zones/zone/counters[@type=&quot;rcode&quot;]/counter &gt;0]">
671 <h2>Response Codes per view/zone</h2>
672 <xsl:for-each select="views/view[zones/zone/counters[@type=&quot;rcode&quot;]/counter &gt;0]">
673 <h3>View <xsl:value-of select="@name"/></h3>
674 <xsl:variable name="thisview2">
675 <xsl:value-of select="@name"/>
676 </xsl:variable>
677 <xsl:for-each select="zones/zone">
678 <xsl:if test="counters[@type=&quot;rcode&quot;]/counter[. &gt; 0]">
679 <h4>Zone <xsl:value-of select="@name"/></h4>
680 <xsl:if test="system-property('xsl:vendor')!='Transformiix'">
681 <!-- Non Mozilla specific markup -->
682 <script type="text/javascript">
683 graphs.push({
684 'title': "Response codes for zone <xsl:value-of select="@name"/>",
685 'target': 'chart_rescode_<xsl:value-of select="../../@name"/>_<xsl:value-of select="@name"/>',
686 'style': 'barchart',
687 '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>]
690 </script>
691 <xsl:variable name="target">
692 <xsl:value-of select="@name"/>
693 </xsl:variable>
694 <div class="pie" id="chart_rescode_{$thisview2}_{$target}">[no data to display]</div>
695 </xsl:if>
696 <table class="counters">
697 <xsl:for-each select="counters[@type=&quot;rcode&quot;]/counter[.&gt;0 and @name != &quot;QryAuthAns&quot;]">
698 <xsl:sort select="."/>
699 <xsl:variable name="css-class11">
700 <xsl:choose>
701 <xsl:when test="position() mod 2 = 0">even</xsl:when>
702 <xsl:otherwise>odd</xsl:otherwise>
703 </xsl:choose>
704 </xsl:variable>
705 <tr class="{$css-class11}">
706 <th>
707 <xsl:value-of select="@name"/>
708 </th>
709 <td>
710 <xsl:value-of select="."/>
711 </td>
712 </tr>
713 </xsl:for-each>
714 </table>
715 </xsl:if>
716 </xsl:for-each>
717 </xsl:for-each>
718 </xsl:if>
719 <xsl:if test="socketmgr/sockets/socket">
720 <h2>Network Status</h2>
721 <table class="netstat">
722 <tr>
723 <th>ID</th>
724 <th>Name</th>
725 <th>Type</th>
726 <th>References</th>
727 <th>LocalAddress</th>
728 <th>PeerAddress</th>
729 <th>State</th>
730 </tr>
731 <xsl:for-each select="socketmgr/sockets/socket">
732 <xsl:sort select="id"/>
733 <xsl:variable name="css-class12">
734 <xsl:choose>
735 <xsl:when test="position() mod 2 = 0">even</xsl:when>
736 <xsl:otherwise>odd</xsl:otherwise>
737 </xsl:choose>
738 </xsl:variable>
739 <tr class="{$css-class12}">
740 <td>
741 <xsl:value-of select="id"/>
742 </td>
743 <td>
744 <xsl:value-of select="name"/>
745 </td>
746 <td>
747 <xsl:value-of select="type"/>
748 </td>
749 <td>
750 <xsl:value-of select="references"/>
751 </td>
752 <td>
753 <xsl:value-of select="local-address"/>
754 </td>
755 <td>
756 <xsl:value-of select="peer-address"/>
757 </td>
758 <td>
759 <xsl:for-each select="states">
760 <xsl:value-of select="."/>
761 </xsl:for-each>
762 </td>
763 </tr>
764 </xsl:for-each>
765 </table>
766 <br/>
767 </xsl:if>
768 <xsl:if test="taskmgr/thread-model/type">
769 <h2>Task Manager Configuration</h2>
770 <table class="counters">
771 <tr>
772 <th class="even">Thread-Model</th>
773 <td>
774 <xsl:value-of select="taskmgr/thread-model/type"/>
775 </td>
776 </tr>
777 <tr class="odd">
778 <th>Worker Threads</th>
779 <td>
780 <xsl:value-of select="taskmgr/thread-model/worker-threads"/>
781 </td>
782 </tr>
783 <tr class="even">
784 <th>Default Quantum</th>
785 <td>
786 <xsl:value-of select="taskmgr/thread-model/default-quantum"/>
787 </td>
788 </tr>
789 <tr class="odd">
790 <th>Tasks Running</th>
791 <td>
792 <xsl:value-of select="taskmgr/thread-model/tasks-running"/>
793 </td>
794 </tr>
795 <tr class="even">
796 <th>Tasks Ready</th>
797 <td>
798 <xsl:value-of select="taskmgr/thread-model/tasks-ready"/>
799 </td>
800 </tr>
801 </table>
802 <br/>
803 </xsl:if>
804 <xsl:if test="taskmgr/tasks/task">
805 <h2>Tasks</h2>
806 <table class="tasks">
807 <tr>
808 <th>ID</th>
809 <th>Name</th>
810 <th>References</th>
811 <th>State</th>
812 <th>Quantum</th>
813 <th>Events</th>
814 </tr>
815 <xsl:for-each select="taskmgr/tasks/task">
816 <xsl:sort select="name"/>
817 <xsl:variable name="css-class14">
818 <xsl:choose>
819 <xsl:when test="position() mod 2 = 0">even</xsl:when>
820 <xsl:otherwise>odd</xsl:otherwise>
821 </xsl:choose>
822 </xsl:variable>
823 <tr class="{$css-class14}">
824 <td>
825 <xsl:value-of select="id"/>
826 </td>
827 <td>
828 <xsl:value-of select="name"/>
829 </td>
830 <td>
831 <xsl:value-of select="references"/>
832 </td>
833 <td>
834 <xsl:value-of select="state"/>
835 </td>
836 <td>
837 <xsl:value-of select="quantum"/>
838 </td>
839 <td>
840 <xsl:value-of select="events"/>
841 </td>
842 </tr>
843 </xsl:for-each>
844 </table>
845 <br/>
846 </xsl:if>
847 <xsl:if test="memory/summary">
848 <h2>Memory Usage Summary</h2>
849 <table class="counters">
850 <xsl:for-each select="memory/summary/*">
851 <xsl:variable name="css-class13">
852 <xsl:choose>
853 <xsl:when test="position() mod 2 = 0">even</xsl:when>
854 <xsl:otherwise>odd</xsl:otherwise>
855 </xsl:choose>
856 </xsl:variable>
857 <tr class="{$css-class13}">
858 <th>
859 <xsl:value-of select="name()"/>
860 </th>
861 <td>
862 <xsl:value-of select="."/>
863 </td>
864 </tr>
865 </xsl:for-each>
866 </table>
867 <br/>
868 </xsl:if>
869 <xsl:if test="memory/contexts/context">
870 <h2>Memory Contexts</h2>
871 <table class="mctx">
872 <tr>
873 <th>ID</th>
874 <th>Name</th>
875 <th>References</th>
876 <th>TotalUse</th>
877 <th>InUse</th>
878 <th>MaxUse</th>
879 <th>BlockSize</th>
880 <th>Pools</th>
881 <th>HiWater</th>
882 <th>LoWater</th>
883 </tr>
884 <xsl:for-each select="memory/contexts/context">
885 <xsl:sort select="total" data-type="number" order="descending"/>
886 <xsl:variable name="css-class14">
887 <xsl:choose>
888 <xsl:when test="position() mod 2 = 0">even</xsl:when>
889 <xsl:otherwise>odd</xsl:otherwise>
890 </xsl:choose>
891 </xsl:variable>
892 <tr class="{$css-class14}">
893 <td>
894 <xsl:value-of select="id"/>
895 </td>
896 <td>
897 <xsl:value-of select="name"/>
898 </td>
899 <td>
900 <xsl:value-of select="references"/>
901 </td>
902 <td>
903 <xsl:value-of select="total"/>
904 </td>
905 <td>
906 <xsl:value-of select="inuse"/>
907 </td>
908 <td>
909 <xsl:value-of select="maxinuse"/>
910 </td>
911 <td>
912 <xsl:value-of select="blocksize"/>
913 </td>
914 <td>
915 <xsl:value-of select="pools"/>
916 </td>
917 <td>
918 <xsl:value-of select="hiwater"/>
919 </td>
920 <td>
921 <xsl:value-of select="lowater"/>
922 </td>
923 </tr>
924 </xsl:for-each>
925 </table>
926 </xsl:if>
927 <hr/>
928 <p class="footer">Internet Systems Consortium Inc.<br/><a href="http://www.isc.org">http://www.isc.org</a></p>
929 </body>
930 </html>
931 </xsl:template>
932 </xsl:stylesheet>