--- misc/xenconsole/index.php 2013/03/23 13:58:17 1951 +++ misc/xenconsole/index.php 2013/03/25 12:47:31 1952 @@ -116,6 +116,8 @@ os += ' Guest Tools: ' + guestversion; } + vm.find('.vps_memory_usage_txt_UID').text( maxmem + " MB"); + if (state == "Running") { vm.find('.state').css("background-image", "url('gfx/vps_topgreen.png')"); vm.find('.network').show(); @@ -158,6 +160,8 @@ } function doAction(action, uuid, vm) { + var val=""; + var key = prompt("Key"); if (key == "" || key == null) { return; @@ -165,7 +169,15 @@ document.body.style.cursor = 'wait'; $('#vm_' + vm).find('.state').css("background-image", "url('gfx/vps_topyellow.png')"); - var url = "action.php?action=" + action + "&uuid=" + uuid + "&key=" + key; + if (action == "setMemory") { + val = prompt("Set memory target"); + if (val == "" || val == null) { + alert("" + val); + return; + } + } + + var url = "action.php?action=" + action + "&uuid=" + uuid + "&key=" + key + "&val=" + val;; var response = $.get(url, function(data) { if (data != 'OK') { alert(data); @@ -289,8 +301,8 @@ - - + @@ -324,7 +339,7 @@
  + stop | - force shutdown + force shutdown | + set memory start | stop | - force shutdown + force shutdown | + + set memory
- +