diff --git a/dns/unbound-plus/Makefile b/dns/unbound-plus/Makefile
index 0e296dd61..b02461eb7 100644
--- a/dns/unbound-plus/Makefile
+++ b/dns/unbound-plus/Makefile
@@ -1,7 +1,7 @@
PLUGIN_NAME= unbound-plus
-PLUGIN_VERSION= 0.2
+PLUGIN_VERSION= 0.3
PLUGIN_COMMENT= Unbound additions
PLUGIN_MAINTAINER= m.muenz@gmail.com
-PLUGIN_DEVEL= yes
+PLUGIN_DEVEL= yes
.include "../../Mk/plugins.mk"
diff --git a/dns/unbound-plus/src/opnsense/mvc/app/controllers/OPNsense/Unboundplus/Api/MiscellaneousController.php b/dns/unbound-plus/src/opnsense/mvc/app/controllers/OPNsense/Unboundplus/Api/MiscellaneousController.php
new file mode 100644
index 000000000..5e9878820
--- /dev/null
+++ b/dns/unbound-plus/src/opnsense/mvc/app/controllers/OPNsense/Unboundplus/Api/MiscellaneousController.php
@@ -0,0 +1,37 @@
+
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+namespace OPNsense\Unboundplus\Api;
+
+use OPNsense\Base\ApiMutableModelControllerBase;
+
+class MiscellaneousController extends ApiMutableModelControllerBase
+{
+ protected static $internalModelClass = '\OPNsense\Unboundplus\Miscellaneous';
+ protected static $internalModelName = 'miscellaneous';
+}
diff --git a/dns/unbound-plus/src/opnsense/mvc/app/controllers/OPNsense/Unboundplus/Api/ServiceController.php b/dns/unbound-plus/src/opnsense/mvc/app/controllers/OPNsense/Unboundplus/Api/ServiceController.php
index 9983e2843..66fa74857 100644
--- a/dns/unbound-plus/src/opnsense/mvc/app/controllers/OPNsense/Unboundplus/Api/ServiceController.php
+++ b/dns/unbound-plus/src/opnsense/mvc/app/controllers/OPNsense/Unboundplus/Api/ServiceController.php
@@ -31,6 +31,7 @@ namespace OPNsense\Unboundplus\Api;
use OPNsense\Base\ApiMutableServiceControllerBase;
use OPNsense\Core\Backend;
use OPNsense\Unboundplus\Dnsbl;
+use OPNsense\Unboundplus\Miscellaneous;
class ServiceController extends ApiMutableServiceControllerBase
{
@@ -48,4 +49,14 @@ class ServiceController extends ApiMutableServiceControllerBase
$response = $backend->configdpRun('unboundplus dnsbl', array((string)$mdl->type));
return array("response" => $response);
}
+
+ public function reloadunboundAction()
+ {
+ $this->sessionClose();
+ $mdl = new Miscellaneous();
+ $backend = new Backend();
+ $backend->configdRun('template reload OPNsense/Unboundplus');
+ $response = $backend->configdpRun('unbound reload', array((string)$mdl->type));
+ return array("response" => $response);
+ }
}
diff --git a/dns/unbound-plus/src/opnsense/mvc/app/controllers/OPNsense/Unboundplus/MiscellaneousController.php b/dns/unbound-plus/src/opnsense/mvc/app/controllers/OPNsense/Unboundplus/MiscellaneousController.php
new file mode 100644
index 000000000..25bdb9e63
--- /dev/null
+++ b/dns/unbound-plus/src/opnsense/mvc/app/controllers/OPNsense/Unboundplus/MiscellaneousController.php
@@ -0,0 +1,38 @@
+
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+namespace OPNsense\Unboundplus;
+
+class MiscellaneousController extends \OPNsense\Base\IndexController
+{
+ public function indexAction()
+ {
+ $this->view->miscellaneousForm = $this->getForm('miscellaneous');
+ $this->view->pick('OPNsense/Unboundplus/miscellaneous');
+ }
+}
diff --git a/dns/unbound-plus/src/opnsense/mvc/app/controllers/OPNsense/Unboundplus/forms/miscellaneous.xml b/dns/unbound-plus/src/opnsense/mvc/app/controllers/OPNsense/Unboundplus/forms/miscellaneous.xml
new file mode 100644
index 000000000..3945c3405
--- /dev/null
+++ b/dns/unbound-plus/src/opnsense/mvc/app/controllers/OPNsense/Unboundplus/forms/miscellaneous.xml
@@ -0,0 +1,10 @@
+
diff --git a/dns/unbound-plus/src/opnsense/mvc/app/models/OPNsense/Unboundplus/Menu/Menu.xml b/dns/unbound-plus/src/opnsense/mvc/app/models/OPNsense/Unboundplus/Menu/Menu.xml
index 2522fb4a4..a63bd5e52 100644
--- a/dns/unbound-plus/src/opnsense/mvc/app/models/OPNsense/Unboundplus/Menu/Menu.xml
+++ b/dns/unbound-plus/src/opnsense/mvc/app/models/OPNsense/Unboundplus/Menu/Menu.xml
@@ -2,6 +2,7 @@
+
diff --git a/dns/unbound-plus/src/opnsense/mvc/app/models/OPNsense/Unboundplus/Miscellaneous.php b/dns/unbound-plus/src/opnsense/mvc/app/models/OPNsense/Unboundplus/Miscellaneous.php
new file mode 100644
index 000000000..9cc112378
--- /dev/null
+++ b/dns/unbound-plus/src/opnsense/mvc/app/models/OPNsense/Unboundplus/Miscellaneous.php
@@ -0,0 +1,35 @@
+
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+namespace OPNsense\Unboundplus;
+
+use OPNsense\Base\BaseModel;
+
+class Miscellaneous extends BaseModel
+{
+}
diff --git a/dns/unbound-plus/src/opnsense/mvc/app/models/OPNsense/Unboundplus/Miscellaneous.xml b/dns/unbound-plus/src/opnsense/mvc/app/models/OPNsense/Unboundplus/Miscellaneous.xml
new file mode 100644
index 000000000..5a3b3e858
--- /dev/null
+++ b/dns/unbound-plus/src/opnsense/mvc/app/models/OPNsense/Unboundplus/Miscellaneous.xml
@@ -0,0 +1,10 @@
+
+ //OPNsense/unboundplus/miscellaneous
+ Unbound Miscellaneous configuration
+ 0.0.1
+
+
+ N
+
+
+
diff --git a/dns/unbound-plus/src/opnsense/mvc/app/views/OPNsense/Unboundplus/dnsbl.volt b/dns/unbound-plus/src/opnsense/mvc/app/views/OPNsense/Unboundplus/dnsbl.volt
index 29f6853a0..eb53cf0e6 100644
--- a/dns/unbound-plus/src/opnsense/mvc/app/views/OPNsense/Unboundplus/dnsbl.volt
+++ b/dns/unbound-plus/src/opnsense/mvc/app/views/OPNsense/Unboundplus/dnsbl.volt
@@ -44,10 +44,10 @@
// link save button to API set action
$("#saveAct").click(function(){
saveFormToEndpoint(url="/api/unboundplus/dnsbl/set", formid='frm_dnsbl_settings',callback_ok=function(){
- $("#saveAct_progress").addClass("fa fa-spinner fa-pulse");
- ajaxCall(url="/api/unboundplus/service/dnsbl", sendData={}, callback=function(data,status) {
- $("#saveAct_progress").removeClass("fa fa-spinner fa-pulse");
- });
+ $("#saveAct_progress").addClass("fa fa-spinner fa-pulse");
+ ajaxCall(url="/api/unboundplus/service/dnsbl", sendData={}, callback=function(data,status) {
+ $("#saveAct_progress").removeClass("fa fa-spinner fa-pulse");
+ });
});
});
});
diff --git a/dns/unbound-plus/src/opnsense/mvc/app/views/OPNsense/Unboundplus/miscellaneous.volt b/dns/unbound-plus/src/opnsense/mvc/app/views/OPNsense/Unboundplus/miscellaneous.volt
new file mode 100644
index 000000000..dda6369f2
--- /dev/null
+++ b/dns/unbound-plus/src/opnsense/mvc/app/views/OPNsense/Unboundplus/miscellaneous.volt
@@ -0,0 +1,54 @@
+{#
+ # Copyright (c) 2019 Deciso B.V.
+ # Copyright (c) 2019 Michael Muenz
+ # All rights reserved.
+ #
+ # Redistribution and use in source and binary forms, with or without modification,
+ # are permitted provided that the following conditions are met:
+ #
+ # 1. Redistributions of source code must retain the above copyright notice,
+ # this list of conditions and the following disclaimer.
+ #
+ # 2. Redistributions in binary form must reproduce the above copyright notice,
+ # this list of conditions and the following disclaimer in the documentation
+ # and/or other materials provided with the distribution.
+ #
+ # THIS SOFTWARE IS PROVIDED “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ # AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ # AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ # OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ # POSSIBILITY OF SUCH DAMAGE.
+ #}
+
+