content: attr(data-checked);
background-color: #0099CC;
}
+
+#heartbeat.inactive {
+ background-color: #666;
+}
+#heartbeat.ok {
+ background-color: #0d2;
+}
+#heartbeat.warning {
+ background-color: #f44;
+}
.fail(function( jqxhr, textStatus, error ) {
var err = textStatus + ", " + error;
console.log( "Request Failed: " + err );
+ $('#heartbeat').attr('class', 'warning')
+ $('#heartbeat .cover').fadeTo(200, 1.0, function() { $(this).fadeTo(200, 0.0); });
})
.done(function( data ) {
var gview = document.getElementById("gview");
else if (pvField == "EGU")
el.textContent = pv.unit;
});
+ $('#heartbeat').attr('class', 'ok')
+ $('#heartbeat .cover').fadeTo(200, 1.0, function() { $(this).fadeTo(200, 0.0); });
});
};
{% endblock %}
{% block content %}
+ <div id="heartbeat" class="inactive" style="width: 10px; height: 10px; border-radius: 5px;">
+ <div class="cover" style="width: 100%; height: 100%; radius: 5px; background-color: #ffff;">
+ </div>
+ </div>
<div class="gview">
<object id="gview" style="margin: 2ex auto; display: block;" class="gview gview-{{ svg }}" data="/static/gview/{{ svg }}.svg" type="image/svg+xml">
Your browser doesn't support SVG