diff --git a/static/rbmd/script.js b/static/rbmd/script.js index 7203c1c..07b8cd5 100644 --- a/static/rbmd/script.js +++ b/static/rbmd/script.js @@ -16,6 +16,15 @@ $(function() { } }) */ + var url = "ws://" + location.host + "/socket"; + var ws = new WebSocket(url); + var a, selected_node, deadNode, node2; + ws.onopen = function() {ws.send(""); }; + ws.onmessage = function (evt) { + a = JSON.parse(evt.data); + displayData(a); + }; + $('.tablink').css('display', 'block'); }) diff --git a/templates/rbmd/index.html b/templates/rbmd/index.html index f0b5630..c745b1e 100644 --- a/templates/rbmd/index.html +++ b/templates/rbmd/index.html @@ -84,16 +84,16 @@