Updated poll_device and os module to prettify output (#4740)

* Updated poll_device and os module to prettify output

* Move line return
This commit is contained in:
Neil Lathwood
2016-10-14 02:41:53 +01:00
committed by Tony Murray
parent eab4ae5ab5
commit 009281773f
2 changed files with 9 additions and 4 deletions

View File

@@ -159,7 +159,9 @@ function poll_device($device, $options)
unset($array);
$device_start = microtime(true);
// Start counting device poll time
echo $device['hostname'].' '.$device['device_id'].' '.$device['os'].' ';
echo 'Hostname: ' . $device['hostname'] . PHP_EOL;
echo 'Device ID: ' . $device['device_id'] . PHP_EOL;
echo 'OS: ' . $device['os'];
$ip = dnslookup($device);
if (!empty($ip) && $ip != inet6_ntop($device['ip'])) {
@@ -173,7 +175,7 @@ function poll_device($device, $options)
echo ' ('.$device['os_group'].')';
}
echo "\n";
echo PHP_EOL.PHP_EOL;
unset($poll_update);
unset($poll_update_query);

View File

@@ -35,4 +35,7 @@ if ($icon && $icon != $device['icon']) {
log_event('Icon -> '.$icon, $device, 'system');
}
echo "\nHardware: ".$hardware.' Version: '.$version.' Features: '.$features.' Serial: '.$serial."\n";
echo 'Hardware: ' . $hardware . PHP_EOL;
echo 'Version: ' . $version . PHP_EOL;
echo 'Features: ' . $features . PHP_EOL;
echo 'Serial: ' . $serial . PHP_EOL;