Commit d7a42b2c authored by Frank Wall's avatar Frank Wall

fixes #376: add description for static DHCP leases

parent 63d31921
......@@ -283,6 +283,7 @@ foreach($config['interfaces'] as $ifname => $ifarr) {
$slease['start'] = "";
$slease['end'] = "";
$slease['hostname'] = htmlentities($static['hostname']);
$slease['descr'] = htmlentities($static['descr']);
$slease['act'] = "static";
$slease['online'] = in_array(strtolower($slease['mac']), $arpdata_mac) ? 'online' : 'offline';
$leases[] = $slease;
......@@ -339,6 +340,7 @@ if(count($pools) > 0) {
<td class="listhdrr"><?=gettext("IP address"); ?></td>
<td class="listhdrr"><?=gettext("MAC address"); ?></td>
<td class="listhdrr"><?=gettext("Hostname"); ?></td>
<td class="listhdrr"><?=gettext("Description"); ?></td>
<td class="listhdrr"><?=gettext("Start"); ?></td>
<td class="listhdrr"><?=gettext("End"); ?></td>
<td class="listhdrr"><?=gettext("Online"); ?></td>
......@@ -405,6 +407,11 @@ if(count($pools) > 0) {
}
}
echo "<td class=\"listr\">{$fspans}" . htmlentities($data['hostname']) . "{$fspane}</td>\n";
if (isset($data['descr'])) {
echo "<td class=\"listr\">{$fspans}" . htmlentities($data['descr']) . "{$fspane}</td>\n";
} else {
echo "<td class=\"listr\">{$fspans} n/a {$fspane}</td>\n";
}
if ($data['type'] != "static") {
echo "<td class=\"listr\">{$fspans}" . adjust_gmt($data['start']) . "{$fspane}</td>\n";
echo "<td class=\"listr\">{$fspans}" . adjust_gmt($data['end']) . "{$fspane}</td>\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment