--- dao/DaoAdresseVedligehold/src/main/webapp/index.html 2016/02/03 18:45:33 2903 +++ dao/DaoAdresseVedligehold/src/main/webapp/index.html 2016/09/21 09:33:45 3116 @@ -2,13 +2,46 @@ + + + + + @@ -41,7 +74,12 @@ html += "
"; - html += "

" + entry.description + "

"; + html += "
"; + if (entry.state == "STATE_DONE" || entry.state == "STATE_ABORTED" || entry.state == "STATE_QUEUED") { + html += ""; + } + html += "

" + entry.description + "

"; + html += "
"; html += "
"; html += entry.detail; @@ -60,7 +98,12 @@ } } - html += "
" + entry.state + "
"; + var viewlog = ""; + if (entry.state == "STATE_RUNNING" || entry.state == "STATE_DONE" || entry.state == "STATE_ABORTED") { + viewlog = "Log"; + } + + html += "
" + entry.state + viewlog + "
"; html += "
"; //panel-body html += "
"; //panel @@ -89,8 +132,25 @@ $(document).ready( function() { loadTasks(); - setInterval(loadTasks, 2500); + setInterval(loadTasks, 5000); + + $("#center").resizable({ + handles: 'e, w' + }); + + + $(document).on('click', '.viewlog', function(event) { // Bind future elements + var taskid = $(this).attr('taskid'); + $("#logview").load('rest/tasks/log/' + taskid); + + }); + $(document).on('click', '.removetask', function(event) { // Bind future elements + var taskid = $(this).attr('taskid'); + $.get('rest/tasks/remove/' + taskid, function() { + loadTasks(); + }); + }); $("#file").fileinput({ //'showUpload':false, @@ -117,20 +177,55 @@ }); + + $("#afstandBtn").click( function(){ var dist = $("#afstand_distributor").val(); if (dist == "") { alert("Du skal vælge distributør"); return; } + var type = $("#afstand_type").val(); + var url = "rest/commands/distancecalculation/" + dist + "/" + type; - $.get("rest/commands/distancecalculation/" + dist, function() { + $.get(url, function() { loadTasks(); //Force reload of tasks immediately } ); }); + $("#dawaBtn").click( function(){ + + var url = "rest/commands/dawa"; + + + $.get(url, function() { + loadTasks(); //Force reload of tasks immediately + } ); + + }); + + //Toggle fullscreen + $("#panel-fullscreen").click(function (e) { + e.preventDefault(); + + var $this = $(this); + + if ($this.children('i').hasClass('glyphicon-resize-full')) + { + $this.children('i').removeClass('glyphicon-resize-full'); + $this.children('i').addClass('glyphicon-resize-small'); + } + else if ($this.children('i').hasClass('glyphicon-resize-small')) + { + $this.children('i').removeClass('glyphicon-resize-small'); + $this.children('i').addClass('glyphicon-resize-full'); + } + $(this).closest('.panel').toggleClass('panel-fullscreen'); + }); + + }); @@ -143,7 +238,7 @@

Dao Adresse Vedligehold

-
+
@@ -157,8 +252,21 @@
-
- b +
+
+
+

Log

+
    + +
  • + +
+
+
+
+      			
+
+
@@ -210,14 +318,32 @@ + + + +
+
- + +
+
+

Dawa Indlæsning

+
+
+ + + +
+