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

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

diff --git a/CHANGES b/CHANGES
index 7aaf1acae29def310eb9640adcef1dab59ad3d71..67e113f629aae86a4504b410fd3d56ab1319d8ee 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,8 @@
+3507.  [bug]           Statistics channel XSL (when built with
+                       --enable-newstats) had a glitch when attempting
+                       to chart query data before any queries had been
+                       received. [RT #32620]
+
 3505.  [bug]           When setting "max-cache-size" and "max-acache-size",
                        larger values than 4 gigabytes could not be set
                        explicitly, though larger sizes were available
index a2b6b9ee78249e26aba68a377088f9b0fabe07fd..fe5b6455feda264f402f136f0f4c365427e07896 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 c6042c7a5f3559a4d188e9333b9255a568c8ef80..c55714a6fb7b0f7e9c7cbb5a3b4cf44c04ff0b19 100644 (file)
@@ -53,9 +53,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"