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>'; </tr>';
if (!empty($device['ip'])) { if (!empty($device['ip'])) {
echo '<tr> echo "<tr><td>Resolved IP</td><td>{$device['ip']}</td></tr>";
<td>Resolved IP</td> } elseif ($config['force_ip_to_sysname'] === true) {
<td>'.$device['ip'].'</td> echo "<tr><td>IP Address</td><td>{$device['hostname']}</td></tr>";
</tr>';
} }
if ($device['hardware']) { if ($device['hardware']) {