From 54ed2eb9f6a902fc649f7123373da23908fe9fac Mon Sep 17 00:00:00 2001 From: Anna Date: Thu, 22 Mar 2018 17:04:23 +0300 Subject: [PATCH] upd --- static/rbmd/script.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/static/rbmd/script.js b/static/rbmd/script.js index d517957..6db15de 100644 --- a/static/rbmd/script.js +++ b/static/rbmd/script.js @@ -68,15 +68,16 @@ function displayData(a){ $("#statusContainer:contains('resizing')").css("background-color", "#ff9800"); $("#statusContainer:contains('deadly')").css("background-color", "#f44336");; // if (node2 != undefined) { - // var one = a.quorum.map(function(item) {return item.node}); - // var two = node2.quorum.map(function(item) {return item.node}); - // if (JSON.stringify(one) != JSON.stringify(two)) { - // node2 = a; - // w3DisplayData("id01", node2); - // } - // } else { - node2 = a; - w3DisplayData("id01", node2); + var one = a.quorum.map(function(item) {return item.node}); + var two = node2.quorum.map(function(item) {return item.node}); + if (JSON.stringify(one) != JSON.stringify(two)) { + node2 = a; + w3DisplayData("id01", node2); + } + } + // else { + // node2 = a; + // w3DisplayData("id01", node2); // } if ($('.tablink').css('display') != 'block') {