--- misc/xenconsole/index.php 2013/07/19 08:06:00 2020 +++ misc/xenconsole/index.php 2013/07/23 15:30:12 2028 @@ -133,7 +133,7 @@ $('#dialog-login').dialog({ modal: true, height: 210, - width: 325, + width: 350, buttons: { Login: loginDialogSubmit } @@ -149,6 +149,7 @@ password = $('#password').val(); $('#login').html("Logged in as " + username + ""); + refreshData(); } else { alert(data); } @@ -168,8 +169,10 @@ cddata = data; if (data.ISO != '') { $('#cdcurrent').html( data.ISO ); + $(":button:contains('Mount')").prop("disabled", true).addClass("ui-state-disabled"); } else { $('#cdcurrent').html('No ISO currently mounted'); + $(":button:contains('Eject')").prop("disabled", true).addClass("ui-state-disabled"); } }); @@ -269,8 +272,10 @@ vm.find('.console').data('session', session); vm.find('.console').data('name', name); vm.find('.settings').hide(); - vm.find('.actionstop').show(); - vm.find('.actionstart').hide(); + if (loggedin) { + vm.find('.actionstop').show(); + vm.find('.actionstart').hide(); + } vm.find('.os').text(' - ' + os); @@ -292,8 +297,10 @@ vm.find('.network').hide(); vm.find('.console').hide(); vm.find('.settings').show(); - vm.find('.actionstop').hide(); - vm.find('.actionstart').show(); + if (loggedin) { + vm.find('.actionstop').hide(); + vm.find('.actionstart').show(); + } vm.find('.cpu_graph').hide(); vm.find('.mem_graph').hide(); } @@ -359,7 +366,7 @@ if (isLoggedIn() == false) return; - var url = "console.php?url=" + url + "&session=" + session + "&key=" + key + "&name=" + name; + var url = "console.php?url=" + url + "&session=" + session + "&key=" + password + "&name=" + name; //window.location = url; //$('#mainwindow').load(url); @@ -473,11 +480,11 @@ - - + + @@ -494,7 +501,7 @@ force shutdown - +