summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-adblock/htdocs/luci-static
diff options
context:
space:
mode:
authorDirk Brenken <dev@brenken.org>2022-10-18 14:51:49 +0200
committerDirk Brenken <dev@brenken.org>2022-10-18 15:16:42 +0200
commit79cbbc01ce0271490ee8f66f7cf1a9a1ca56f64d (patch)
treef9f687f5653d80eb710412498985acebd0b92bde /applications/luci-app-adblock/htdocs/luci-static
parent5bbea4955977de0ca9d97bc1afeb2a0359bb88d7 (diff)
luci-app-adblock: sync with adblock 4.1.5
* add a new DNS report parameter to change the top statistics dynamically in the range of 10-50, see #19622 in the package repo for reference. * sync translations Signed-off-by: Dirk Brenken <dev@brenken.org>
Diffstat (limited to 'applications/luci-app-adblock/htdocs/luci-static')
-rw-r--r--applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/dnsreport.js24
1 files changed, 19 insertions, 5 deletions
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 d594ec9ec3..010e728cf1 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
@@ -139,7 +139,20 @@ function handleAction(ev) {
L.ui.showModal(_('Refresh DNS Report'), [
E('div', { 'class': 'left', 'style': 'display:flex; flex-direction:column' }, [
E('label', { 'class': 'cbi-input-select', 'style': 'padding-top:.5em' }, [
- E('select', { 'class': 'cbi-input-select', 'id': 'count' }, [
+ E('select', { 'class': 'cbi-input-select', 'id': 'top_count' }, [
+ E('option', { 'value': '10' }, '10'),
+ E('option', { 'value': '20' }, '20'),
+ E('option', { 'value': '30' }, '30'),
+ E('option', { 'value': '40' }, '40'),
+ E('option', { 'value': '50' }, '50')
+ ]),
+ '\xa0\xa0\xa0',
+ _('max. top statistics')
+ ])
+ ]),
+ E('div', { 'class': 'left', 'style': 'display:flex; flex-direction:column' }, [
+ E('label', { 'class': 'cbi-input-select', 'style': 'padding-top:.5em' }, [
+ E('select', { 'class': 'cbi-input-select', 'id': 'res_count' }, [
E('option', { 'value': '50' }, '50'),
E('option', { 'value': '100' }, '100'),
E('option', { 'value': '150' }, '150'),
@@ -166,9 +179,10 @@ function handleAction(ev) {
'class': 'btn cbi-button-action',
'id': 'refresh',
'click': ui.createHandlerFn(this, async function(ev) {
- var count = document.getElementById('count').value;
+ var top_count = document.getElementById('top_count').value;
+ var res_count = document.getElementById('res_count').value;
var search = document.getElementById('search').value.trim().replace(/[^\w\.\-\:]/g,'') || '+';
- L.resolveDefault(fs.exec_direct('/etc/init.d/adblock', ['report', 'gen', count, search]),'');
+ L.resolveDefault(fs.exec_direct('/etc/init.d/adblock', ['report', 'gen', top_count, res_count, search]),'');
var running = 1;
while (running === 1) {
await new Promise(r => setTimeout(r, 1000));
@@ -190,7 +204,7 @@ function handleAction(ev) {
return view.extend({
load: function() {
- return L.resolveDefault(fs.exec_direct('/etc/init.d/adblock', ['report', 'json', '50', '+']),'');
+ return L.resolveDefault(fs.exec_direct('/etc/init.d/adblock', ['report', 'json', '10', '50', '+']),'');
},
render: function(dnsreport) {
@@ -331,7 +345,7 @@ return view.extend({
]),
E('div', { 'class': 'cbi-section' }, [
E('div', { 'class': 'left' }, [
- E('h3', _('Top 10 Statistics')),
+ E('h3', _('Top Statistics')),
tbl_top
])
]),