mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Merge pull request #2684 from Rosiak/vmware-vm-changes
VMware VM display changes
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 style="min-width:40px; display:inline-block;" class="label label-default">OFF</span></td>';
|
||||
}
|
||||
else {
|
||||
echo '<td class="list"><span style="min-width:40px; display:inline-block;" 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>';
|
||||
|
@@ -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';
|
||||
|
Reference in New Issue
Block a user