/[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 1885 by torben, Fri Nov 30 17:56:07 2012 UTC revision 1887 by torben, Sat Dec 1 10:59:57 2012 UTC
# Line 46  $(document).ready( function() { Line 46  $(document).ready( function() {
46                  var conurl = $(this).data('conurl');                  var conurl = $(this).data('conurl');
47                  console(conurl,session);                  console(conurl,session);
48          });          });
49    
50            $('#logo').click( function() {
51                    refreshData();
52            });
53  });  });
54    
55  function refreshData() {  function refreshData() {
# Line 90  function refreshData() { Line 94  function refreshData() {
94         });         });
95  }  }
96    
97  function doAction(action, uuid) {  function doAction(action, uuid, vm) {
98          var key = prompt("Key");          var key = prompt("Key");
99          if (key == "" || key == null) {          if (key == "" || key == null) {
100                  return;                  return;
101          }          }
102          document.body.style.cursor = 'wait';          document.body.style.cursor = 'wait';
103            $('#vm_' + vm).find('.state').css("background-image", "url('gfx/vps_topyellow.png')");
104    
105          var url = "action.php?action=" + action + "&uuid=" + uuid + "&key=" + key;          var url = "action.php?action=" + action + "&uuid=" + uuid + "&key=" + key;
106          var response = $.get(url, function(data) {          var response = $.get(url, function(data) {
107                  alert(data);                  if (data != 'OK') {
108                            alert(data);
109                    }
110                  document.body.style.cursor = 'default'                  document.body.style.cursor = 'default'
111    
112                  refreshData();                  refreshData();
# Line 163  body { Line 170  body {
170    
171  <table width='100%' background='gfx/topbg.png' cellpadding='3' cellspacing='0' border='0' class='toptable'>  <table width='100%' background='gfx/topbg.png' cellpadding='3' cellspacing='0' border='0' class='toptable'>
172  <tr>  <tr>
173          <td rowspan='2' width='160'><img src='gfx/citrix-logo.png'></td>          <td rowspan='2' width='160'><img src='gfx/citrix-logo.png' id='logo'></td>
174          <td colspan='3' class='small' align='right'>Linux:2.6.32.12-0.7.1.xs6.0.2.542.170665xen / xen: 4.1.2 / xapi: 1.3</td>          <td colspan='3' class='small' align='right'>Linux:2.6.32.12-0.7.1.xs6.0.2.542.170665xen / xen: 4.1.2 / xapi: 1.3</td>
175  </tr>  </tr>
176  <tr>  <tr>
# Line 231  foreach($vms_array as $vm) { Line 238  foreach($vms_array as $vm) {
238                  <td width='150' class='small'>                  <td width='150' class='small'>
239                          <span class="actionstop" style='display:none'>                          <span class="actionstop" style='display:none'>
240                                  start |                                  start |
241                                  <a href='#' onclick="doAction('shutdown','<?php echo $uuid;?>')" >stop</a> |                                  <a href='#' onclick="doAction('shutdown','<?php echo $uuid;?>','<?php echo $clean_name;?>')" >stop</a> |
242                                  <a href='#' onclick="doAction('hardshutdown','<?php echo $uuid;?>')" >force shutdown</a>                                  <a href='#' onclick="doAction('hardshutdown','<?php echo $uuid;?>','<?php echo $clean_name;?>')" >force shutdown</a>
243                          </span>                          </span>
244                                                    
245                          <span class="actionstart">                                                <span class="actionstart">                      
246                                  <a href='#' onclick="doAction('start','<?php echo $uuid;?>')" >start</a> |                                  <a href='#' onclick="doAction('start','<?php echo $uuid;?>','<?php echo $clean_name;?>')" >start</a> |
247                                  stop |                                  stop |
248                                  force shutdown                                  force shutdown
249                          </span>                          </span>

Legend:
Removed from v.1885  
changed lines
  Added in v.1887

  ViewVC Help
Powered by ViewVC 1.1.20