From: Dirk Brenken Date: Wed, 20 May 2026 20:54:50 +0000 (+0200) Subject: luci-app-adblock: update 4.5.5-5 X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=c707d21a010ae958d655f37aa8895571a85d6605;p=openwrt-luci.git luci-app-adblock: update 4.5.5-5 * sync with base package Signed-off-by: Dirk Brenken --- diff --git a/applications/luci-app-adblock/Makefile b/applications/luci-app-adblock/Makefile index 8b6a6f9b11..6876ef4183 100644 --- a/applications/luci-app-adblock/Makefile +++ b/applications/luci-app-adblock/Makefile @@ -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 diff --git a/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/dnsreport.js b/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/dnsreport.js index fe454a9526..08933800ca 100644 --- a/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/dnsreport.js +++ b/applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/dnsreport.js @@ -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);