Files
librenms-librenms/html/includes/print-vm.inc.php
T

44 lines
1018 B
PHP
Raw Normal View History

2011-03-26 17:16:09 +00:00
<?php
echo('<tr class="list">');
2011-03-26 17:16:09 +00:00
echo('<td class="list">');
if (getidbyname($vm['vmwVmDisplayName']))
{
echo(generate_device_link(device_by_name($vm['vmwVmDisplayName'])));
} else {
echo $vm['vmwVmDisplayName'];
}
echo("</td>");
echo('<td class="list">' . $vm['vmwVmState'] . "</td>");
2011-03-26 17:16:09 +00:00
if ($vm['vmwVmGuestOS'] == "E: tools not installed")
{
echo('<td class="box-desc">Unknown (VMware Tools not installed)</td>');
}
else if ($vm['vmwVmGuestOS'] == "")
{
echo('<td class="box-desc"><i>(Unknown)</i></td>');
}
elseif (isset($config['vmware_guestid'][$vm['vmwVmGuestOS']]))
{
echo('<td class="list">' . $config['vmware_guestid'][$vm['vmwVmGuestOS']] . "</td>");
2011-03-26 17:16:09 +00:00
}
else
{
echo('<td class="list">' . $vm['vmwVmGuestOS'] . "</td>");
}
2011-03-26 17:16:09 +00:00
if ($vm['vmwVmMemSize'] >= 1024)
{
2011-04-20 16:48:33 +00:00
echo("<td class=list>" . sprintf("%.2f",$vm['vmwVmMemSize']/1024) . " GB</td>");
2011-03-26 17:16:09 +00:00
} else {
2011-04-20 16:48:33 +00:00
echo("<td class=list>" . sprintf("%.2f",$vm['vmwVmMemSize']) . " MB</td>");
2011-03-26 17:16:09 +00:00
}
echo('<td class="list">' . $vm['vmwVmCpus'] . " CPU</td>");
2011-03-26 17:16:09 +00:00
?>