From 4f7a8473fde27c66a5d59dfb7d49d7f727fce125 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Mon, 24 Mar 2014 16:40:14 -0700 Subject: [PATCH] make stats red when they become stale --- domain-server/resources/web/css/style.css | 4 ++++ domain-server/resources/web/stats/js/stats.js | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/domain-server/resources/web/css/style.css b/domain-server/resources/web/css/style.css index d641aa5f71..fb295cffc3 100644 --- a/domain-server/resources/web/css/style.css +++ b/domain-server/resources/web/css/style.css @@ -38,4 +38,8 @@ span.port { color: #666666; +} + +.stale { + color: red; } \ No newline at end of file diff --git a/domain-server/resources/web/stats/js/stats.js b/domain-server/resources/web/stats/js/stats.js index bebd16b883..a7b0aecfcf 100644 --- a/domain-server/resources/web/stats/js/stats.js +++ b/domain-server/resources/web/stats/js/stats.js @@ -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'); + }); }); }