From 7b2119578fc9838a5a808980c9c8d8ef0ebd50e4 Mon Sep 17 00:00:00 2001 From: Robbert Rijkse <42551307+sestary@users.noreply.github.com> Date: Wed, 11 Jan 2023 08:34:21 -0500 Subject: [PATCH] move RNDC key to general page (#3258) --- .../OPNsense/Bind/GeneralController.php | 1 - .../OPNsense/Bind/forms/general.xml | 19 ++++++++++++++ .../OPNsense/Bind/forms/rndcKey.xml | 14 ----------- .../mvc/app/views/OPNsense/Bind/general.volt | 25 ------------------- 4 files changed, 19 insertions(+), 40 deletions(-) delete mode 100644 dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/forms/rndcKey.xml diff --git a/dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/GeneralController.php b/dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/GeneralController.php index f233b57bb..663acb058 100644 --- a/dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/GeneralController.php +++ b/dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/GeneralController.php @@ -34,7 +34,6 @@ class GeneralController extends \OPNsense\Base\IndexController { $this->view->generalForm = $this->getForm("general"); $this->view->dnsblForm = $this->getForm("dnsbl"); - $this->view->rndcKeyForm = $this->getForm("rndcKey"); $this->view->formDialogEditBindAcl = $this->getForm("dialogEditBindAcl"); $this->view->formDialogEditBindPrimaryDomain = $this->getForm("dialogEditBindPrimaryDomain"); $this->view->formDialogEditBindSecondaryDomain = $this->getForm("dialogEditBindSecondaryDomain"); diff --git a/dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/forms/general.xml b/dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/forms/general.xml index f929beedd..e40b6dc86 100644 --- a/dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/forms/general.xml +++ b/dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/forms/general.xml @@ -169,4 +169,23 @@ true Except a list of IPs from rate-limiting like ::1 + + header + + true + + + general.rndcalgo + + dropdown + true + Set the authentication algorithm for the RNDC key. This requires a restart of the Bind Service. + + + general.rndcsecret + + text + true + The base64-encoded RNDC key. This requires a restart of the Bind Service. + diff --git a/dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/forms/rndcKey.xml b/dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/forms/rndcKey.xml deleted file mode 100644 index 48f2fc43d..000000000 --- a/dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/forms/rndcKey.xml +++ /dev/null @@ -1,14 +0,0 @@ -
- - general.rndcalgo - - dropdown - Set the authentication algorithm for the RNDC key. - - - general.rndcsecret - - text - The base64-encoded RNDC key. - -
diff --git a/dns/bind/src/opnsense/mvc/app/views/OPNsense/Bind/general.volt b/dns/bind/src/opnsense/mvc/app/views/OPNsense/Bind/general.volt index 9e8749d3b..cf7991ec9 100644 --- a/dns/bind/src/opnsense/mvc/app/views/OPNsense/Bind/general.volt +++ b/dns/bind/src/opnsense/mvc/app/views/OPNsense/Bind/general.volt @@ -32,7 +32,6 @@ POSSIBILITY OF SUCH DAMAGE.
  • {{ lang._('General') }}
  • {{ lang._('DNSBL') }}
  • {{ lang._('ACLs') }}
  • -
  • {{ lang._('Keys') }}
  • {{ lang._('Primary Zones') }}
  • {{ lang._('Secondary Zones') }}
  • @@ -85,21 +84,6 @@ POSSIBILITY OF SUCH DAMAGE.

    -
    -
    -
    -

    {{ lang._('RNDC Key') }}

    -
    - {{ partial("layout_partials/base_form",['fields':rndcKeyForm,'id':'frm_general_settings'])}} -
    -
    -
    - -
    - Note: Bind will be restarted when you Save, this is required when the RNDC key changes. -

    -
    -

    {{ lang._('Zones') }}

    @@ -339,15 +323,6 @@ $( document ).ready(function() { }); }); - $("#saveRestartAct_rndckey").click(function(){ - saveFormToEndpoint(url="/api/bind/general/set", formid='frm_general_settings',callback_ok=function(){ - $("#saveRestartAct_rndckey_progress").addClass("fa fa-spinner fa-pulse"); - ajaxCall("/api/bind/service/restart", {}, function(data,status) { - updateServiceControlUI('bind'); - $("#saveRestartAct_rndckey_progress").removeClass("fa fa-spinner fa-pulse"); - }); - }); - }); $(".saveAct_domain").click(function(){ $(".saveAct_domain_progress").addClass("fa fa-spinner fa-pulse"); ajaxCall("/api/bind/service/reconfigure", {}, function(data,status) {