diff --git a/rbmd/conf.json b/rbmd/conf.json index 7f9e81b..2cc1b22 100644 --- a/rbmd/conf.json +++ b/rbmd/conf.json @@ -1,6 +1,6 @@ { -"api": "http://10.8.0.34:9076/v1/", +"api": "http://10.8.0.34:9076/v1", "ws": "ws://php.difrex.ru/ws" } diff --git a/rbmd/static/script.js b/rbmd/static/script.js index bc9e08c..d8916a6 100644 --- a/rbmd/static/script.js +++ b/rbmd/static/script.js @@ -1,40 +1,22 @@ $(function() { $('#mountFormTrigger').click(function(event){ $.ajax({ - url:"get_status.php", - success:function(data){ - var status = JSON.parse(data); - var htmlSelect = ''; -for (n in status["quorum"]) { htmlSelect += "";} - - $('#selectNode').html(htmlSelect); - console.log(htmlSelect);} - }) - }) - -}); - - - $('#mountFormTrigger').click(function(event){ - $.ajax({ - url:"get_status.php", + url:"status", success:function(data){ var status = JSON.parse(data); var htmlSelect = ''; for (n in status["quorum"]) { htmlSelect += "";} + $('#selectNode').html(htmlSelect); console.log(htmlSelect);} }) }) - -$(function() { - console.log( "ready!" ); }); function resolve() { $.ajax({ - url:"resolve.php", + url:"/resolve", data:{"node":deadNode}, success:function(data){$('#details').css("display", "none");} }) @@ -44,7 +26,7 @@ $(function() { var u = confirm(a + ": confirm unmount of " + b); if (u == true) { $.ajax({ - url:"unmount.php", + url:"unmount", data:{"node":a, "mountpoint":b, "block":c}, success:function(data){ var res = JSON.parse(data); @@ -58,6 +40,12 @@ $(function() { } } + + + + + + function displayData(a){ $("#status").html("
"+a.health+"
"); if (a.health == 'deadly.') { diff --git a/rbmd/templates/rbmd/index.html b/rbmd/templates/rbmd/index.html index 9ff1615..6f12238 100644 --- a/rbmd/templates/rbmd/index.html +++ b/rbmd/templates/rbmd/index.html @@ -15,12 +15,14 @@ +{% verbatim %}