/[projects]/misc/xenconsole/index.php
ViewVC logotype

Diff of /misc/xenconsole/index.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2020 by torben, Fri Jul 19 08:06:00 2013 UTC revision 2028 by torben, Tue Jul 23 15:30:12 2013 UTC
# Line 133  function loginDialog() { Line 133  function loginDialog() {
133          $('#dialog-login').dialog({          $('#dialog-login').dialog({
134                  modal: true,                  modal: true,
135                  height: 210,                  height: 210,
136                  width: 325,                  width: 350,
137                  buttons: {                  buttons: {
138                          Login: loginDialogSubmit                          Login: loginDialogSubmit
139                  }                  }
# Line 149  function loginDialogSubmit() { Line 149  function loginDialogSubmit() {
149                          password = $('#password').val();                          password = $('#password').val();
150    
151                          $('#login').html("Logged in as <i>" + username + "</i>");                          $('#login').html("Logged in as <i>" + username + "</i>");
152                            refreshData();
153                  } else {                  } else {
154                          alert(data);                          alert(data);
155                  }                  }
# Line 168  function cdSelectorDialog(uuid) { Line 169  function cdSelectorDialog(uuid) {
169                  cddata = data;                  cddata = data;
170                  if (data.ISO != '') {                  if (data.ISO != '') {
171                          $('#cdcurrent').html(  data.ISO );                          $('#cdcurrent').html(  data.ISO );
172                            $(":button:contains('Mount')").prop("disabled", true).addClass("ui-state-disabled");
173                  } else {                  } else {
174                          $('#cdcurrent').html('<i>No ISO currently mounted</i>');                          $('#cdcurrent').html('<i>No ISO currently mounted</i>');
175                            $(":button:contains('Eject')").prop("disabled", true).addClass("ui-state-disabled");
176                  }                  }
177          });          });
178                    
# Line 269  function refreshData() { Line 272  function refreshData() {
272                                  vm.find('.console').data('session', session);                                  vm.find('.console').data('session', session);
273                                  vm.find('.console').data('name', name);                                  vm.find('.console').data('name', name);
274                                  vm.find('.settings').hide();                                  vm.find('.settings').hide();
275                                  vm.find('.actionstop').show();                                  if (loggedin) {
276                                  vm.find('.actionstart').hide();                                          vm.find('.actionstop').show();
277                                            vm.find('.actionstart').hide();
278                                    }
279                                  vm.find('.os').text(' - ' + os);                                  vm.find('.os').text(' - ' + os);
280    
281    
# Line 292  function refreshData() { Line 297  function refreshData() {
297                                  vm.find('.network').hide();                                  vm.find('.network').hide();
298                                  vm.find('.console').hide();                                  vm.find('.console').hide();
299                                  vm.find('.settings').show();                                  vm.find('.settings').show();
300                                  vm.find('.actionstop').hide();                                  if (loggedin) {
301                                  vm.find('.actionstart').show();                                          vm.find('.actionstop').hide();
302                                            vm.find('.actionstart').show();
303                                    }
304                                  vm.find('.cpu_graph').hide();                                  vm.find('.cpu_graph').hide();
305                                  vm.find('.mem_graph').hide();                                  vm.find('.mem_graph').hide();
306                          }                          }
# Line 359  function openConsole(url, session, name) Line 366  function openConsole(url, session, name)
366          if (isLoggedIn() == false)          if (isLoggedIn() == false)
367                  return;                  return;
368    
369          var url = "console.php?url=" + url + "&session=" + session + "&key=" + key + "&name=" + name;          var url = "console.php?url=" + url + "&session=" + session + "&key=" + password + "&name=" + name;
370    
371          //window.location = url;          //window.location = url;
372          //$('#mainwindow').load(url);          //$('#mainwindow').load(url);
# Line 473  foreach($vms_array as $vm) { Line 480  foreach($vms_array as $vm) {
480                          <td colspan='2' class='small' align='right'>                          <td colspan='2' class='small' align='right'>
481                                  <span class='network'></span>                                  <span class='network'></span>
482                                  <a href='#' class='cd' uuid='<?php echo $uuid;?>' >                                  <a href='#' class='cd' uuid='<?php echo $uuid;?>' >
483                                          <img src='gfx/icon-cd.png' style='vertical-align: middle;'>                                          <img src='gfx/icon-cd.gif' style='vertical-align: middle;'></a>
                                 </a>  
484                                  <a href='#' style='display:none;' class='console'>                                  <a href='#' style='display:none;' class='console'>
485                                          <img src='gfx/icon-terminal.png' style='vertical-align: middle;'>                                          <img src='gfx/icon-terminal.png' style='vertical-align: middle;'>
486                                  </a>                                  </a>
487    
488                                  <a href='#' style='display:none;' class='settings' uuid='<?php echo $uuid;?>'>                                  <a href='#' style='display:none;' class='settings' uuid='<?php echo $uuid;?>'>
489                                          <img src='gfx/icon-settings16.png' style='vertical-align: middle;'>                                          <img src='gfx/icon-settings16.png' style='vertical-align: middle;'>
490                                  </a>                                  </a>
# Line 494  foreach($vms_array as $vm) { Line 501  foreach($vms_array as $vm) {
501                                  <a href='#' onclick="doAction('hardshutdown','<?php echo $uuid;?>','<?php echo $clean_name;?>')" >force shutdown</a>                                  <a href='#' onclick="doAction('hardshutdown','<?php echo $uuid;?>','<?php echo $clean_name;?>')" >force shutdown</a>
502                          </span>                          </span>
503                                                    
504                          <span class="actionstart">                                                <span class="actionstart" style='display:none'>                
505                                  <a href='#' onclick="doAction('start','<?php echo $uuid;?>','<?php echo $clean_name;?>')" >start</a> |                                  <a href='#' onclick="doAction('start','<?php echo $uuid;?>','<?php echo $clean_name;?>')" >start</a> |
506                                  stop |                                  stop |
507                                  force shutdown                                  force shutdown

Legend:
Removed from v.2020  
changed lines
  Added in v.2028

  ViewVC Help
Powered by ViewVC 1.1.20