From efb3f7bbf9cea1e15672eda5c2de4ad9fd083c46 Mon Sep 17 00:00:00 2001 From: Anna Date: Thu, 22 Mar 2018 18:12:15 +0300 Subject: [PATCH] upd --- static/rbmd/script.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/static/rbmd/script.js b/static/rbmd/script.js index 185c262..f543938 100644 --- a/static/rbmd/script.js +++ b/static/rbmd/script.js @@ -67,18 +67,18 @@ function displayData(a){ $("#statusContainer:contains('alive')").css("background-color", "#4CAF50"); $("#statusContainer:contains('resizing')").css("background-color", "#ff9800"); $("#statusContainer:contains('deadly')").css("background-color", "#f44336");; - // if (node2 != undefined) { + if (node2 != undefined) { var one = a.quorum.map(function(item) {return item.node}) || undefined; var two = node2.quorum.map(function(item) {return item.node}); - if (JSON.stringify(one) != JSON.stringify(two) || node2 != undefined) { + if (JSON.stringify(one) != JSON.stringify(two)) { node2 = a; w3DisplayData("id01", node2); } - // } - // else { - // node2 = a; - // w3DisplayData("id01", node2); - // } + } + else { + node2 = a; + w3DisplayData("id01", node2); + } if ($('.tablink').css('display') != 'block') { $('.tablink').css('display', 'block');