Small changes to Virtual Machines page

This commit is contained in:
Rosiak
2016-01-02 01:32:43 +01:00
parent 8aecf71910
commit b7ac4932a4
2 changed files with 11 additions and 11 deletions
+8 -4
View File
@@ -1,7 +1,5 @@
<?php
echo '<tr class="list">';
echo '<td class="list">';
if (getidbyname($vm['vmwVmDisplayName'])) {
@@ -12,7 +10,13 @@ else {
}
echo '</td>';
echo '<td class="list">'.$vm['vmwVmState'].'</td>';
if ($vm['vmwVmState'] == 'powered off') {
echo '<td class="list"><span class="label label-default">OFF</span></td>';
}
else {
echo '<td class="list"><span class="label label-success">ON</span></td>';
}
if ($vm['vmwVmGuestOS'] == 'E: tools not installed') {
echo '<td class="box-desc">Unknown (VMware Tools not installed)</td>';
@@ -34,4 +38,4 @@ else {
echo '<td class=list>'.sprintf('%.2f', $vm['vmwVmMemSize']).' MB</td>';
}
echo '<td class="list">'.$vm['vmwVmCpus'].' CPU</td>';
echo '<td class="list">'.$vm['vmwVmCpus'].' CPU</td>';
+3 -7
View File
@@ -1,15 +1,11 @@
<?php
echo '<table border="0" cellspacing="0" cellpadding="5" width="100%" class="sortable"><tr class="tablehead"><th>Server Name</th><th>Power Status</th><th>Operating System</th><th>Memory</th><th>CPU</th></tr>';
echo '<table border="0" cellspacing="0" cellpadding="5" width="100%" class="table table-condensed"><tr class="tablehead"><th>Server Name</th><th>Power Status</th><th>Operating System</th><th>Memory</th><th>CPU</th></tr>';
$i = '1';
foreach (dbFetchRows('SELECT * FROM vminfo WHERE device_id = ? ORDER BY vmwVmDisplayName', array($device['device_id'])) as $vm) {
foreach (dbFetchRows('SELECT `vmwVmDisplayName`,`vmwVmState`,`vmwVmGuestOS`,`vmwVmMemSize`,`vmwVmCpus` FROM `vminfo` WHERE `device_id` = ? ORDER BY `vmwVmDisplayName', array($device['device_id'])) as $vm) {
include 'includes/print-vm.inc.php';
$i++;
}
echo '</table>';
$pagetitle[] = 'Virtual Machines';
$pagetitle[] = 'Virtual Machines';