mirror of
https://github.com/opnsense/plugins.git
synced 2026-06-04 22:33:07 -04:00
commit
4dc09cda49
3 changed files with 14 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
|||
PLUGIN_NAME= wol
|
||||
PLUGIN_VERSION= 2.0.d
|
||||
PLUGIN_REVISION= 1
|
||||
PLUGIN_DEPENDS= wol
|
||||
PLUGIN_COMMENT= Wake on LAN Service
|
||||
PLUGIN_MAINTAINER= franco@opnsense.org
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
<default></default>
|
||||
<filters>
|
||||
<enable>/^(?!0).*$/</enable>
|
||||
<if>/^(?!openvpn|ipsec|enc).*$/i</if>
|
||||
</filters>
|
||||
</interface>
|
||||
<mac type="TextField">
|
||||
|
|
|
|||
|
|
@ -62,7 +62,18 @@ $( document ).ready(function() {
|
|||
|
||||
// link save button to API set action
|
||||
$("#wakeAct").click(function(){
|
||||
saveFormToEndpoint(url="/api/wol/wol/set", formid='frm_wol_wake',callback_ok=function(data){}, true);
|
||||
ajaxCall(url="/api/wol/wol/set", data=getFormData('frm_wol_wake'),callback=function(data, status){
|
||||
BootstrapDialog.show({
|
||||
type: data.status == 'OK' ? BootstrapDialog.TYPE_SUCCESS : BootstrapDialog.TYPE_DANGER,
|
||||
title: "{{ lang._("Result") }}",
|
||||
message: (data.status == 'OK' ?
|
||||
'{{ lang._('Magic packet was sent successfully.') }}' :
|
||||
'{{ lang._('The packet was not sent due to an error. Please consult the logs.') }}<br />' +
|
||||
$('<pre>').text(data.error_msg).html()
|
||||
)
|
||||
});
|
||||
|
||||
}, true);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue