/[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 1895 by torben, Sun Dec 9 19:57:00 2012 UTC revision 2105 by torben, Mon Feb 10 08:13:22 2014 UTC
# Line 1  Line 1 
1  <?php  <?php
2  include("config.php");  
3    if (! file_exists("config.php") ) {
4      die("Could not find config.php file");
5    }
6    
7    require("config.php");
8    
9  function format_memory($size) {  function format_memory($size) {
10    if (1024 > $size) {    if (1024 > $size) {
# Line 46  $namelabel = $host["name_label"]; Line 51  $namelabel = $host["name_label"];
51  <html>  <html>
52  <head>  <head>
53  <title>XenServer::<?php echo $namelabel;?></title>  <title>XenServer::<?php echo $namelabel;?></title>
54  <script type='text/javascript' src="jquery-1.8.2.min.js"></script>  
55    <link rel="stylesheet" type="text/css" href="jquery/theme/jquery-ui.css">
56    <style>
57    .ui-menu {
58            width: 200px;
59    }
60    </style>
61    <script type='text/javascript' src="jquery/jquery-1.9.1.min.js"></script>
62    <script type='text/javascript' src="jquery/jquery-ui-1.10.2.min.js"></script>
63    
64  <script type='text/javascript'>  <script type='text/javascript'>
65    var menu = 0;
66    var menu_uuid = '';
67    
68    var user = "";
69    var password = "";
70    var loggedin = false;
71    
72    function isLoggedIn() {
73            if (loggedin == false) {
74                    alert("You need to login to perform this operation");
75            }
76            return loggedin;
77    }
78    
79    
80  $(document).ready( function() {  $(document).ready( function() {
81            $("#menu").hide();
82          setInterval(refreshData, 60000);                  setInterval(refreshData, 60000);        
83          refreshData();          refreshData();
84          $('.console').click( function() {          $('.console').click( function() {
85                  var session = $(this).data('session');                  var session = $(this).data('session');
86                  var conurl = $(this).data('conurl');                  var conurl = $(this).data('conurl');
87                  console(conurl,session);                  var name = $(this).data('name');
88                    openConsole(conurl,session,name);
89          });          });
90    
91            $('.bar').progressbar( );
92    
93          $('#logo').click( function() {          $('#logo').click( function() {
94                  refreshData();                  refreshData();
95          });          });
96    
97            $('.settings').click( function(event) {
98                    menu_uuid = $(this).attr('uuid');
99    
100                    $('#menu').menu( {
101                            select: function(event2,ui) {
102                                            var action = $(ui.item).attr("action");
103                                            if (action == "memory") {
104                                                    doAction("setMemory", menu_uuid, "");  
105                                            }
106                                            if (action == "cpu") {
107                                                    doAction("setCPU", menu_uuid, "");      
108                                            }
109                                    },
110                            create: function(event3,ui) {
111                                    menu = 1;
112                                    }
113                            /*position: {
114                                    my: "left", of: event
115                            }*/
116                    });
117                    $('#menu').show().position( {my: "left top", of: event} );
118                    event.stopPropagation();
119            });
120    
121            $('.cd').click( function(event) {
122                    var uuid = $(this).attr('uuid');
123                    cdSelectorDialog(uuid);
124            });
125            $('#loginlink').click( function(event) {
126                    loginDialog();
127            });
128    
129            $(document).click( function(event) {
130                    closeMenu();
131            });
132            $('#dialog-login').keypress(function(e) {
133            if (e.keyCode == $.ui.keyCode.ENTER) {
134                            loginDialogSubmit();
135            }
136            });
137  });  });
138    
139    function loginDialog() {
140            $('#dialog-login').dialog({
141                    modal: true,
142                    height: 210,
143                    width: 350,
144                    buttons: {
145                            Login: loginDialogSubmit
146                    }
147            });
148    }
149    function loginDialogSubmit() {
150            var params = $('#loginform').serialize();
151    
152            $.get('login.php?' + params, function(data) {
153                    if (data == "OK") {
154                            loggedin = true;
155                            username = $('#username').val();
156                            password = $('#password').val();
157    
158                            $('#login').html("Logged in as <i>" + username + "</i>");
159                            refreshData();
160                    } else {
161                            alert(data);
162                    }
163                    $("#dialog-login").dialog( "close" );
164            });
165    }
166    
167    function cdSelectorDialog(uuid) {
168            if (isLoggedIn() == false)
169                    return;
170    
171            $('#cdselector').html('');
172            $('#cdselector').load( 'getisolist.php' );
173            var cddata;
174    
175            $.getJSON('getcdinfo.php?uuid=' + uuid, function(data) {
176                    cddata = data;
177                    if (data.ISO != '') {
178                            $('#cdcurrent').html(  data.ISO );
179                            $(":button:contains('Mount')").prop("disabled", true).addClass("ui-state-disabled");
180                    } else {
181                            $('#cdcurrent').html('<i>No ISO currently mounted</i>');
182                            $(":button:contains('Eject')").prop("disabled", true).addClass("ui-state-disabled");
183                    }
184            });
185            
186            $('#dialog-cd').dialog({
187                    modal: true,
188                    width: 800,
189                    height: 300,
190                    buttons: {
191                            Mount: function() {
192                                    $( this ).dialog( "close" );
193                                    var vdi = $("#cdselector").val();
194                                    cdAction("mount", cddata.VBD, vdi);
195                            },
196                            Eject: function() {
197                                    $( this ).dialog( "close" );
198                                    cdAction("eject", cddata.VBD, "");
199                            },
200                            Cancel: function() {
201                                    $( this ).dialog( "close" );
202                            }
203                            
204                    }
205            });
206    }
207    
208    function closeMenu() {
209            if (menu > 0) {
210                    $("#menu").menu("destroy").hide();
211                    menu = 0;
212            }
213    }
214    
215  function refreshData() {  function refreshData() {
216          $("#logo").hide();                $("#logo").hide();      
217          $.get('ajaxdata.php', function(xml) {          $.get('ajaxdata.php', function(xml) {
218                  $(xml).find('host').each(function() {                  $(xml).find('host').each(function() {
219                          var memtotal = $(this).find('memtotal').text();                          var memtotal = $(this).find('memtotal').text();
220                          var memfree = $(this).find('memfree').text();                            var memfree = $(this).find('memfree').text();  
221                          var cpuavg = $(this).find('cpuavg').text();                          var cpuavg = $(this).find('cpuavg').text() * 1; // *1 is used to convert the string var to an int
222    
223                          memtotal = Math.round ( memtotal / (1024*1024) );                          memtotal = Math.round ( memtotal / (1024*1024) );
224                          memfree = Math.round ( memfree / (1024*1024) );                          memfree = Math.round ( memfree / (1024*1024) );
# Line 78  function refreshData() { Line 227  function refreshData() {
227    
228                          //alert(memused + ' ' + mem_percentage);                          //alert(memused + ' ' + mem_percentage);
229    
230                          $('#server_memory_usage').attr('src', 'usagebar.php?usage=' + mem_percentage);                          //$('#server_memory_usage').attr('src', 'usagebar.php?usage=' + mem_percentage);
231                            $('#server_memory_usage').progressbar( "value", mem_percentage );
232                          $('#server_memory_usage').attr('alt', mem_percentage + '%');                          $('#server_memory_usage').attr('alt', mem_percentage + '%');
233                          $('#server_memory_usage').attr('title', mem_percentage + '%');                          $('#server_memory_usage').attr('title', mem_percentage + '%');
234                          $('#server_memory_usage_txt').text( memused + '/' + memtotal + 'MB');                          $('#server_memory_usage_txt').text( memused + '/' + memtotal + 'MB');
235    
236    
237                          $('#server_cpu_usage').attr('src', 'usagebar.php?usage=' + cpuavg);                          //$('#server_cpu_usage').attr('src', 'usagebar.php?usage=' + cpuavg);
238                            $('#server_cpu_usage').progressbar( "value", cpuavg );
239                          $('#server_cpu_usage').attr('alt', cpuavg + '%');                          $('#server_cpu_usage').attr('alt', cpuavg + '%');
240                          $('#server_cpu_usage').attr('title', cpuavg + '%');                          $('#server_cpu_usage').attr('title', cpuavg + '%');
241                          $('#server_cpu_usage_txt').text( cpuavg+ '%');                          $('#server_cpu_usage_txt').text( cpuavg+ '%');
# Line 97  function refreshData() { Line 248  function refreshData() {
248                          var conurl = $(this).find('conurl').text();                          var conurl = $(this).find('conurl').text();
249                          var session = $(this).find('session').text();                          var session = $(this).find('session').text();
250                          var os = $(this).find('os').text();                          var os = $(this).find('os').text();
251                            var guestversion = $(this).find('guestversion').text();
252                          var cpuavg = $(this).find('cpuavg').text();                          var cpuavg = $(this).find('cpuavg').text();
253                            var curmem = $(this).find('curmem').text();
254                          name = name.replace(" ", "_");                          var maxmem = $(this).find('maxmem').text();
255                          name = name.replace(".", "_");                          var cpus = $(this).find('cpus').text();
256    
257                            var mempercent = Math.round( (curmem*100) / maxmem );
258    
259                            name = name.replace(/ /g, "_");
260                            name = name.replace(/\./g, "_");
261                            name = name.replace(/\(/g, "_");
262                            name = name.replace(/\)/g, "_");
263                                                    
264                          var id = "#vm_" + name;                          var id = "#vm_" + name;
265    
266                          var vm = $(id);                                          var vm = $(id);                
267    
268                            if (guestversion != '') {
269                                    os += ' Guest Tools: ' + guestversion;
270                            }
271    
272                            vm.find('.vps_memory_usage_txt_UID').text( maxmem + " MB");
273                            vm.find('.vps_cpu_usage_txt_UID').text( cpus + " VCPU");
274    
275                          if (state == "Running") {                          if (state == "Running") {
276                                  vm.find('.state').css("background-image", "url('gfx/vps_topgreen.png')");                                  vm.find('.state').css("background-image", "url('gfx/vps_topgreen.png')");
277                                  vm.find('.network').show();                                  vm.find('.network').show();
# Line 113  function refreshData() { Line 279  function refreshData() {
279                                  vm.find('.console').show();                                  vm.find('.console').show();
280                                  vm.find('.console').data('conurl', conurl);                                  vm.find('.console').data('conurl', conurl);
281                                  vm.find('.console').data('session', session);                                  vm.find('.console').data('session', session);
282                                  vm.find('.actionstop').show();                                  vm.find('.console').data('name', name);
283                                  vm.find('.actionstart').hide();                                  vm.find('.settings').hide();
284                                    if (loggedin) {
285                                            vm.find('.actionstop').show();
286                                            vm.find('.actionstart').hide();
287                                    }
288                                  vm.find('.os').text(' - ' + os);                                  vm.find('.os').text(' - ' + os);
289    
290                                    cpuavg = cpuavg * 1;
291                                  vm.find('.cpu_graph').show();                                  vm.find('.cpu_graph').show();
292                                  vm.find('.cpu_graph').attr('src', 'usagebar.php?usage=' + cpuavg);                                  //vm.find('.cpu_graph').attr('src', 'usagebar.php?usage=' + cpuavg);
293                                    vm.find('.cpu_graph').progressbar( "value", cpuavg );
294                                  vm.find('.cpu_graph').attr('title',  cpuavg + '%');                                  vm.find('.cpu_graph').attr('title',  cpuavg + '%');
295    
296                                  vm.find('.mem_graph').show();                                  vm.find('.mem_graph').show();
297                                    //vm.find('.mem_graph').attr('src', 'usagebar.php?usage=' + mempercent);
298                                    vm.find('.mem_graph').progressbar( "value", mempercent );
299                                    vm.find('.mem_graph').attr('title',  curmem + ' / ' + maxmem + ' MB' );
300                          } else {                          } else {
301                                  if (state == "Halted") {                                  if (state == "Halted") {
302                                          vm.find('.state').css("background-image", "url('gfx/vps_topred.png')");                                          vm.find('.state').css("background-image", "url('gfx/vps_topred.png')");
303                                  } else {                                  } else {
304                                          vm.find('.state').css("background-image", "url('gfx/vps_topyellow.png')");                                          vm.find('.state').css("background-image", "url('gfx/vps_topyellow.png')");
305                                  }                                  }
306                                    vm.find('.os').text('');
307    
308                                  vm.find('.network').hide();                                  vm.find('.network').hide();
309                                  vm.find('.console').hide();                                  vm.find('.console').hide();
310                                  vm.find('.actionstop').hide();                                  vm.find('.settings').show();
311                                  vm.find('.actionstart').show();                                  if (loggedin) {
312                                            vm.find('.actionstop').hide();
313                                            vm.find('.actionstart').show();
314                                    }
315                                  vm.find('.cpu_graph').hide();                                  vm.find('.cpu_graph').hide();
316                                  vm.find('.mem_graph').hide();                                  vm.find('.mem_graph').hide();
317                          }                          }
318                            vm.find('.state').attr('title', state);
319                                                    
320                  });                  });
321                  $('#logo').show();                  $('#logo').show();
# Line 142  function refreshData() { Line 323  function refreshData() {
323  }  }
324    
325  function doAction(action, uuid, vm) {  function doAction(action, uuid, vm) {
326          var key = prompt("Key");          var val="";
327          if (key == "" || key == null) {  
328            if (isLoggedIn() == false)
329                  return;                  return;
330          }  
331          document.body.style.cursor = 'wait';          document.body.style.cursor = 'wait';
332          $('#vm_' + vm).find('.state').css("background-image", "url('gfx/vps_topyellow.png')");          $('#vm_' + vm).find('.state').css("background-image", "url('gfx/vps_topyellow.png')");
333    
334          var url = "action.php?action=" + action + "&uuid=" + uuid + "&key=" + key;          if (action == "setMemory") {
335                    val = prompt("Set memory target");
336                    val *= (1024*1024);
337                    if (val == "" || val == null) {
338                            return;
339                    }
340            }
341            if (action == "setCPU") {
342                    val = prompt("Set CPU count");
343                    if (val == "" || val == null) {
344                            return;
345                    }
346            }
347    
348            var url = "action.php?action=" + action + "&uuid=" + uuid + "&key=" + password + "&val=" + val;;
349          var response = $.get(url, function(data) {          var response = $.get(url, function(data) {
350                  if (data != 'OK') {                  if (data != 'OK') {
351                          alert(data);                          alert(data);
# Line 160  function doAction(action, uuid, vm) { Line 356  function doAction(action, uuid, vm) {
356          });          });
357  }  }
358    
359  function console(url, session) {  function cdAction(action, vbd,vdi) {
360            if (isLoggedIn() == false)
361                    return;
362    
363            document.body.style.cursor = 'wait';
364            var url = "cdaction.php?action=" + action + "&VBD=" + vbd + "&key=" + password + "&VDI=" + vdi;
365            var response = $.get(url, function(data) {
366                    if (data != 'OK') {
367                            alert(data);
368                    }
369                    document.body.style.cursor = 'default'
370            });
371            
372    }
373    
374    function openConsole(url, session, name) {
375          if (url == '')          if (url == '')
376                  return;                  return;
377    
378          var key = prompt("Key");          if (isLoggedIn() == false)
         if (key == "" || key == null) {  
379                  return;                  return;
380          }  
381          var url = "console.php?url=" + url + "&session=" + session + "&key=" + key;          var url = "console.php?url=" + url + "&session=" + session + "&key=" + password + "&name=" + name;
382    
383          //window.location = url;          //window.location = url;
384          //$('#mainwindow').load(url);          //$('#mainwindow').load(url);
# Line 209  body { Line 419  body {
419          margin: 4;          margin: 4;
420          border: 1px solid #222;          border: 1px solid #222;
421  }  }
422    
423    .ui-progressbar-value {
424            background: #61B4F3;
425    }
426    
427    .ui-progressbar {
428            border-style:solid;
429            border-width:1px;
430            border-color: #666666;
431    }
432    
433    .bar {
434            width:  102px;
435            height:  16px;
436    }
437    
438  </style>  </style>
439  </head>  </head>
440  <body>  <body>
# Line 221  body { Line 447  body {
447          <td colspan='4' class='small' align='right'><?php echo $namelabel . " / " . $xenversion;?><br><?php echo $license;?></td>          <td colspan='4' class='small' align='right'><?php echo $namelabel . " / " . $xenversion;?><br><?php echo $license;?></td>
448  </tr>  </tr>
449  <tr>  <tr>
450          <td width='150' align='right' class='small'><img src='gfx/icon-cpu.png'>  <td width='150'>
451                  <img id='server_cpu_usage' src='usagebar.php?usage=12' width='102' height='16' title='static dummy data'><div id='server_cpu_usage_txt'>12%</div></td>          <span id="login" class='small'><i>Not <a href="#" id="loginlink">logged in</a></i>
452            </span>
453          <td width='150' align='right' class='small'><img src='gfx/icon-memory.png'>  </td>
454                  <img id='server_memory_usage' src='usagebar.php?usage=1' width='102' height='16' title='static dummy data'><div id='server_memory_usage_txt'>0/4 MB</div></td>  <td width='150'></td>
455            <td width='150' align='right' class='small'>
456            <div id='server_cpu_usage' class='bar'></div>
457                    <img src='gfx/icon-cpu.png'>
458                    <span id='server_cpu_usage_txt'>12%</span>
459            </td>
460    
461            <td width='150' align='right' class='small'>
462            <div id='server_memory_usage' class='bar'></div>
463                    <img src='gfx/icon-memory.png'>
464                    <span id='server_memory_usage_txt'>0/4 MB</span>
465        </td>
466    <!--
467          <td width='150' align='right' class='small'><img src='gfx/icon-network.png'>          <td width='150' align='right' class='small'><img src='gfx/icon-network.png'>
468                  <img id='server_net_usage' src='usagebar.php?usage=41' width='102' height='16' title='static dummy data'><div id='server_net_usage_txt'>1%</div></td>                  <img id='server_net_usage' src='usagebar.php?usage=41' width='102' height='16' title='static dummy data'><div id='server_net_usage_txt'>1%</div></td>
469          <td width='150' align='right' class='small'><img src='gfx/icon-disk.png'>          <td width='150' align='right' class='small'><img src='gfx/icon-disk.png'>
470                  <img id='server_disk_usage' src='usagebar.php?usage=41' width='102' height='16' title='static dummy data'><div id='server_memory_usage_txt'>89.3/405.5 GB</div></td>                  <img id='server_disk_usage' src='usagebar.php?usage=41' width='102' height='16' title='static dummy data'><div id='server_memory_usage_txt'>89.3/405.5 GB</div></td>
   
471          </td>          </td>
472    -->
473  </tr></table>  </tr></table>
474    
475    
# Line 245  foreach($vms_array as $vm) { Line 482  foreach($vms_array as $vm) {
482          }          }
483    
484          $name = $vm["name_label"];          $name = $vm["name_label"];
485            $description = $vm["name_description"];
486          $uuid = $vm["uuid"];          $uuid = $vm["uuid"];
487          $state = $vm["power_state"] ;          $state = $vm["power_state"] ;
488          $memory = $vm['memory_target'];          $memory = $vm['memory_target'];
# Line 253  foreach($vms_array as $vm) { Line 491  foreach($vms_array as $vm) {
491    
492          $clean_name = str_replace(" ", "_", $name);          $clean_name = str_replace(" ", "_", $name);
493          $clean_name = str_replace(".", "_", $clean_name);          $clean_name = str_replace(".", "_", $clean_name);
494            $clean_name = str_replace("(", "_", $clean_name);
495            $clean_name = str_replace(")", "_", $clean_name);
496                    
497    
498          foreach ($vm["VBDs"] as $vbds) {          foreach ($vm["VBDs"] as $vbds) {
# Line 270  foreach($vms_array as $vm) { Line 510  foreach($vms_array as $vm) {
510          <table width='99%' cellpadding='3' cellspacing='0' border='0' class='vps' id='vm_<?php echo $clean_name;?>'>          <table width='99%' cellpadding='3' cellspacing='0' border='0' class='vps' id='vm_<?php echo $clean_name;?>'>
511                  <tr background='gfx/vps_topbg.png'  >                  <tr background='gfx/vps_topbg.png'  >
512                          <td width='10' class='small state'>&nbsp;</td>                          <td width='10' class='small state'>&nbsp;</td>
513                          <td colspan='2' class='small'><b><?php echo $name; ?></b><span class='os'></span></td>                          <td colspan='2' class='small' title='<?php echo $description;?>'><b><?php echo $name; ?></b><span class='os'></span></td>
514                          <td colspan='2' class='small' align='right'>                          <td colspan='2' class='small' align='right'>
515                                  <span class='network'></span>                                  <span class='network'></span>
516                                    <a href='#' class='cd' uuid='<?php echo $uuid;?>' >
517                                            <img src='gfx/icon-cd.gif' style='vertical-align: middle;'></a>
518                                  <a href='#' style='display:none;' class='console'>                                  <a href='#' style='display:none;' class='console'>
519                                          <img src='gfx/icon-terminal.png' style='vertical-align: middle;'>                                          <img src='gfx/icon-terminal.png' style='vertical-align: middle;'>
520                                  </a>                                  </a>
521    
522                                    <a href='#' style='display:none;' class='settings' uuid='<?php echo $uuid;?>'>
523                                            <img src='gfx/icon-settings16.png' style='vertical-align: middle;'>
524                                    </a>
525                          </td>                          </td>
526                  </tr>                  </tr>
527    
# Line 286  foreach($vms_array as $vm) { Line 532  foreach($vms_array as $vm) {
532                          <span class="actionstop" style='display:none'>                          <span class="actionstop" style='display:none'>
533                                  start |                                  start |
534                                  <a href='#' onclick="doAction('shutdown','<?php echo $uuid;?>','<?php echo $clean_name;?>')" >stop</a> |                                  <a href='#' onclick="doAction('shutdown','<?php echo $uuid;?>','<?php echo $clean_name;?>')" >stop</a> |
535                                  <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> |
536                                    <a href='#' onclick="doAction('hardreboot','<?php echo $uuid;?>','<?php echo $clean_name;?>')" >force reboot</a>
537                          </span>                          </span>
538                                                    
539                          <span class="actionstart">                                                <span class="actionstart" style='display:none'>                
540                                  <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> |
541                                  stop |                                  stop |
542                                  force shutdown                                  force shutdown
# Line 298  foreach($vms_array as $vm) { Line 545  foreach($vms_array as $vm) {
545                  </td>                  </td>
546    
547                  <td width='100' align='right' class='small' valign='top'>                  <td width='100' align='right' class='small' valign='top'>
548                          <img src='usagebar.php?usage=1' width='102' height='16' title='static dummy data' class='cpu_graph'><br>                          <div class='cpu_graph bar'></div>
549                          <img src='gfx/icon-cpu.png' style='vertical-align: middle;'>                          <img src='gfx/icon-cpu.png' style='vertical-align: middle;'>
550                          <span id='vps_cpu_usage_txt_UID'><?php echo $cpu_count; ?> VCPU</span>                          <span class='vps_cpu_usage_txt_UID'><?php echo $cpu_count; ?> VCPU</span>
551                  </td>                  </td>
552                  <td width='100' align='right' class='small'>                  <td width='100' align='right' class='small'>
553                          <img src='usagebar.php?usage=1' width='102' height='16' title='static dummy data' class='mem_graph'><br>                          <div class='mem_graph bar'></div>
554                          <img src='gfx/icon-memory.png' style='vertical-align: middle;'>                          <img src='gfx/icon-memory.png' style='vertical-align: middle;'>
555                          <span id='vps_memory_usage_txt_UID'><?php echo format_memory($memory); ?></span>                          <span class='vps_memory_usage_txt_UID'><?php echo format_memory($memory); ?></span>
556                  </td>                  </td>
557  <!--  <!--
558                  <td width='100' align='right' class='small'>                  <td width='100' align='right' class='small'>
# Line 313  foreach($vms_array as $vm) { Line 560  foreach($vms_array as $vm) {
560                          <span id='vps_net_usage_txt_UID'>na</span>                          <span id='vps_net_usage_txt_UID'>na</span>
561                  </td>                  </td>
562  -->  -->
563                  <td width='100' align='right' class='small' valign='top'>                  <td width='100' align='right' class='small' valign='bottom'>
564                          <img src='gfx/icon-disk.png' style='vertical-align: middle;'>                          <img src='gfx/icon-disk.png' style='vertical-align: middle;'>
565                          <span id='vps_disk_usage_txt_UID'><?php echo format_storage($harddrive_size); ?></span>                          <span id='vps_disk_usage_txt_UID'><?php echo format_storage($harddrive_size); ?></span>
566                  </td>                  </td>
# Line 325  foreach($vms_array as $vm) { Line 572  foreach($vms_array as $vm) {
572    
573  <?PHP } ?>  <?PHP } ?>
574  </td></tr></table>  </td></tr></table>
575    
576    <br>
577    
578    <div style="display: none;">
579    
580    <div id="dialog-login" title="Login">
581            <form id="loginform">
582            <table border="0">
583                    <tr>
584                            <td>Username: </td>
585                            <td><input type="text" id="username" name="username"></td>
586                    <tr>
587                    <tr>
588                            <td>Password: </td>
589                            <td><input type="password" id="password" name="password"></td>
590                    </tr>
591            </table>
592            </form>
593    </div>
594    
595    <div id="dialog-cd" title="Select CD">
596    
597            <table border=0>
598                    <tr>
599                            <td>Current: <span id="cdcurrent"></span></td>
600                    </tr>
601                    <tr>
602                            <td>
603                                    CD: <select id="cdselector"></select>
604                            </td>
605                    </tr>
606            </table>
607    </div>
608    
609    </div>
610    
611    <ul id="menu">
612            <li action="memory"><a href="#">Set Memory Size</a></li>
613            <li action="cpu"><a href="#">Set CPU Count</a></li>
614    
615    
616    <!--    <li><a href="#">Item 3</a>
617                    <ul>
618                            <li><a href="#">Item 3-1</a></li>
619                            <li><a href="#">Item 3-2</a></li>
620                            <li><a href="#">Item 3-3</a></li>
621                            <li><a href="#">Item 3-4</a></li>
622                            <li><a href="#">Item 3-5</a></li>
623                    </ul>
624            </li>
625            <li><a href="#">Item 4</a></li>
626            <li><a href="#">Item 5</a></li>-->
627    </ul>
628    
629  </body></html>  </body></html>
630    

Legend:
Removed from v.1895  
changed lines
  Added in v.2105

  ViewVC Help
Powered by ViewVC 1.1.20