]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[master] fix XSL glitch with empty query data
authorEvan Hunt <each@isc.org>
Thu, 28 Feb 2013 17:58:13 +0000 (09:58 -0800)
committerEvan Hunt <each@isc.org>
Thu, 28 Feb 2013 17:58:13 +0000 (09:58 -0800)
3507. [bug] Statistics channel XSL had a glitch when attempting
to chart query data before any queries had been
received. [RT #32620]

CHANGES
bin/named/bind9.xsl
bin/named/bind9.xsl.h

diff --git a/CHANGES b/CHANGES
index 27169665dd99bc12294d73301a800c04950e1d15..fcae54e4753c05d144169ae4228d9120c0b8823d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+3507.  [bug]           Statistics channel XSL had a glitch when attempting
+                       to chart query data before any queries had been
+                       received. [RT #32620]
+
 3506.  [func]          When setting "max-cache-size" and "max-acache-size",
                        the keyword "unlimited" is no longer defined as equal
                        to 4 gigabytes (except on 32-bit platforms); it
index 3b9016286fe104ad12ecbaaa632492032c7e5b36..acba3e4f2560dbf60ea8b507d234f11eba248287 100644 (file)
             
           // Server Incoming query Types
           while(g = graphs.shift()){
-           // alert("going for: " + g.target);
-            drawChart(g.title,g.target,g.data);
+            // alert("going for: " + g.target);
+            if(g.data.length > 1){
+              drawChart(g.title,g.target,g.data);
+            }
           }
-            
         }
         
             // Server Incoming Queries Types         
         <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>
+          <div class="pie" id="chart_incoming_requests">[graph of incoming requests]</div>
         </xsl:if>
         <table class="counters">
           <xsl:for-each select="server/counters[@type=&quot;opcode&quot;]/counter">
         <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>
+          <div class="pie" id="chart_incoming_qtypes">[graph of incoming qtypes]</div>
         </xsl:if>
         <table class="counters">
           <xsl:for-each select="server/counters[@type=&quot;qtype&quot;]/counter">
index 2ef0acf210000db8201ac06dbeadae58c529d6e3..b1a3bfb9ba9e1cbbbb0a9f1e34c3d71c19c9eb66 100644 (file)
@@ -56,9 +56,10 @@ static char xslmsg[] =
        " // Server Incoming query Types\n"
        " while(g = graphs.shift()){\n"
        " // alert(\"going for: \" + g.target);\n"
+       " if(g.data.length > 1){\n"
        " drawChart(g.title,g.target,g.data);\n"
        " }\n"
-       " \n"
+       " }\n"
        " }\n"
        " \n"
        " // Server Incoming Queries Types \n"