Few Fixes After infrastructure migration

This commit is contained in:
2020-09-14 15:15:47 +02:00
parent 32521d0ed3
commit 30da6e162b
5 changed files with 23 additions and 13 deletions

View File

@@ -30,6 +30,12 @@ class Device extends Template
} else {
$devices[$key]['firmware_hash'] = "false";
}
$wifi = SubDeviceManager::getSubDeviceByMaster($device['device_id'], 'wifi');
if ($wifi) {
$signalStrenght = RecordManager::getLastRecordNotNull($wifi['subdevice_id']);
$devices[$key]['signal'] = (!$signalStrenght ? 0 : $signalStrenght['value']);
}
}
$rooms = $roomManager->getAllRooms();

View File

@@ -26,6 +26,7 @@
<tr>
<th>#</th>
<th>Name</th>
<th>Signal</th>
<th>Room</th>
<th>Firmware</th>
<th>IP Address<br>(Mac)<br>Token</th>
@@ -43,6 +44,7 @@
<tr>
<td><i class="fa">&#x<?php echo (!empty($device['icon']) ? $device['icon'] : ""); ?></i></td>
<td><?php echo (!empty($device['name']) ? $device['name'] : ""); ?></td>
<td><?php echo (!empty($device['signal']) ? $device['signal'] : ""); ?></td>
<td>
<select class="input" id="device-<?php echo $device['device_id']?>-roomId">
<?php