diff --git a/static/rbmd/script.js b/static/rbmd/script.js index 7a77677..7d62624 100644 --- a/static/rbmd/script.js +++ b/static/rbmd/script.js @@ -19,6 +19,14 @@ $(function() { }) $('.tablink').css('display', 'block') + var ws = new WebSocket('{{escape(ws)}}'); + var cluster, selected_node, deadNode, node2; + ws.onopen = function() {ws.send(""); }; + ws.onmessage = function (evt) { + cluster = JSON.parse(evt.data); + displayData(cluster); + }; + $('#mountForm').submit(function(event){ event.preventDefault(); $.ajax({ @@ -41,7 +49,7 @@ $(function() { } }) }) - + }); function resolve() { diff --git a/templates/rbmd/index.html b/templates/rbmd/index.html index dac30bc..b1845e0 100644 --- a/templates/rbmd/index.html +++ b/templates/rbmd/index.html @@ -84,14 +84,13 @@