mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Show Location on Poller Log (#11945)
* Show Location on Poller Log * . * .
This commit is contained in:
@@ -9,6 +9,7 @@ if (!Auth::user()->hasGlobalAdmin()) {
|
||||
$sql .= ", devices_perms AS P ";
|
||||
}
|
||||
|
||||
$sql .= " LEFT JOIN `locations` as L ON `D`.`location_id`=`L`.`id`";
|
||||
$sql .= " LEFT JOIN `poller_groups` ON `D`.`poller_group`=`poller_groups`.`id`";
|
||||
|
||||
if (!Auth::user()->hasGlobalAdmin()) {
|
||||
@@ -54,7 +55,7 @@ if ($rowCount != -1) {
|
||||
$sql .= " LIMIT $limit_low,$limit_high";
|
||||
}
|
||||
|
||||
$sql = "SELECT D.device_id, D.hostname AS `hostname`, D.sysName, D.last_polled AS `last_polled`, `group_name`, D.last_polled_timetaken AS `last_polled_timetaken` $sql";
|
||||
$sql = "SELECT D.device_id, L.location as `location`, D.hostname AS `hostname`, D.sysName, D.last_polled AS `last_polled`, `group_name`, D.last_polled_timetaken AS `last_polled_timetaken` $sql";
|
||||
|
||||
foreach (dbFetchRows($sql, $param) as $device) {
|
||||
if (empty($device['group_name'])) {
|
||||
@@ -64,6 +65,7 @@ foreach (dbFetchRows($sql, $param) as $device) {
|
||||
'hostname' => generate_device_link($device, format_hostname($device), array('tab' => 'graphs', 'group' => 'poller')),
|
||||
'last_polled' => $device['last_polled'],
|
||||
'poller_group' => $device['group_name'],
|
||||
'location' => $device['location'],
|
||||
'last_polled_timetaken' => round($device['last_polled_timetaken'], 2),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<th data-column-id="hostname">@lang('Hostname')</th>
|
||||
<th data-column-id="last_polled">@lang('Last Polled')</th>
|
||||
<th data-column-id="poller_group">@lang('Poller Group')</th>
|
||||
<th data-column-id="location">@lang('Location')</th>
|
||||
<th data-column-id="last_polled_timetaken" data-order="desc">@lang('Polling Duration') (@lang('Seconds'))</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
Reference in New Issue
Block a user