webui: Show device hostname as IP if force_ip_to_sysname enabled and no resolved IP #5723 (#5822)

* webui: Show device hostname as IP if force_ip_to_sysname enabled and no resolved IP #5723

* more streamlined logic

* darn whitespace
This commit is contained in:
Neil Lathwood 2017-02-08 04:22:06 +00:00 committed by Tony Murray
parent 569d82b7bb
commit f8cb31547c

View File

@ -31,10 +31,9 @@ echo '<tr>
</tr>';
if (!empty($device['ip'])) {
echo '<tr>
<td>Resolved IP</td>
<td>'.$device['ip'].'</td>
</tr>';
echo "<tr><td>Resolved IP</td><td>{$device['ip']}</td></tr>";
} elseif ($config['force_ip_to_sysname'] === true) {
echo "<tr><td>IP Address</td><td>{$device['hostname']}</td></tr>";
}
if ($device['hardware']) {