This commit is contained in:
Anna Sudnitsina 2018-03-26 22:21:30 +03:00
parent d44bac3595
commit 8a63b6544e
2 changed files with 16 additions and 9 deletions

View File

@ -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() {

View File

@ -84,14 +84,13 @@
</div>
</body>
<script>
var ws = new WebSocket('{{escape(ws)}}');
var a, selected_node, deadNode, node2;
ws.onopen = function() {ws.send(""); };
ws.onmessage = function (evt) {
console.log(a);
a = JSON.parse(evt.data);
displayData(a);
};
// 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();