luci-app-adblock: update 4.5.5-5
authorDirk Brenken <redacted>
Wed, 20 May 2026 20:54:50 +0000 (22:54 +0200)
committerDirk Brenken <redacted>
Wed, 20 May 2026 20:54:50 +0000 (22:54 +0200)
* sync with base package

Signed-off-by: Dirk Brenken <redacted>
applications/luci-app-adblock/Makefile
applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/dnsreport.js

index 8b6a6f9b11f8d17b06b7cc33336328a248b35ecf..6876ef41832fb976c7780c29485b1710e03fdb6e 100644 (file)
@@ -7,7 +7,7 @@ LUCI_TITLE:=LuCI support for Adblock
 LUCI_DEPENDS:=+luci-base +luci-lib-uqr +adblock
 
 PKG_VERSION:=4.5.5
-PKG_RELEASE:=2
+PKG_RELEASE:=5
 PKG_LICENSE:=Apache-2.0
 PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
 
index fe454a95268c880cc866fa436114829725846133..08933800ca0c05511a965f5392be1ad7935895b9 100644 (file)
@@ -217,19 +217,24 @@ function handleAction(ev) {
                                                        L.resolveDefault(fs.exec_direct('/etc/init.d/adblock', ['report', 'gen', top_count, res_count, search]), '');
                                                        let attempts = 0;
                                                        let poller = setInterval(function () {
-                                                               attempts++;
                                                                L.resolveDefault(fs.read('/var/run/adblock/adblock.report'), '').then(function (res) {
-                                                                       if (res && res.trim()) {
+                                                                       res = (res || '').trim();
+                                                                       if (res === '1') {
                                                                                clearInterval(poller);
                                                                                ui.hideModal();
                                                                                location.reload();
-                                                                       } else if (attempts >= 40) {
-                                                                               clearInterval(poller);
-                                                                               document.querySelectorAll('.cbi-page-actions button').forEach(function (btn) {
-                                                                                       btn.disabled = false;
-                                                                               });
-                                                                               document.getElementById('refresh').classList.remove('spinning');
-                                                                               ui.addNotification(null, E('p', _('Failed to generate adblock report!')), 'error');
+                                                                       } else if (res === '0') {
+                                                                               // keep polling
+                                                                       } else {
+                                                                               attempts++;
+                                                                               if (attempts >= 10) {
+                                                                                       clearInterval(poller);
+                                                                                       document.querySelectorAll('.cbi-page-actions button').forEach(function (btn) {
+                                                                                               btn.disabled = false;
+                                                                                       });
+                                                                                       document.getElementById('refresh').classList.remove('spinning');
+                                                                                       ui.addNotification(null, E('p', _('Failed to generate adblock report!')), 'error');
+                                                                               }
                                                                        }
                                                                });
                                                        }, 3000);
git clone https://git.99rst.org/PROJECT