1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
diff -ru pdns-recursor-4.0.6.orig/html/local.js pdns-recursor-4.0.6/html/local.js
--- pdns-recursor-4.0.6.orig/html/local.js 2017-07-04 17:43:07.000000000 +0200
+++ pdns-recursor-4.0.6/html/local.js 2017-11-02 18:26:04.624586674 +0100
@@ -63,7 +63,7 @@
$.getJSON(qstring,
function(data) {
- var bouw="<table><tr><th>Number</th><th>Domain</th><th>Type</th></tr>";
+ var table = $('<table><tr><th>Number</th><th>Domain</th><th>Type</th></tr></table>');
var num=0;
var total=0, rest=0;
$.each(data["entries"], function(a,b) {
@@ -75,12 +75,26 @@
if(b[1].length > 25)
b[1]=b[1].substring(0,25);
- bouw=bouw+("<tr><td>"+b[0]+"</td><td>"+b[1]+"</td><td>"+b[2]+"</td></tr>");
- });
- bouw+="<tr><td>"+rest+"</td><td>Rest</td></tr>";
- bouw=bouw+"</table>";
- $("#queryring").html(bouw);
-
+ var line = $('<tr />');
+ var number = $('<td />');
+ number.text(b[0]);
+ var domain = $('<td />');
+ domain.text(b[1]);
+ var type = $('<td />');
+ type.text(b[2]);
+ line.append(number);
+ line.append(domain);
+ line.append(type);
+ table.append(line);
+ });
+ var line = $('<tr />');
+ var number = $('<td />');
+ number.text(rest);
+ var label = $('<td>Rest</td>');
+ line.append(number);
+ line.append(label);
+ table.append(line);
+ $("#queryring").html(table);
});
filtered=$("#filter2").is(':checked')
@@ -91,7 +105,7 @@
$.getJSON(qstring,
function(data) {
- var bouw="<table><tr><th>Number</th><th>Servfail domain</th><th>Type</th></tr>";
+ var table = $('<table><tr><th>Number</th><th>Servfail domain</th><th>Type</th></tr></table>');
var num=0, total=0, rest=0;
$.each(data["entries"], function(a,b) {
total+=b[0];
@@ -101,11 +115,26 @@
}
if(b[1].length > 25)
b[1]=b[1].substring(0,25);
- bouw=bouw+("<tr><td>"+b[0]+"</td><td>"+b[1]+"</td><td>"+b[2]+"</td></tr>");
+ var line = $('<tr />');
+ var number = $('<td />');
+ number.text(b[0]);
+ var domain = $('<td />');
+ domain.text(b[1]);
+ var type = $('<td />');
+ type.text(b[2]);
+ line.append(number);
+ line.append(domain);
+ line.append(type);
+ table.append(line);
});
- bouw+="<tr><td>"+rest+"</td><td>Rest</td></tr>";
- bouw=bouw+"</table>";
- $("#servfailqueryring").html(bouw);
+ var line = $('<tr />');
+ var number = $('<td />');
+ number.text(rest);
+ var label = $('<td>Rest</td>');
+ line.append(number);
+ line.append(label);
+ table.append(line);
+ $("#servfailqueryring").html(table);
});
|