--- dao/DaoAdresseVedligehold/src/main/webapp/index.html 2016/01/24 21:48:55 2838 +++ dao/DaoAdresseVedligehold/src/main/webapp/index.html 2016/02/03 18:45:33 2903 @@ -19,7 +19,7 @@ function loadTasks() { - $.get("TaskServlet", function(data) { + $.get("rest/tasks/list", function(data) { //console.log(data); @@ -42,12 +42,28 @@ html += "
"; html += "

" + entry.description + "

"; + html += "
"; html += entry.detail; - html += "
" + entry.state + "
"; + if (entry.state == "STATE_ABORTED") + html += "
" + entry.errorMessage + "
"; + + if (entry.state == "STATE_RUNNING") { + if (entry.percentCompleted >= 0) { + var percent = entry.percentCompleted.toFixed(2); + html += "
"; + html += "
" ; + html += percent + "%"; + html += "
"; + html += "
"; + } + } + + html += "
" + entry.state + "
"; - html += "
"; + html += "
"; //panel-body + html += ""; //panel }); if (html == "") { @@ -100,6 +116,21 @@ $('#file').fileinput('upload'); }); + + $("#afstandBtn").click( function(){ + var dist = $("#afstand_distributor").val(); + if (dist == "") { + alert("Du skal vælge distributør"); + return; + } + + + $.get("rest/commands/distancecalculation/" + dist, function() { + loadTasks(); //Force reload of tasks immediately + } ); + + }); + }); @@ -133,7 +164,7 @@
-

Actions

+

Upload File

@@ -142,11 +173,9 @@ @@ -166,11 +195,37 @@
-
-
- + + +
+
+

Afstand anden rute

+
+
+ + + + +
+ + + + +
+
+ + + + + - + + +