Commit 82276bd9 authored by Jérome Perrin's avatar Jérome Perrin

use fontawesome to display station status

parent 389d733e
......@@ -337,7 +337,7 @@ border: 1px solid black;
color:black;
font-family:serif;
font-style:italic;
padding-top:0.9em;
padding-top:1.4em;
font-size:0.9em;
cursor:move;
font-size:11px;
......@@ -384,8 +384,8 @@ border: 1px solid black;
.status {
position:absolute;
bottom:0px;
right:5px;
top:0px;
left:5px;
}
._jsPlumb_source_hover, ._jsPlumb_target_hover, .dragHover {
......
......@@ -359,9 +359,29 @@
}
function changeStatus(message, queue) {
var obj = dream_instance.getElementId(message.object);
dream_instance.updateElementData(message.object,
{status: message.status})
var element_id = dream_instance.getElementId(message.object);
var statusdiv = $("#" + element_id).find(".status");
if (!statusdiv.length) {
statusdiv = $("<div>").addClass("status").appendTo($("#" + element_id));
}
if (message.status == 'setup') {
statusdiv.html("<i class='fa fa-wrench'></i> setup")
}
if (message.status == 'loading') {
statusdiv.html("<i class='fa fa-upload'></i> loading")
}
if (message.status == 'working') {
statusdiv.html("<i class='fa fa-gear fa-spin'></i> working")
}
if (message.status == 'waiting') {
statusdiv.html("<i class='fa fa-coffee'></i> waiting")
}
if (message.status == 'blocked') {
statusdiv.html("<i class='fa fa-exclamation'></i> blocked")
}
if (message.status == 'failure') {
statusdiv.html("<i class='fa fa-fire'></i> failure")
}
$("#now").text(message.time.toFixed(2));
$(queue).dequeue()
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment