'require fs';
'require ui';
+let notMsg, errMsg;
+
return view.extend({
load: function () {
return Promise.all([
.then(function () {
document.querySelector('textarea').value = value;
document.body.scrollTop = document.documentElement.scrollTop = 0;
- ui.addNotification(null, E('p', _('Allowlist modifications have been saved, start the Domain Lookup or restart banIP that changes take effect.')), 'info');
+ if (!notMsg) {
+ ui.addNotification(null, E('p', _('Allowlist modifications have been saved, reload banIP that changes take effect.')), 'info');
+ notMsg = true;
+ }
}).catch(function (e) {
document.body.scrollTop = document.documentElement.scrollTop = 0;
- ui.addNotification(null, E('p', _('Unable to save modifications: %s').format(e.message)), 'error');
+ if (!errMsg) {
+ ui.addNotification(null, E('p', _('Unable to save modifications: %s').format(e.message)), 'error');
+ errMsg = true;
+ }
});
},
render: function (allowlist) {
'require fs';
'require ui';
+let notMsg, errMsg;
+
return view.extend({
load: function () {
return Promise.all([
.then(function () {
document.querySelector('textarea').value = value;
document.body.scrollTop = document.documentElement.scrollTop = 0;
- ui.addNotification(null, E('p', _('Blocklist modifications have been saved, start the Domain Lookup or restart banIP that changes take effect.')), 'info');
+ if (!notMsg) {
+ ui.addNotification(null, E('p', _('Blocklist modifications have been saved, reload banIP that changes take effect.')), 'info');
+ notMsg = true;
+ }
}).catch(function (e) {
document.body.scrollTop = document.documentElement.scrollTop = 0;
- ui.addNotification(null, E('p', _('Unable to save modifications: %s').format(e.message)), 'error');
+ if (!errMsg) {
+ ui.addNotification(null, E('p', _('Unable to save modifications: %s').format(e.message)), 'error');
+ errMsg = true;
+ }
});
},
render: function (blocklist) {
m = new form.JSONMap(data, _('Custom Feed Editor'), _('With this editor you can upload your local custom feed file or fill up an initial one (a 1:1 copy of the version shipped with the package). \
The file is located at \'/etc/banip/banip.custom.feeds\'. \
- Then you can edit this file, delete entries, add new ones or make a local backup. To go back to the maintainers version just empty the custom feed file again (do not delete it!).'));
+ Then you can edit this file, delete entries, add new ones or make a local backup. To go back to the maintainers version just clear the custom feed file.'));
for (let i = 0; i < Object.keys(m.data.data).length; i++) {
feed = Object.keys(m.data.data)[i];
url_4 = m.data.data[feed].url_4;
function handleAction(ev) {
if (ev === 'restart' || ev === 'reload') {
let map = document.querySelector('.cbi-map');
- return dom.callClassMethod(map, 'save')
- .then(L.bind(ui.changes.apply, ui.changes))
- .then(function() {
- return fs.exec_direct('/etc/init.d/banip', [ev]);
- });
+ dom.callClassMethod(map, 'save')
+ .then(L.bind(ui.changes.apply, ui.changes))
+ .then(function () {
+ return fs.exec_direct('/etc/init.d/banip', [ev]);
+ });
} else {
return fs.exec_direct('/etc/init.d/banip', [ev]);
}
msgid "Allowlist Only"
msgstr ""
-#: applications/luci-app-banip/htdocs/luci-static/resources/view/banip/allowlist.js:19
+#: applications/luci-app-banip/htdocs/luci-static/resources/view/banip/allowlist.js:22
msgid ""
-"Allowlist modifications have been saved, start the Domain Lookup or restart "
-"banIP that changes take effect."
+"Allowlist modifications have been saved, reload banIP that changes take "
+"effect."
msgstr ""
#: applications/luci-app-banip/htdocs/luci-static/resources/view/banip/overview.js:424
msgid "Blocklist Set Expiry"
msgstr ""
-#: applications/luci-app-banip/htdocs/luci-static/resources/view/banip/blocklist.js:19
+#: applications/luci-app-banip/htdocs/luci-static/resources/view/banip/blocklist.js:22
msgid ""
-"Blocklist modifications have been saved, start the Domain Lookup or restart "
-"banIP that changes take effect."
+"Blocklist modifications have been saved, reload banIP that changes take "
+"effect."
msgstr ""
#: applications/luci-app-banip/htdocs/luci-static/resources/view/banip/overview.js:507
msgid "Target directory for compressed feed backups."
msgstr ""
-#: applications/luci-app-banip/htdocs/luci-static/resources/view/banip/allowlist.js:28
+#: applications/luci-app-banip/htdocs/luci-static/resources/view/banip/allowlist.js:36
msgid "The allowlist is too big, unable to save modifications."
msgstr ""
-#: applications/luci-app-banip/htdocs/luci-static/resources/view/banip/blocklist.js:28
+#: applications/luci-app-banip/htdocs/luci-static/resources/view/banip/blocklist.js:36
msgid "The blocklist is too big, unable to save modifications."
msgstr ""
msgid "The selected priority will be used for banIP background processing."
msgstr ""
-#: applications/luci-app-banip/htdocs/luci-static/resources/view/banip/allowlist.js:32
+#: applications/luci-app-banip/htdocs/luci-static/resources/view/banip/allowlist.js:40
msgid ""
"This is the local banIP allowlist that will permit certain MAC-, IP-"
"addresses or domain names.<br /> <em><b>Please note:</b></em> add only "
"notation and MAC/IP-bindings are allowed."
msgstr ""
-#: applications/luci-app-banip/htdocs/luci-static/resources/view/banip/blocklist.js:32
+#: applications/luci-app-banip/htdocs/luci-static/resources/view/banip/blocklist.js:40
msgid ""
"This is the local banIP blocklist that will prevent certain MAC-, IP-"
"addresses or domain names.<br /> <em><b>Please note:</b></em> add only "
msgid "Unable to parse the ruleset file!"
msgstr ""
-#: applications/luci-app-banip/htdocs/luci-static/resources/view/banip/allowlist.js:22
-#: applications/luci-app-banip/htdocs/luci-static/resources/view/banip/blocklist.js:22
+#: applications/luci-app-banip/htdocs/luci-static/resources/view/banip/allowlist.js:28
+#: applications/luci-app-banip/htdocs/luci-static/resources/view/banip/blocklist.js:28
msgid "Unable to save modifications: %s"
msgstr ""
"initial one (a 1:1 copy of the version shipped with the package). The file "
"is located at '/etc/banip/banip.custom.feeds'. Then you can edit this file, "
"delete entries, add new ones or make a local backup. To go back to the "
-"maintainers version just empty the custom feed file again (do not delete "
-"it!)."
+"maintainers version just clear the custom feed file."
msgstr ""
#: applications/luci-app-banip/htdocs/luci-static/resources/view/banip/overview.js:571