47 |
|
|
48 |
if (entry.state == "STATE_ABORTED") |
if (entry.state == "STATE_ABORTED") |
49 |
html += "<br><div style='color: red'>" + entry.errorMessage + "</div>"; |
html += "<br><div style='color: red'>" + entry.errorMessage + "</div>"; |
50 |
|
|
51 |
|
if (entry.state == "STATE_RUNNING") { |
52 |
|
if (entry.percentCompleted >= 0) { |
53 |
|
var percent = entry.percentCompleted.toFixed(2); |
54 |
|
html += "<div class='progress'>"; |
55 |
|
html += "<div class='progress-bar' role='progressbar' aria-valuenow='" + percent + "' aria-valuemin='0' aria-valuemax='100' style='width:" + percent + "%'> " ; |
56 |
|
html += percent + "%"; |
57 |
|
html += " </div>"; |
58 |
|
html += "</div>"; |
59 |
|
} |
60 |
|
} |
61 |
|
|
62 |
html += "<br/><div style='font-size: 8px; margin: 7px;'>" + entry.state + "</div>"; |
html += "<br/><div style='font-size: 8px; margin: 7px;'>" + entry.state + "</div>"; |
63 |
|
|
114 |
$('#file').fileinput('upload'); |
$('#file').fileinput('upload'); |
115 |
}); |
}); |
116 |
|
|
117 |
|
|
118 |
|
$("#afstandBtn").click( function(){ |
119 |
|
var dist = $("#afstand_distributor").val(); |
120 |
|
if (dist == "") { |
121 |
|
alert("Du skal vælge distributør"); |
122 |
|
return; |
123 |
|
} |
124 |
|
|
125 |
|
|
126 |
|
$.get("rest/commands/distancecalculation/" + dist, function() { |
127 |
|
loadTasks(); //Force reload of tasks immediately |
128 |
|
} ); |
129 |
|
|
130 |
|
}); |
131 |
|
|
132 |
}); |
}); |
133 |
|
|
134 |
</script> |
</script> |
162 |
<div class="col-sm-3" id="rightCol" > |
<div class="col-sm-3" id="rightCol" > |
163 |
<div class="panel panel-primary"> |
<div class="panel panel-primary"> |
164 |
<div class="panel-heading"> |
<div class="panel-heading"> |
165 |
<h3 class="panel-title">Actions</h3> |
<h3 class="panel-title">Upload File</h3> |
166 |
</div> |
</div> |
167 |
<div class="panel-body"> |
<div class="panel-body"> |
168 |
|
|
193 |
|
|
194 |
|
|
195 |
</div> |
</div> |
196 |
</div> |
</div> <!-- upload panel --> |
197 |
</div> |
|
198 |
</div> |
<div class="panel panel-primary"> |
199 |
|
<div class="panel-heading"> |
200 |
|
<h3 class="panel-title">Afstand anden rute</h3> |
201 |
|
</div> |
202 |
|
<div class="panel-body"> |
203 |
|
|
204 |
|
|
205 |
|
<label for="distributor">Distributør:</label> |
206 |
|
<select class="form-control" id="afstand_distributor" name="afstand_distributor"> |
207 |
|
<option></option> |
208 |
|
<option>BK</option> |
209 |
|
<option>DAO</option> |
210 |
|
</select> |
211 |
|
<br> |
212 |
|
|
213 |
|
<button class="btn btn-primary" id="afstandBtn">Beregn</button> |
214 |
|
|
215 |
|
|
216 |
|
</div> |
217 |
|
</div><!-- Afstand-andenrute panel --> |
218 |
|
|
219 |
|
|
220 |
|
|
221 |
|
</div><!-- rightcol --> |
222 |
|
</div> <!-- row --> |
223 |
|
|
224 |
</div> |
</div><!-- body --> |
225 |
|
|
226 |
|
|
227 |
</div> |
</div> |
228 |
|
|
229 |
|
|