dhcp: kill lease actions if interface is not there

This commit is contained in:
Franco Fichtner 2018-09-14 08:18:59 +02:00
parent fdf27ddd30
commit d54f50a6f4
2 changed files with 12 additions and 17 deletions

View File

@ -425,22 +425,19 @@ include("head.inc");?>
<td><?=$data['online'];?></td>
<td><?=$data['act'];?></td>
<td class="text-nowrap">
<?php
if ($data['type'] == "dynamic"):?>
<?php if (!empty($data['if'])): ?>
<?php if ($data['type'] == 'dynamic'): ?>
<a class="btn btn-default btn-xs" href="services_dhcp_edit.php?if=<?=$data['if'];?>&amp;mac=<?=$data['mac'];?>&amp;hostname=<?=$data['hostname'];?>">
<i class="fa fa-plus fa-fw" data-toggle="tooltip" title="<?=gettext("add a static mapping for this MAC address");?>"></i>
</a>
<?php
endif;?>
<?php
if (($data['type'] == "dynamic") && ($data['online'] != "online")):?>
<?php if ($data['online'] != 'online'):?>
<a class="act_delete btn btn-default btn-xs" href="#" data-deleteip="<?=$data['ip'];?>">
<i class="fa fa-trash fa-fw" title="<?= html_safe(gettext('Delete')) ?>" data-toggle="tooltip"></i>
</a>
<?php
endif;?>
<?php endif ?>
<?php endif ?>
<?php endif ?>
</td>
</tr>
<?php

View File

@ -480,20 +480,18 @@ endif;?>
<td><?=$data['online'];?></td>
<td><?=$data['act'];?></td>
<td class="text-nowrap">
<?php
if ($data['type'] == "dynamic"):?>
<?php if (!empty($data['if'])): ?>
<?php if ($data['type'] == 'dynamic'): ?>
<a class="btn btn-default btn-xs" href="services_dhcpv6_edit.php?if=<?=$data['if'];?>&amp;duid=<?=$data['duid'];?>&amp;hostname=<?=$data['hostname'];?>">
<i class="fa fa-plus fa-fw" alt="add"></i>
</a>
<?php
endif;?>
<?php
if (($data['type'] == "dynamic") && ($data['online'] != "online")):?>
<?php if ($data['online'] != 'online'): ?>
<a class="act_delete btn btn-default btn-xs" href="#" data-deleteip="<?=$data['ip'];?>" title="<?= html_safe(gettext('Delete')) ?>" data-toggle="tooltip">
<i class="fa fa-trash fa-fw"></i>
</a>
<?php
endif;?>
<?php endif ?>
<?php endif ?>
<?php endif ?>
</td>
</tr>
<?php