diff --git a/net/wol/Makefile b/net/wol/Makefile index d532d8ce5..a6272d200 100644 --- a/net/wol/Makefile +++ b/net/wol/Makefile @@ -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 diff --git a/net/wol/src/opnsense/mvc/app/models/OPNsense/Wol/Wol.xml b/net/wol/src/opnsense/mvc/app/models/OPNsense/Wol/Wol.xml index 544b6c147..64aebce1f 100644 --- a/net/wol/src/opnsense/mvc/app/models/OPNsense/Wol/Wol.xml +++ b/net/wol/src/opnsense/mvc/app/models/OPNsense/Wol/Wol.xml @@ -10,6 +10,7 @@ /^(?!0).*$/ + /^(?!openvpn|ipsec|enc).*$/i diff --git a/net/wol/src/opnsense/mvc/app/views/OPNsense/Wol/index.volt b/net/wol/src/opnsense/mvc/app/views/OPNsense/Wol/index.volt index 902e7b76b..91d1d7395 100644 --- a/net/wol/src/opnsense/mvc/app/views/OPNsense/Wol/index.volt +++ b/net/wol/src/opnsense/mvc/app/views/OPNsense/Wol/index.volt @@ -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.') }}
' + + $('
').text(data.error_msg).html()
+                     )
+          });
+        
+        }, true);
     });
 });