mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 00:54:41 +00:00
Services: Kea DHCP: Kea DHCPv4 - add export as csv on reservations using a8d1a84fba
This commit is contained in:
parent
a8d1a84fba
commit
31bf0b0e6d
@ -105,6 +105,14 @@ class Dhcpv4Controller extends ApiMutableModelControllerBase
|
||||
return $this->delBase("reservations.reservation", $uuid);
|
||||
}
|
||||
|
||||
public function downloadReservationsAction()
|
||||
{
|
||||
if ($this->request->isGet()) {
|
||||
$this->sessionClose();
|
||||
$this->exportCsv($this->getModel()->reservations->reservation->asRecordSet(false, ['subnet']));
|
||||
}
|
||||
}
|
||||
|
||||
public function searchPeerAction()
|
||||
{
|
||||
return $this->searchBase("ha_peers.peer", ['name', 'role'], "name");
|
||||
|
||||
@ -80,6 +80,11 @@
|
||||
}
|
||||
});
|
||||
|
||||
$("#download_reservations").click(function(e){
|
||||
e.preventDefault();
|
||||
window.open("/api/kea/dhcpv4/download_reservations");
|
||||
});
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ -121,7 +126,7 @@
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<button data-action="add" type="button" class="btn btn-xs btn-primary pull-right"><span class="fa fa-fw fa-plus"></span></button>
|
||||
<button data-action="add" type="button" class="btn btn-xs btn-primary"><span class="fa fa-fw fa-plus"></span></button>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
@ -147,7 +152,8 @@
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<button data-action="add" type="button" class="btn btn-xs btn-primary pull-right"><span class="fa fa-fw fa-plus"></span></button>
|
||||
<button data-action="add" type="button" class="btn btn-xs btn-primary"><span class="fa fa-fw fa-plus"></span></button>
|
||||
<button id="download_reservations" type="button" title="{{ lang._('Export as csv') }}" data-toggle="tooltip" class="btn btn-xs"><span class="fa fa-fw fa-table"></span></button>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
@ -170,7 +176,7 @@
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<button data-action="add" type="button" class="btn btn-xs btn-primary pull-right"><span class="fa fa-fw fa-plus"></span></button>
|
||||
<button data-action="add" type="button" class="btn btn-xs btn-primary"><span class="fa fa-fw fa-plus"></span></button>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user