luci-app-banip: update 1.8.8-4

* sync with base package

Signed-off-by: Dirk Brenken <dev@brenken.org>
This commit is contained in:
Dirk Brenken
2026-05-18 23:23:50 +02:00
parent 01d0617153
commit bfa3a31ac8
2 changed files with 15 additions and 10 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ LUCI_TITLE:=LuCI support for banIP
LUCI_DEPENDS:=+luci-base +banip
PKG_VERSION:=1.8.8
PKG_RELEASE:=2
PKG_RELEASE:=4
PKG_LICENSE:=Apache-2.0
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
@@ -362,18 +362,23 @@ return view.extend({
L.resolveDefault(fs.exec_direct('/etc/init.d/banip', ['report', 'gen']), '');
let attempts = 0;
let poller = setInterval(function () {
attempts++;
L.resolveDefault(fs.read('/var/run/banIP/banIP.report'), '').then(function (res) {
if (res && res.trim()) {
res = (res || '').trim();
if (res === '1') {
clearInterval(poller);
location.reload();
} else if (attempts >= 40) {
clearInterval(poller);
btn.classList.remove('spinning');
document.querySelectorAll('.cbi-page-actions button').forEach(function (b) {
b.disabled = false;
});
ui.addNotification(null, E('p', _('Failed to generate a banIP report!')), 'error');
} else if (res === '0') {
// keep polling, no attempt counter
} else {
attempts++;
if (attempts >= 10) {
clearInterval(poller);
btn.classList.remove('spinning');
document.querySelectorAll('.cbi-page-actions button').forEach(function (b) {
b.disabled = false;
});
ui.addNotification(null, E('p', _('Failed to generate a banIP report!')), 'error');
}
}
});
}, 3000);