plugins: switch to 20.7 development

This commit is contained in:
Franco Fichtner
2020-07-28 10:50:57 +02:00
parent 23dcff078a
commit 03764dfc74
60 changed files with 2 additions and 4835 deletions
+1 -2
View File
@@ -18,10 +18,9 @@ Copyright (c) 2010 Jim Pingle <jimp@pfsense.org>
Copyright (c) 2015 Jos Schellevis
Copyright (c) 2018 João Vilaça <machadovilaca@gmail.com>
Copyright (c) 2019 Juergen Kellerer
Copyright (c) 2003-2006 Manuel Kasper <mk@neon1.net>
Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>
Copyright (c) 2020 Martin Wasley
Copyright (c) 2017-2020 Michael Muenz <m.muenz@gmail.com>
Copyright (c) 2020 Petr Kejval <petr.kejval6@gmail.com>
Copyright (c) 2004-2012 Scott Ullrich <sullrich@gmail.com>
Copyright (c) 2010-2012 Seth Mos <seth.mos@dds.nl>
Copyright (c) 2008 Shrew Soft Inc. <mgrooms@shrew.net>
+1 -1
View File
@@ -58,7 +58,7 @@ _PLUGIN_PYTHON!=${PYTHONLINK} -V
PLUGIN_PYTHON?= ${_PLUGIN_PYTHON:[2]:S/./ /g:[1..2]:tW:S/ //}
.endif
PLUGIN_ABI?= 20.1
PLUGIN_ABI?= 20.7
PLUGIN_PHP?= 72
PLUGIN_PYTHON?= 37
-4
View File
@@ -38,7 +38,6 @@ dns/bind -- BIND domain name service
dns/dnscrypt-proxy -- Flexible DNS proxy supporting DNSCrypt and DoH
dns/dyndns -- Dynamic DNS Support
dns/rfc2136 -- RFC-2136 Support
dns/unbound-plus -- Unbound additions
mail/postfix -- SMTP mail relay
mail/rspamd -- Protect your network from spam
misc/theme-cicada -- The cicada theme - dark grey
@@ -62,11 +61,8 @@ net/ftp-proxy -- Control ftp-proxy processes
net/google-cloud-sdk -- Google Cloud SDK
net/haproxy -- Reliable, high performance TCP/HTTP load balancer
net/igmp-proxy -- IGMP-Proxy Service
net/l2tp -- End of life, no replacement
net/mdns-repeater -- Proxy multicast DNS between networks
net/ntopng -- Traffic Analysis and Flow Collection
net/pppoe -- End of life, no replacement
net/pptp -- End of life, no replacement
net/relayd -- Relayd Load Balancer
net/shadowsocks -- Secure socks5 proxy
net/siproxd -- Siproxd is a proxy daemon for the SIP protocol
-7
View File
@@ -1,7 +0,0 @@
PLUGIN_NAME= unbound-plus
PLUGIN_VERSION= 1.1
PLUGIN_REVISION= 1
PLUGIN_COMMENT= Unbound additions
PLUGIN_MAINTAINER= m.muenz@gmail.com
.include "../../Mk/plugins.mk"
-16
View File
@@ -1,16 +0,0 @@
Unbound-Plus is a collecion of additional features to Unbound,
including DNSBL and DNS-over-TLS support.
WWW: https://github.com/opnsense/plugins/
Plugin Changelog
----------------
1.1
* Add DNS over TLS (DoT) support
1.0
* Add DNSBL feature
* Allow to set private domains
@@ -1,37 +0,0 @@
<?php
/*
* Copyright (C) 2019 Michael Muenz <m.muenz@gmail.com>
* 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 DnsblController extends ApiMutableModelControllerBase
{
protected static $internalModelClass = '\OPNsense\Unboundplus\Dnsbl';
protected static $internalModelName = 'dnsbl';
}
@@ -1,37 +0,0 @@
<?php
/*
* Copyright (C) 2019 Michael Muenz <m.muenz@gmail.com>
* 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';
}
@@ -1,62 +0,0 @@
<?php
/*
* Copyright (C) 2019 Michael Muenz <m.muenz@gmail.com>
* 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\ApiMutableServiceControllerBase;
use OPNsense\Core\Backend;
use OPNsense\Unboundplus\Dnsbl;
use OPNsense\Unboundplus\Miscellaneous;
class ServiceController extends ApiMutableServiceControllerBase
{
protected static $internalServiceClass = '\OPNsense\Unboundplus\Dnsbl';
protected static $internalServiceTemplate = 'OPNsense/Unboundplus';
protected static $internalServiceEnabled = 'enabled';
protected static $internalServiceName = 'unboundplus';
public function dnsblAction()
{
$this->sessionClose();
$mdl = new Dnsbl();
$backend = new Backend();
$backend->configdRun('template reload OPNsense/Unboundplus');
$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);
}
}
@@ -1,38 +0,0 @@
<?php
/*
* Copyright (C) 2019 Michael Muenz <m.muenz@gmail.com>
* 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 DnsblController extends \OPNsense\Base\IndexController
{
public function indexAction()
{
$this->view->dnsblForm = $this->getForm('dnsbl');
$this->view->pick('OPNsense/Unboundplus/dnsbl');
}
}
@@ -1,38 +0,0 @@
<?php
/*
* Copyright (C) 2019 Michael Muenz <m.muenz@gmail.com>
* 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');
}
}
@@ -1,30 +0,0 @@
<form>
<field>
<id>dnsbl.enabled</id>
<label>Enable</label>
<type>checkbox</type>
<help>Enable the usage of DNS blocklists.</help>
</field>
<field>
<id>dnsbl.type</id>
<label>Type of DNSBL</label>
<type>select_multiple</type>
<help>Select which kind of DNSBL you want to use.</help>
</field>
<field>
<id>dnsbl.lists</id>
<label>URLs of Blacklists</label>
<type>select_multiple</type>
<style>tokenize</style>
<allownew>true</allownew>
<help>List of domains from where blacklist will be downloaded.</help>
</field>
<field>
<id>dnsbl.whitelists</id>
<label>Whitelist Domains</label>
<type>select_multiple</type>
<style>tokenize</style>
<allownew>true</allownew>
<help>List of domains to whitelist. You can use regular expressions.</help>
</field>
</form>
@@ -1,18 +0,0 @@
<form>
<field>
<id>miscellaneous.privatedomain</id>
<label>Private Domains</label>
<type>select_multiple</type>
<style>tokenize</style>
<allownew>true</allownew>
<help>List of domains to mark as private. You only need this for some DNSBL lists which resolve to private addresses.</help>
</field>
<field>
<id>miscellaneous.dotservers</id>
<label>DNS over TLS Servers</label>
<type>select_multiple</type>
<style>tokenize</style>
<allownew>true</allownew>
<help>List of nameservers to use for DoT. Use syntax ip@port like 9.9.9.9@853</help>
</field>
</form>
@@ -1,9 +0,0 @@
<acl>
<page-services-unbound>
<name>Services: Unbound DNSBL</name>
<patterns>
<pattern>ui/unboundplus/*</pattern>
<pattern>api/unboundplus/*</pattern>
</patterns>
</page-services-unbound>
</acl>
@@ -1,35 +0,0 @@
<?php
/*
* Copyright (C) 2019 Michael Muenz <m.muenz@gmail.com>
* 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 Dnsbl extends BaseModel
{
}
@@ -1,47 +0,0 @@
<model>
<mount>//OPNsense/unboundplus/dnsbl</mount>
<description>Unbound DNSBL configuration</description>
<version>0.0.1</version>
<items>
<enabled type="BooleanField">
<default>0</default>
<Required>Y</Required>
</enabled>
<type type="OptionField">
<Required>N</Required>
<Multiple>Y</Multiple>
<OptionValues>
<aa>AdAway List</aa>
<ag>AdGuard List</ag>
<bla>Blocklist.site Ads</bla>
<blf>Blocklist.site Fraud</blf>
<blp>Blocklist.site Phishing</blp>
<ca>Cameleon List</ca>
<el>Easy List</el>
<emd>EMD Malicious Domains List</emd>
<ep>Easyprivacy List</ep>
<hpa>hpHosts Ads</hpa>
<hpf>hpHosts FSA</hpf>
<hpp>hpHosts PSH</hpp>
<hup>hpHosts PUP</hup>
<mw>Malwaredomain List</mw>
<nc>NoCoin List</nc>
<pt>PornTop1M List</pt>
<rw>Ransomware Tracker List</rw>
<sa>Simple Ad List</sa>
<st>Simple Tracker List</st>
<sb>Steven Black List</sb>
<ws>WindowsSpyBlocker (spy)</ws>
<wsu>WindowsSpyBlocker (update)</wsu>
<wse>WindowsSpyBlocker (extra)</wse>
<yy>YoYo List</yy>
</OptionValues>
</type>
<lists type="CSVListField">
<Required>N</Required>
</lists>
<whitelists type="CSVListField">
<Required>N</Required>
</whitelists>
</items>
</model>
@@ -1,8 +0,0 @@
<menu>
<Services>
<Unbound>
<Blacklist order="50" url="/ui/unboundplus/dnsbl/index"/>
<Miscellaneous order="60" url="/ui/unboundplus/miscellaneous/index"/>
</Unbound>
</Services>
</menu>
@@ -1,35 +0,0 @@
<?php
/*
* Copyright (C) 2019 Michael Muenz <m.muenz@gmail.com>
* 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
{
}
@@ -1,14 +0,0 @@
<model>
<mount>//OPNsense/unboundplus/miscellaneous</mount>
<description>Unbound Miscellaneous configuration</description>
<version>0.0.2</version>
<items>
<privatedomain type="CSVListField">
<Required>N</Required>
</privatedomain>
<dotservers type="CSVListField">
<Required>N</Required>
<mask>/^[a-fA-F0-9\.\,\:\@]{1,512}$/</mask>
</dotservers>
</items>
</model>
@@ -1,54 +0,0 @@
{#
# Copyright (c) 2019 Deciso B.V.
# Copyright (c) 2019 Michael Muenz <m.muenz@gmail.com>
# 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.
#}
<div class="content-box" style="padding-bottom: 1.5em;">
{{ partial("layout_partials/base_form",['fields':dnsblForm,'id':'frm_dnsbl_settings'])}}
<div class="col-md-12">
<hr />
<button class="btn btn-primary" id="saveAct" type="button"><b>{{ lang._('Save') }}</b> <i id="saveAct_progress"></i></button>
</div>
</div>
<script>
$(function() {
var data_get_map = {'frm_dnsbl_settings':"/api/unboundplus/dnsbl/get"};
mapDataToFormUI(data_get_map).done(function(data){
formatTokenizersUI();
$('.selectpicker').selectpicker('refresh');
});
// 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");
});
});
});
});
</script>
@@ -1,54 +0,0 @@
{#
# Copyright (c) 2019 Deciso B.V.
# Copyright (c) 2019 Michael Muenz <m.muenz@gmail.com>
# 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.
#}
<div class="content-box" style="padding-bottom: 1.5em;">
{{ partial("layout_partials/base_form",['fields':miscellaneousForm,'id':'frm_miscellaneous_settings'])}}
<div class="col-md-12">
<hr />
<button class="btn btn-primary" id="saveAct" type="button"><b>{{ lang._('Save') }}</b> <i id="saveAct_progress"></i></button>
</div>
</div>
<script>
$(function() {
var data_get_map = {'frm_miscellaneous_settings':"/api/unboundplus/miscellaneous/get"};
mapDataToFormUI(data_get_map).done(function(data){
formatTokenizersUI();
$('.selectpicker').selectpicker('refresh');
});
// link save button to API set action
$("#saveAct").click(function(){
saveFormToEndpoint(url="/api/unboundplus/miscellaneous/set", formid='frm_miscellaneous_settings',callback_ok=function(){
$("#saveAct_progress").addClass("fa fa-spinner fa-pulse");
ajaxCall(url="/api/unboundplus/service/reloadunbound", sendData={}, callback=function(data,status) {
$("#saveAct_progress").removeClass("fa fa-spinner fa-pulse");
});
});
});
});
</script>

Some files were not shown because too many files have changed in this diff Show More