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