diff --git a/net/chrony/Makefile b/net/chrony/Makefile index d4d807ea8b..00a06140da 100644 --- a/net/chrony/Makefile +++ b/net/chrony/Makefile @@ -1,5 +1,5 @@ PLUGIN_NAME= chrony -PLUGIN_VERSION= 1.5 +PLUGIN_VERSION= 1.6 PLUGIN_REVISION= 3 PLUGIN_COMMENT= Chrony time synchronisation PLUGIN_DEPENDS= chrony diff --git a/net/chrony/pkg-descr b/net/chrony/pkg-descr index f38222784a..7c7d2425b4 100644 --- a/net/chrony/pkg-descr +++ b/net/chrony/pkg-descr @@ -4,6 +4,18 @@ better in virtual environments. Plugin Changelog ---------------- +1.6 + +* Update config UI to expose the following features: + - local/orphan mode + - pools + - prefer + - iburst + - min/max poll + - interleaving +* Add per-source NTS option +* Add NTP data diagnostics + 1.5 * Allow adding a fallback NTP when using NTS diff --git a/net/chrony/src/opnsense/mvc/app/controllers/OPNsense/Chrony/Api/GeneralController.php b/net/chrony/src/opnsense/mvc/app/controllers/OPNsense/Chrony/Api/GeneralController.php index d96f5a1213..51fb579c01 100644 --- a/net/chrony/src/opnsense/mvc/app/controllers/OPNsense/Chrony/Api/GeneralController.php +++ b/net/chrony/src/opnsense/mvc/app/controllers/OPNsense/Chrony/Api/GeneralController.php @@ -32,6 +32,36 @@ class GeneralController extends ApiMutableModelControllerBase { - protected static $internalModelClass = '\OPNsense\Chrony\General'; protected static $internalModelName = 'general'; + protected static $internalModelClass = '\OPNsense\Chrony\General'; + + public function searchItemAction() + { + return $this->searchBase("peers.peer", null, "address"); + } + + public function setItemAction($uuid) + { + return $this->setBase("peer", "peers.peer", $uuid); + } + + public function addItemAction() + { + return $this->addBase("peer", "peers.peer"); + } + + public function getItemAction($uuid = null) + { + return $this->getBase("peer", "peers.peer", $uuid); + } + + public function delItemAction($uuid) + { + return $this->delBase("peers.peer", $uuid); + } + + public function toggleItemAction($uuid, $enabled = null) + { + return $this->toggleBase("peers.peer", $uuid, $enabled); + } } diff --git a/net/chrony/src/opnsense/mvc/app/controllers/OPNsense/Chrony/Api/ServiceController.php b/net/chrony/src/opnsense/mvc/app/controllers/OPNsense/Chrony/Api/ServiceController.php index e3a6813908..2c88330d0b 100644 --- a/net/chrony/src/opnsense/mvc/app/controllers/OPNsense/Chrony/Api/ServiceController.php +++ b/net/chrony/src/opnsense/mvc/app/controllers/OPNsense/Chrony/Api/ServiceController.php @@ -82,4 +82,15 @@ public function chronyauthdataAction() $response = $backend->configdRun("chrony chronyauthdata"); return array("response" => $response); } + + /** + * show chrony ntpdata + * @return array + */ + public function chronyntpdataAction() + { + $backend = new Backend(); + $response = $backend->configdRun("chrony chronyntpdata"); + return array("response" => $response); + } } diff --git a/net/chrony/src/opnsense/mvc/app/controllers/OPNsense/Chrony/GeneralController.php b/net/chrony/src/opnsense/mvc/app/controllers/OPNsense/Chrony/IndexController.php similarity index 85% rename from net/chrony/src/opnsense/mvc/app/controllers/OPNsense/Chrony/GeneralController.php rename to net/chrony/src/opnsense/mvc/app/controllers/OPNsense/Chrony/IndexController.php index faa214b6a0..088f439543 100644 --- a/net/chrony/src/opnsense/mvc/app/controllers/OPNsense/Chrony/GeneralController.php +++ b/net/chrony/src/opnsense/mvc/app/controllers/OPNsense/Chrony/IndexController.php @@ -28,11 +28,13 @@ namespace OPNsense\Chrony; -class GeneralController extends \OPNsense\Base\IndexController +class IndexController extends \OPNsense\Base\IndexController { public function indexAction() { + $this->view->pick('OPNsense/Chrony/index'); $this->view->generalForm = $this->getForm('general'); - $this->view->pick('OPNsense/Chrony/general'); + $this->view->formDialogPeer = $this->getForm("dialogPeer"); + $this->view->formGridPeer = $this->getFormGrid("dialogPeer"); } } diff --git a/net/chrony/src/opnsense/mvc/app/controllers/OPNsense/Chrony/forms/dialogPeer.xml b/net/chrony/src/opnsense/mvc/app/controllers/OPNsense/Chrony/forms/dialogPeer.xml new file mode 100644 index 0000000000..6e498422a5 --- /dev/null +++ b/net/chrony/src/opnsense/mvc/app/controllers/OPNsense/Chrony/forms/dialogPeer.xml @@ -0,0 +1,75 @@ +
\ No newline at end of file diff --git a/net/chrony/src/opnsense/mvc/app/controllers/OPNsense/Chrony/forms/general.xml b/net/chrony/src/opnsense/mvc/app/controllers/OPNsense/Chrony/forms/general.xml index 3b6b358ffb..ba5a0ccbee 100644 --- a/net/chrony/src/opnsense/mvc/app/controllers/OPNsense/Chrony/forms/general.xml +++ b/net/chrony/src/opnsense/mvc/app/controllers/OPNsense/Chrony/forms/general.xml @@ -6,36 +6,22 @@