mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 09:34:39 +00:00
AdSchellevis suggestions
This commit is contained in:
parent
82a4249c62
commit
d07446aa88
@ -75,6 +75,22 @@ class InterfaceController extends ApiControllerBase
|
||||
return $arptable;
|
||||
}
|
||||
|
||||
/**
|
||||
* retrieve system arp table contents
|
||||
* @return array
|
||||
*/
|
||||
public function flushArpAction()
|
||||
{
|
||||
if ($this->request->isPost()) {
|
||||
$backend = new Backend();
|
||||
$response = $backend->configdpRun("interface flush arp");
|
||||
return $response;
|
||||
}
|
||||
else {
|
||||
return array("message" => "error");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* retrieve system ndp table contents
|
||||
* @return array
|
||||
|
||||
@ -61,7 +61,17 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
function flushARP() {
|
||||
ajaxCall(url = "/api/diagnostics/interface/flushArp",
|
||||
sendData = {}, callback = function (data, status) {
|
||||
$("#refresh").click();
|
||||
});
|
||||
}
|
||||
|
||||
$("#flush").click(flushARP);
|
||||
|
||||
// initial fetch
|
||||
$("#refresh").click(updateARP);
|
||||
$("#refresh").click();
|
||||
@ -96,6 +106,10 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="pull-right">
|
||||
<button id="flush" type="button" class="btn btn-default">
|
||||
<span>{{ lang._('Flush') }}</span>
|
||||
<span class="fa fa-eraser"></span>
|
||||
</button>
|
||||
<button id="refresh" type="button" class="btn btn-default">
|
||||
<span>{{ lang._('Refresh') }}</span>
|
||||
<span class="fa fa-refresh"></span>
|
||||
|
||||
@ -54,6 +54,12 @@ parameters: %s
|
||||
type:script_output
|
||||
message:request arp table
|
||||
|
||||
[flush.arp]
|
||||
command:arp -da
|
||||
parameters:
|
||||
type:script_output
|
||||
message:flush arp table
|
||||
|
||||
[list.ndp]
|
||||
command:/usr/local/opnsense/scripts/interfaces/list_ndp.py
|
||||
parameters: %s
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user