From: Mark Andrews Date: Tue, 27 Oct 2015 22:45:46 +0000 (+1100) Subject: 4243. [func] Improved stats reporting from Timothe Litt. [RT #38941] X-Git-Tag: v9.11.0a1~327^2~38 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=a70fc47e9dc165175e77f091076559748858a488;p=thirdparty%2Fbind9.git 4243. [func] Improved stats reporting from Timothe Litt. [RT #38941] --- diff --git a/CHANGES b/CHANGES index 7a288004294..d85e8742579 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +4243. [func] Improved stats reporting from Timothe Litt. [RT #38941] + 4242. [bug] Replace the client if not already replaced when prefetching. [RT #41001] diff --git a/bin/named/bind9.xsl b/bin/named/bind9.xsl index 5b1ffe86555..b516a2930c0 100644 --- a/bin/named/bind9.xsl +++ b/bin/named/bind9.xsl @@ -14,7 +14,6 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - @@ -25,58 +24,58 @@ + google.load("visualization", "1", {packages:["corechart"]}); + google.setOnLoadCallback(loadGraphs); + + var graphs=[]; + + function drawChart(chart_title,target,style,data) { + var data = google.visualization.arrayToDataTable(data); + + var options = { + title: chart_title + }; + + var chart; + if (style == "barchart") { + chart = new google.visualization.BarChart(document.getElementById(target)); + chart.draw(data, options); + } else if (style == "piechart") { + chart = new google.visualization.PieChart(document.getElementById(target)); + chart.draw(data, options); + } + } + + function loadGraphs(){ + var g; + + while(g = graphs.shift()){ + // alert("going for: " + g.target); + if(g.data.length > 1){ + drawChart(g.title,g.target,g.style,g.data); + } + } + } + + + // Server Incoming Query Types + graphs.push({ + 'title' : "Server Incoming Query Types", + 'target': 'chart_incoming_qtypes', + 'style': 'barchart', + 'data': [['Type','Counter'],['',],] + }); + + + + // Server Incoming Requests by opcode + graphs.push({ + 'title' : "Server Incoming Requests by DNS Opcode", + 'target': 'chart_incoming_opcodes', + 'style': 'barchart', + 'data': [['Opcode','Counter'],['',],]}); + +