40 |
|
|
41 |
$vms_array = $xenserver->VM__get_all_records(); |
$vms_array = $xenserver->VM__get_all_records(); |
42 |
|
|
43 |
|
$namelabel = $host["name_label"]; |
44 |
|
|
45 |
?> |
?> |
46 |
<html> |
<html> |
47 |
<head> |
<head> |
48 |
<title>XenServer::SERVER</title> |
<title>XenServer::<?php echo $namelabel;?></title> |
49 |
<script type='text/javascript' src="jquery-1.8.2.min.js"></script> |
<script type='text/javascript' src="jquery-1.8.2.min.js"></script> |
50 |
|
|
51 |
<script type='text/javascript'> |
<script type='text/javascript'> |
98 |
var session = $(this).find('session').text(); |
var session = $(this).find('session').text(); |
99 |
var os = $(this).find('os').text(); |
var os = $(this).find('os').text(); |
100 |
var cpuavg = $(this).find('cpuavg').text(); |
var cpuavg = $(this).find('cpuavg').text(); |
101 |
|
var curmem = $(this).find('curmem').text(); |
102 |
|
var maxmem = $(this).find('maxmem').text(); |
103 |
|
|
104 |
|
var mempercent = Math.round( (curmem*100) / maxmem ); |
105 |
|
|
106 |
name = name.replace(" ", "_"); |
name = name.replace(" ", "_"); |
107 |
name = name.replace(".", "_"); |
name = name.replace(".", "_"); |
125 |
vm.find('.cpu_graph').show(); |
vm.find('.cpu_graph').show(); |
126 |
vm.find('.cpu_graph').attr('src', 'usagebar.php?usage=' + cpuavg); |
vm.find('.cpu_graph').attr('src', 'usagebar.php?usage=' + cpuavg); |
127 |
vm.find('.cpu_graph').attr('title', cpuavg + '%'); |
vm.find('.cpu_graph').attr('title', cpuavg + '%'); |
128 |
|
|
129 |
vm.find('.mem_graph').show(); |
vm.find('.mem_graph').show(); |
130 |
|
vm.find('.mem_graph').attr('src', 'usagebar.php?usage=' + mempercent); |
131 |
|
vm.find('.mem_graph').attr('title', curmem + ' / ' + maxmem + ' MB' ); |
132 |
} else { |
} else { |
133 |
if (state == "Halted") { |
if (state == "Halted") { |
134 |
vm.find('.state').css("background-image", "url('gfx/vps_topred.png')"); |
vm.find('.state').css("background-image", "url('gfx/vps_topred.png')"); |
225 |
<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'> |
226 |
<tr> |
<tr> |
227 |
<td rowspan='2' width='160'><img src='gfx/citrix-logo.png' id='logo'></td> |
<td rowspan='2' width='160'><img src='gfx/citrix-logo.png' id='logo'></td> |
228 |
<td colspan='4' class='small' align='right'><?php echo $xenversion;?><br><?php echo $license;?></td> |
<td colspan='4' class='small' align='right'><?php echo $namelabel . " / " . $xenversion;?><br><?php echo $license;?></td> |
229 |
</tr> |
</tr> |
230 |
<tr> |
<tr> |
231 |
<td width='150' align='right' class='small'><img src='gfx/icon-cpu.png'> |
<td width='150' align='right' class='small'><img src='gfx/icon-cpu.png'> |