show never polled information (#15341)

This commit is contained in:
SourceDoctor
2023-09-24 18:10:11 +02:00
committed by GitHub
parent 88eee297c4
commit c0a233700c
2 changed files with 14 additions and 3 deletions
@@ -221,7 +221,12 @@ class AvailabilityMapController extends WidgetController
private function getDeviceTooltip(Device $device, string $state_name): string
{
$tooltip = $device->displayName();
$time = $device->formatDownUptime(true);
if (! $device->status && ! $device->last_polled) {
$time = __('Never polled');
} else {
$time = $device->formatDownUptime(true);
}
if ($time) {
$tooltip .= ' - ' . ($state_name == 'down' ? 'downtime ' : '') . $time;