make stats red when they become stale

This commit is contained in:
Stephen Birarda 2014-03-24 16:40:14 -07:00
parent b01b2a3311
commit 4f7a8473fd
2 changed files with 9 additions and 1 deletions
domain-server/resources/web

View file

@ -38,4 +38,8 @@
span.port {
color: #666666;
}
.stale {
color: red;
}

View file

@ -15,7 +15,7 @@ $(document).ready(function(){
$.getJSON("/nodes/" + uuid + ".json", function(json){
// update the table header with the right node type
$('#stats-lead h3').html(json.node_type + " stats (" + uuid +);
$('#stats-lead h3').html(json.node_type + " stats (" + uuid + ")");
delete json.node_type;
@ -27,6 +27,10 @@ $(document).ready(function(){
});
$('#stats-table tbody').html(statsTableBody);
}).fail(function(data) {
$('#stats-table td').each(function(){
$(this).addClass('stale');
});
});
}