mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
Small changes to Virtual Machines page
This commit is contained in:
@@ -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>';
|
||||
@@ -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';
|
||||
Reference in New Issue
Block a user