99f185a6dcfb61e9bf0745f8f80f71b1cb063234
2 title
: L
.tr('Diagnostics'),
9 L
.network
.runPing('?').then(function(rv
) {
10 if (rv
.code
!= -1) tools
.push(['runPing', L
.tr('IPv4 Ping')]);
12 L
.network
.runPing6('?').then(function(rv
) {
13 if (rv
.code
!= -1) tools
.push(['runPing6', L
.tr('IPv6 Ping')]);
15 L
.network
.runTraceroute('?').then(function(rv
) {
16 if (rv
.code
!= -1) tools
.push(['runTraceroute', L
.tr('IPv4 Traceroute')]);
18 L
.network
.runTraceroute6('?').then(function(rv
) {
19 if (rv
.code
!= -1) tools
.push(['runTraceroute6', L
.tr('IPv6 Tracroute')]);
21 L
.network
.runNslookup('?').then(function(rv
) {
22 if (rv
.code
!= -1) tools
.push(['runNslookup', L
.tr('DNS Lookup')]);
25 tools
.sort(function(a
, b
) {
34 for (var i
= 0; i
< tools
.length
; i
++)
35 $('#tool').append($('<option />').attr('value', tools
[i
][0]).text(tools
[i
][1]));
37 $('#tool').val('runPing');
39 $('#run').click(function() {
41 L
.network
[$('#tool').val()]($('#host').val()).then(function(rv
) {
42 $('#output').empty().show();
45 $('#output').text(rv
.stdout
);
48 $('#output').append($('<span />').css('color', 'red').text(rv
.stderr
));