Skip to content

Commit f5ee258

Browse files
authored
Improvements to VMInfo table display (librenms#18411)
* Update getHostname to use displayName method * Add VM Name column to device table * Change column header from 'Device' to 'VM Name'
1 parent e70c601 commit f5ee258

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

app/Http/Controllers/Table/VminfoController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,6 @@ public function formatItem($vm)
7979

8080
private static function getHostname(Device $device): string
8181
{
82-
return '<a class="list-device" href="' . Url::deviceUrl($device) . '">' . $device->hostname . '</a><br>' . $device->sysName;
82+
return '<a class="list-device" href="' . Url::deviceUrl($device) . '">' . $device->displayName() . '</a>';
8383
}
8484
}

resources/views/device/tabs/vm.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<table class="table table-hover table-condensed table-striped">
1010
<thead>
1111
<tr>
12-
<th>{{ __('Server Name') }}</th>
12+
<th>{{ __('VM Name') }}</th>
1313
<th>{{ __('Power Status') }}</th>
1414
<th>{{ __('Operating System') }}</th>
1515
<th>{{ __('Memory') }}</th>

resources/views/vminfo.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<tr>
1010
<th data-column-id="deviceid" data-visible="false" data-css-class="deviceid">No</th>
1111
<th data-column-id="sysname" data-visible="false">Sysname</th>
12-
<th data-column-id="vmwVmDisplayName">{{ __('Device') }}</th>
12+
<th data-column-id="vmwVmDisplayName">{{ __('VM Name') }}</th>
1313
<th data-column-id="vmwVmState">{{ __('Power Status') }}</th>
1414
<th data-column-id="hostname">{{ __('Host') }}</th>
1515
<th data-column-id="vmwVmGuestOS" data-searchable="false">{{ __('Operating System') }}</th>

0 commit comments

Comments
 (0)