luci-app-unbound: correctness fixes
authorPaul Donald <redacted>
Mon, 25 May 2026 21:23:23 +0000 (00:23 +0300)
committerPaul Donald <redacted>
Wed, 27 May 2026 12:49:45 +0000 (15:49 +0300)
follow-up to 5780be0beba6b0ccde07fc333c8f2868467a11e6

Signed-off-by: Paul Donald <redacted>
applications/luci-app-unbound/htdocs/luci-static/resources/view/unbound/configure.js
applications/luci-app-unbound/htdocs/luci-static/resources/view/unbound/files.js
applications/luci-app-unbound/htdocs/luci-static/resources/view/unbound/status.js
applications/luci-app-unbound/htdocs/luci-static/resources/view/unbound/zones.js

index 94321b7a654daf9f4c9cbe1910f28973ea089bf0..4bea64a8bfc89f33fd8ac064fc33aad84f594166 100644 (file)
@@ -257,7 +257,7 @@ return view.extend({
 
                        const qrs = s.taboption('resource', form.Flag, 'query_min_strict', _('Strict Minimize'),
                                _("Strict version of 'query minimize' but it can break DNS"));
-                       qrs.taboptional = true;
+                       qrs.optional = true;
                        qrs.depends('query_minimize', '1');
 
                        const eds = s.taboption('resource', form.Value, 'edns_size', _('EDNS Size'),
index e610829e675b34c9da93652a1183203af921a645..78163421ac84019c837dbccc61c59597f19237d9 100644 (file)
@@ -111,7 +111,7 @@ return view.extend({
 
                if (dhcp_c.content) {
                        s.tab('dhcp', _('Show: DHCP'));
-                       const dhcp_msg = s.taboption('manual', form.DummyValue, '_dhcp_msg', '');
+                       const dhcp_msg = s.taboption('dhcp', form.DummyValue, '_dhcp_msg', '');
                        dhcp_msg.default =  _("This shows '" + FILENAMES['dhcp'] +  "' list of hosts from DHCP hook scripts.");
                        const dhcp = s.taboption('dhcp', form.TextValue, 'dhcp');
                        dhcp.rows = 25;
index 49e1a47e7d2b5dd9c7537525510212df91f734af..1d7fa0071985691e527a0faa3f261daf52f4c5af 100644 (file)
@@ -13,7 +13,11 @@ return view.extend({
                        if (!stat) {
                                return Promise.all([
                                        L.resolveDefault(fs.stat('/sbin/logread'), {path: ''}),
-                                       L.resolveDefault('', {path: ''}),
+                                       Promise.resolve({ path: '' }),
+                                       Promise.resolve(null),
+                                       Promise.resolve(null),
+                                       Promise.resolve(null),
+                                       Promise.resolve(null),
                                ]);
                        } else {
                                return Promise.all([
@@ -58,7 +62,7 @@ return view.extend({
                        L.Poll.add(() => {
                                return L.resolveDefault(fs.exec_direct('/usr/sbin/unbound-control', ['-c', '/var/lib/unbound/unbound.conf', 'list_local_zones'])).then(function(res) {
                                        const zd = document.getElementById("zones_data");
-                                       zd.value = res ? rest.trim() :_('No zones data yet!');
+                                       zd.value = res ? res.trim() :_('No zones data yet!');
                                        zd.scrollTop = zd.scrollHeight;
                                });
                        });
index 9c03ca0ede6a21c2c58c2a4850df3daba3ecbbc2..55900d73914a6fcfb9c27f0e00f5c0ab81730563 100644 (file)
@@ -7,7 +7,6 @@
 'require view';
 
 const RESOLV_FILE = '/tmp/resolv.conf.d/resolv.conf.auto';
-const LOGERR_CMD = "logread -e 'unbound.*error.*ssl library'";
 const HELP_URL = 'https://github.com/openwrt/packages/blob/master/net/unbound/files/README.md';
 
 let section_enabled = false;
@@ -24,7 +23,7 @@ return view.extend({
        load() {
                return Promise.all([
                        fs.read(RESOLV_FILE).catch(() => ''),
-                       fs.exec(LOGERR_CMD).catch(() => ''),
+                       fs.exec('/sbin/logread', ['-e', 'unbound.*error.*ssl library']).catch(() => ''),
                        uci.load('unbound'),
                ]).then(([resolv, logerr]) => ({
                        resolvContent: resolv || '',
git clone https://git.99rst.org/PROJECT