1 |
<?php |
<?php |
2 |
include("config.php"); |
include("../config.php"); |
3 |
|
|
4 |
// http://docs.vmd.citrix.com/XenServer/5.5.0/1.0/en_gb/api/docs/html/browser.html |
// http://docs.vmd.citrix.com/XenServer/5.5.0/1.0/en_gb/api/docs/html/browser.html |
5 |
|
|
7 |
return round( $val / (1024*1024) ); |
return round( $val / (1024*1024) ); |
8 |
} |
} |
9 |
|
|
10 |
include('xenapi.php'); |
include('../xenapi.php'); |
11 |
|
|
12 |
/* Establish session with Xenserver */ |
/* Establish session with Xenserver */ |
13 |
$xenserver = new XenApi($url, $login, $password); |
$xenserver = new XenApi($url, $login, $password); |
17 |
<body style="font-family: monospace"> |
<body style="font-family: monospace"> |
18 |
|
|
19 |
|
|
20 |
<script type='text/javascript' src="jquery-1.8.2.min.js"></script> |
<script type='text/javascript' src="../jquery/jquery-1.9.1.min.js"></script> |
21 |
|
|
22 |
<script type='text/javascript'> |
<script type='text/javascript'> |
23 |
$(document).ready( function() { |
$(document).ready( function() { |
70 |
echo "<a href='#' onclick='loadServer()'>XenServer</a><br><br>"; |
echo "<a href='#' onclick='loadServer()'>XenServer</a><br><br>"; |
71 |
$vms_array = $xenserver->VM__get_all_records(); |
$vms_array = $xenserver->VM__get_all_records(); |
72 |
foreach($vms_array as $vm) { |
foreach($vms_array as $vm) { |
73 |
if ($vm["is_a_template"] != 0 || $vm["is_control_domain"] != 0) { |
if ($vm["is_a_template"] != 0) { |
74 |
continue; |
continue; |
75 |
} |
} |
76 |
|
|