-
Notifications
You must be signed in to change notification settings - Fork 1
/
default.aspx
258 lines (206 loc) · 9.48 KB
/
default.aspx
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="profiler._default" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
<link href="Content/bootstrap.css" rel="stylesheet" />
<link href="Content/bootstrap-responsive.css" rel="stylesheet" />
<link href="Content/bootstrap-theme.css" rel="stylesheet" />
<link href="Content/bootstrap-slider.css" rel="stylesheet" />
<script type="text/javascript" src="Scripts/jquery-2.1.3.js"></script>
<script type="text/javascript" src="Scripts/bootstrap.min.js"></script>
<script type='text/javascript' src="Scripts/bootstrap-slider.js"></script>
<script type="text/javascript" src="Scripts/busyindicator.js"></script>
<script type="text/javascript" src="Scripts/bootstrap-modal.js"></script>
<script type="text/javascript" src="Scripts/bootstrap-modalmanager.js"></script>
<style type="text/css">
.vertical-text {
transform: rotate(270deg);
transform-origin: left top 0;
}
#chartbox {
border: 1px solid #e0e0e0;
width: 100%;
}
.whiteHat {
border: none;
position: absolute;
}
</style>
<script type="text/javascript">
var global = {};
function resizeGraphBox() {
var offset = 0;
var cy = $(window).height();
var cx = $(window).width();
$('#graphFrame').height(cy - (90 - offset));
$('#searchFrame').height(cy - (90 - offset));
$('#indicatorFrame').height(cy - (90 - offset));
}
$(document).ready(function () {
$(window).on('resize', resizeGraphBox);
$('#searchFrame').hide();
$('#indicatorFrame').hide();
resizeGraphBox();
$('.pageButton').click(function () {
$('.pageButton').removeClass('active');
$('#' + this.id).addClass('active');
$('.pageFrame').hide();
$('#' + this.id.substr(4)).show();
})
});
function startLoadingBox(cap) {
ajaxindicatorstart(cap ? cap : 'Loading...');
}
function endLoadingBox() {
ajaxindicatorstop();
}
function error(msg, retfunc) {
$('#error-msg').html(msg);
$('#dlgError').modal();
}
function addDataSource(srv) {
global.addsrv = srv;
startLoadingBox();
var url = 'ajax.aspx?mode=parseGetCapabilities&url=' + escape(srv);
$.ajax(url)
.done(function (data) {
endLoadingBox();
var json = JSON.parse(data);
if (json.success == true) {
$('#selCovBox').empty();
for (var c in json.coverages) {
var coverage = json.coverages[c];
$('#selCovBox').append('<option>' + coverage + '</option>');
}
$('#selCovBoxBtn').trigger('click');
}
else {
error(json.message);
}
})
.fail(function () {
endLoadingBox();
error("Failed to load gml");
return;
})
}
function selCoverage() {
var cov = $('#selCovBox').val();
if (cov == null) {
error('Please select a coverage');
return;
}
$('#selCovBoxBtn').trigger('click');
global.addcov = cov;
var url = 'ajax.aspx?mode=parseDescribeCoverage&url=' + escape(global.addsrv) + '&cov=' + escape(cov);
$.ajax(url)
.done(function (data) {
endLoadingBox();
var json = JSON.parse(data);
if (json.success == true) {
$('.pageFrame').hide();
$('#indicatorFrame').attr('src', 'indicator.aspx?cov=' + escape(cov) + '&src=' + escape(global.addsrv));
$('#indicatorFrame').show();
}
else {
error(json.message);
}
})
.fail(function () {
endLoadingBox();
error("Failed to load gml");
return;
})
}
</script>
</head>
<body style="padding-left: 10px; overflow-x: hidden; overflow-y: hidden">
<form id="form1" runat="server">
<!-- Static navbar -->
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">SARVA</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li id="btn_graphFrame" class="pageButton active"><a href="#"><span class="glyphicon glyphicon-globe" aria-hidden="true"></span> Profiler</a></li>
<li id="btn_searchFrame" class="pageButton"><a href="#"><span class="glyphicon glyphicon-search" aria-hidden="true"></span> Search</a></li>
<li role="separator" class="divider"></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="glyphicon glyphicon-cog" aria-hidden="true"></span> Tools <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">New Profile</a></li>
<li role="separator" class="divider"></li>
<li><a href="#">Open Profile</a></li>
<li role="separator" class="divider"></li>
<li><a href="#">Save Profile</a></li>
<li><a href="#">Embed Profile</a></li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="active"><a href="./">Default <span class="sr-only">(current)</span></a></li>
<li><a href="../navbar-static-top/">Static top</a></li>
<li><a href="../navbar-fixed-top/">Fixed top</a></li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container-fluid -->
</nav>
<!-- Main component for a primary marketing message or call to action -->
<iframe class="pageFrame" id="graphFrame" name="graphFrame" src="graphs.aspx" style="border: 1px solid #f0f0f0; width: 100%"></iframe>
<iframe class="pageFrame" id="searchFrame" name="searchFrame" src="search.aspx" style="border: 0px solid #f0f0f0; width: 100%"></iframe>
<iframe class="pageFrame" id="indicatorFrame" name="indicatorFrame" src="search.aspx" style="border: 0px solid #f0f0f0; width: 100%"></iframe>
<a id="selCovBoxBtn" data-toggle="modal" data-target="#selCovBoxDlg" style="display: none;">Open Modal</a>
<!-- Modal -->
<div id="selCovBoxDlg" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Select Coverage</h4>
</div>
<div class="modal-body">
<select size="12" class="form-control" id="selCovBox">
<option>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
</select>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" onclick="selCoverage();">OK</button>
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
<!-- error dialog -->
<div id='dlgError' class='modal'>
<div class='modal-dialog' style="width: 400px">
<div class='modal-content'>
<div class='modal-header'>
<button type='button' class='close' data-dismiss='modal'><span aria-hidden='true'>×</span><span class='sr-only'>Close</span></button>
<h5 class='modal-title'>Profiler</h5>
</div>
<form onsubmit="doRegister(event);">
<div class='modal-body'>
<div id="error-msg"></div>
</div>
<div class='modal-footer'>
<button type='button' class='btn' data-dismiss='modal' style="width: 80px" onclick="onErrorClose();">Close</button>
</div>
</form>
</div>
</div>
</div>
</form>
</body>
</html>