2 |
<head> |
<head> |
3 |
<head> |
<head> |
4 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
5 |
|
|
6 |
|
<link rel="stylesheet" href="webjars/jquery-ui/1.11.4/jquery-ui.css" /> |
7 |
|
|
8 |
<link rel="stylesheet" href="webjars/bootstrap/3.3.5/css/bootstrap.min.css" /> |
<link rel="stylesheet" href="webjars/bootstrap/3.3.5/css/bootstrap.min.css" /> |
9 |
|
|
10 |
<link rel="stylesheet" href="webjars/bootstrap-fileinput/4.2.7/css/fileinput.min.css" /> |
<link rel="stylesheet" href="webjars/bootstrap-fileinput/4.2.7/css/fileinput.min.css" /> |
11 |
|
|
12 |
|
<style> |
13 |
|
|
14 |
|
@media (min-width: 1300px) { |
15 |
|
.container { |
16 |
|
width: 1300px; /*default 1170px*/ |
17 |
|
} |
18 |
|
.panel-actions { |
19 |
|
margin-top: -20px; |
20 |
|
margin-bottom: 0; |
21 |
|
text-align: right; |
22 |
|
} |
23 |
|
.panel-actions a { |
24 |
|
color:#333; |
25 |
|
} |
26 |
|
.panel-fullscreen { |
27 |
|
display: block; |
28 |
|
z-index: 9999; |
29 |
|
position: fixed; |
30 |
|
width: 100%; |
31 |
|
height: 100%; |
32 |
|
top: 0; |
33 |
|
right: 0; |
34 |
|
left: 0; |
35 |
|
bottom: 0; |
36 |
|
overflow: auto; |
37 |
|
} |
38 |
|
|
39 |
|
} |
40 |
|
</style> |
41 |
|
|
42 |
<!-- use webjars for dependencies --> |
<!-- use webjars for dependencies --> |
43 |
<script src="webjars/jquery/2.1.4/jquery.js"></script> |
<script src="webjars/jquery/2.1.4/jquery.js"></script> |
44 |
|
<script src="webjars/jquery-ui/1.11.4/jquery-ui.js"></script> |
45 |
<script src="webjars/bootstrap/3.3.5/js/bootstrap.min.js"></script> |
<script src="webjars/bootstrap/3.3.5/js/bootstrap.min.js"></script> |
46 |
|
|
47 |
<script src="webjars/bootstrap-fileinput/4.2.7/js/fileinput.min.js"></script> |
<script src="webjars/bootstrap-fileinput/4.2.7/js/fileinput.min.js"></script> |
75 |
|
|
76 |
html += "<div class='panel " + pclass + "'>"; |
html += "<div class='panel " + pclass + "'>"; |
77 |
html += "<div class='panel-heading'>"; |
html += "<div class='panel-heading'>"; |
78 |
if (entry.state == "STATE_DONE" || entry.state == "STATE_ABORTED") { |
if (entry.state == "STATE_DONE" || entry.state == "STATE_ABORTED" || entry.state == "STATE_QUEUED") { |
79 |
html += "<button type='button' class='close removetask' aria-label='Close' taskid='" + entry.id+ "'><span aria-hidden='true'>×</span></button>"; |
html += "<button type='button' class='close removetask' aria-label='Close' taskid='" + entry.id+ "'><span aria-hidden='true'>×</span></button>"; |
80 |
} |
} |
81 |
html += "<h4 class='panel-title'>" + entry.description + "</h4>"; |
html += "<h4 class='panel-title'>" + entry.description + "</h4>"; |
134 |
loadTasks(); |
loadTasks(); |
135 |
setInterval(loadTasks, 5000); |
setInterval(loadTasks, 5000); |
136 |
|
|
137 |
|
$("#center").resizable({ |
138 |
|
handles: 'e, w' |
139 |
|
}); |
140 |
|
|
141 |
|
|
142 |
$(document).on('click', '.viewlog', function(event) { // Bind future elements |
$(document).on('click', '.viewlog', function(event) { // Bind future elements |
143 |
var taskid = $(this).attr('taskid'); |
var taskid = $(this).attr('taskid'); |
177 |
}); |
}); |
178 |
|
|
179 |
|
|
180 |
|
|
181 |
|
|
182 |
$("#afstandBtn").click( function(){ |
$("#afstandBtn").click( function(){ |
183 |
var dist = $("#afstand_distributor").val(); |
var dist = $("#afstand_distributor").val(); |
184 |
if (dist == "") { |
if (dist == "") { |
185 |
alert("Du skal vælge distributør"); |
alert("Du skal vælge distributør"); |
186 |
return; |
return; |
187 |
} |
} |
188 |
|
var type = $("#afstand_type").val(); |
189 |
|
var url = "rest/commands/distancecalculation/" + dist + "/" + type; |
190 |
|
|
191 |
|
|
192 |
|
$.get(url, function() { |
193 |
|
loadTasks(); //Force reload of tasks immediately |
194 |
|
} ); |
195 |
|
|
196 |
|
}); |
197 |
|
|
198 |
|
$("#dawaBtn").click( function(){ |
199 |
|
|
200 |
|
var url = "rest/commands/dawa"; |
201 |
|
|
202 |
|
|
203 |
$.get("rest/commands/distancecalculation/" + dist, function() { |
$.get(url, function() { |
204 |
loadTasks(); //Force reload of tasks immediately |
loadTasks(); //Force reload of tasks immediately |
205 |
} ); |
} ); |
206 |
|
|
207 |
}); |
}); |
208 |
|
|
209 |
|
//Toggle fullscreen |
210 |
|
$("#panel-fullscreen").click(function (e) { |
211 |
|
e.preventDefault(); |
212 |
|
|
213 |
|
var $this = $(this); |
214 |
|
|
215 |
|
if ($this.children('i').hasClass('glyphicon-resize-full')) |
216 |
|
{ |
217 |
|
$this.children('i').removeClass('glyphicon-resize-full'); |
218 |
|
$this.children('i').addClass('glyphicon-resize-small'); |
219 |
|
} |
220 |
|
else if ($this.children('i').hasClass('glyphicon-resize-small')) |
221 |
|
{ |
222 |
|
$this.children('i').removeClass('glyphicon-resize-small'); |
223 |
|
$this.children('i').addClass('glyphicon-resize-full'); |
224 |
|
} |
225 |
|
$(this).closest('.panel').toggleClass('panel-fullscreen'); |
226 |
|
}); |
227 |
|
|
228 |
|
|
229 |
}); |
}); |
230 |
|
|
231 |
</script> |
</script> |
233 |
</head> |
</head> |
234 |
<body> |
<body> |
235 |
|
|
236 |
<div class="container-fluid"> |
<div class="container"> |
237 |
<div class="page-header"> |
<div class="page-header"> |
238 |
<h1>Dao Adresse Vedligehold</h1> |
<h1>Dao Adresse Vedligehold</h1> |
239 |
</div> |
</div> |
240 |
<div id="body"> |
<div id="body"> |
241 |
<div class="row"> |
<div class="row"> |
242 |
<div class="col-sm-1" id="leftCol-blank" > |
<div class="col-sm-3" id="leftCol" > |
|
</div> |
|
|
|
|
|
<div class="col-sm-2" id="leftCol" > |
|
243 |
<div class="panel panel-primary"> |
<div class="panel panel-primary"> |
244 |
<div class="panel-heading"> |
<div class="panel-heading"> |
245 |
<h3 class="panel-title">Queue</h3> |
<h3 class="panel-title">Queue</h3> |
253 |
</div> |
</div> |
254 |
|
|
255 |
<div class="col-sm-6" id="center"> |
<div class="col-sm-6" id="center"> |
256 |
<pre id="logview"> |
<div class="panel panel-primary"> |
257 |
</pre> |
<div class="panel-heading"> |
258 |
|
<h3 class="panel-title">Log</h3> |
259 |
|
<ul class="list-inline panel-actions"> |
260 |
|
|
261 |
|
<li><a href="#" id="panel-fullscreen" role="button" title="Toggle fullscreen"><i class="glyphicon glyphicon-resize-full"></i></a></li> |
262 |
|
|
263 |
|
</ul> |
264 |
|
</div> |
265 |
|
<div class="panel-body"> |
266 |
|
<pre id="logview"> |
267 |
|
</pre> |
268 |
|
</div> |
269 |
|
</div> |
270 |
</div> |
</div> |
271 |
|
|
272 |
<div class="col-sm-2" id="rightCol" > |
<div class="col-sm-3" id="rightCol" > |
273 |
<div class="panel panel-primary"> |
<div class="panel panel-primary"> |
274 |
<div class="panel-heading"> |
<div class="panel-heading"> |
275 |
<h3 class="panel-title">Upload File</h3> |
<h3 class="panel-title">Upload File</h3> |
318 |
<option>BK</option> |
<option>BK</option> |
319 |
<option>DAO</option> |
<option>DAO</option> |
320 |
</select> |
</select> |
321 |
|
|
322 |
|
|
323 |
|
<label for="type">Type:</label> |
324 |
|
<select class="form-control" id="afstand_type" name="afstand_type"> |
325 |
|
<option>Incremental</option> |
326 |
|
<option>Full</option> |
327 |
|
</select> |
328 |
<br> |
<br> |
329 |
|
|
330 |
|
|
331 |
<button class="btn btn-primary" id="afstandBtn">Beregn</button> |
<button class="btn btn-primary" id="afstandBtn">Beregn</button> |
332 |
|
|
333 |
|
|
334 |
</div> |
</div> |
335 |
</div><!-- Afstand-andenrute panel --> |
</div><!-- Afstand-andenrute panel --> |
336 |
|
|
337 |
|
<div class="panel panel-primary"> |
338 |
|
<div class="panel-heading"> |
339 |
|
<h3 class="panel-title">Dawa Indlæsning</h3> |
340 |
|
</div> |
341 |
|
<div class="panel-body"> |
342 |
|
|
343 |
|
<button class="btn btn-primary" id="dawaBtn">Beregn</button> |
344 |
|
|
345 |
|
</div> |
346 |
|
</div> <!-- DAWA --> |
347 |
|
|
348 |
|
|
349 |
</div><!-- rightcol --> |
</div><!-- rightcol --> |