-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.html
141 lines (113 loc) · 4.28 KB
/
index.html
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
VyattaLookingGlass v0.2 - Looking glass for the vyatta routing suite
Copyright 2012 Merijntje Tak
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<html>
<head>
<title>LookingGlass</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="LookingGlass.css" rel="stylesheet" type="text/css">
</head>
<body>
<script src="jquery-1.7.1.js" type="text/javascript"></script>
<script type="text/javascript">
$.ajaxSetup({ cache: false });
$(document).ready(function(){
// Set focus on textbox on page load
$('input:text[name=argBox]').focus();
// Press lookup button on enter
$(document).keyup(function(event){
if(event.keyCode == 13){
$("#submit").click();
}
});
// AJAX busy indicator
$(document).ajaxStart(function(){
$("#submit").attr('disabled', true);
$('#output').hide();
$('#loadBox').show();
}).ajaxStop(function(){
$('#loadBox').hide();
$('#output').show();
$("#submit").attr('disabled', false);
});
// AJAX stuff for query part
$("#submit").click(function(){
var lgQt = $('input:radio[name=qt]:checked').val();
var lgArg = $('input:text[name=argBox]').val();
$.post("LookingGlass.pl", { arg: lgArg, qt: lgQt },
function(data){
$("#output").html(data);
}
);
return false;
});
// AJAX stuff for fixed buttons
$("#bgpNeig").click(function(){
$.post("LookingGlass.pl", { qt: "bgpNeig" },
function(data){
$("#output").html(data);
}
);
return false;
});
$("#ip6bgpNeig").click(function(){
$.post("LookingGlass.pl", { qt: "ip6bgpNeig" },
function(data){
$("#output").html(data);
}
);
return false;
});
$("#routeTab").click(function(){
$.post("LookingGlass.pl", { qt: "routeTab" },
function(data){
$("#output").html(data);
}
);
return false;
});
});
</script>
<div id="mainBox">
<div id="titleBox">
<h1>LookingGlass</h1>
AS196621 - FreeStone Systems
</div>
<div id="queryBox">
<label><input type="radio" name="qt" value="bgp" checked="checked">BGP</label>
<label><input type="radio" name="qt" value="ip6bgp" checked="checked">IPv6 BGP</label>
<label><input type="radio" name="qt" value="trace">Traceroute</label>
<label><input type="radio" name="qt" value="ping">Ping</label>
<label><input type="radio" name="qt" value="dig">nslookup</label>
<label><input type="radio" name="qt" value="as">AS</label>
<label><input type="radio" name="qt" value="ip6as">IPv6 AS</label>
<br>
<input type="text" name="argBox" value="" id="argBox">
<button id="submit">Lookup</button>
<hr>
<button id="bgpNeig">BGP neighbours</button>
<button id="ip6bgpNeig">IPv6 BGP neighbours</button>
<!-- <button id="routeTab">Full routing table</button> -->
</div>
<div id="loadBox">
Performing query, please wait...<br>
<img src="loading.gif" alt="loading icon">
</div>
<div id="output"></div>
<div id="creditBox">
<a class="creditLink" href="https://github.com/MerijntjeTak/vyattaLookingGlass" target="_blank">vyattaLookingGlass</a>
</div>
</div>
</body>
</html>