From 0b895b17940089f854221b340fafae83bcbb2a99 Mon Sep 17 00:00:00 2001 From: Stan Grishin Date: Fri, 4 Nov 2022 00:10:03 +0000 Subject: luci-app-simple-adblock: convert to js Thanks @dibdot, @jow-! Signed-off-by: Stan Grishin Update applications/luci-app-simple-adblock/htdocs/luci-static/resources/simple-adblock/status.js Co-authored-by: Vasili Sviridov Signed-off-by: Stan Grishin Thanks @dibdot, @jow-, @vsviridov! * this includes changes made during review Co-authored-by: Vasili Sviridov Signed-off-by: Stan Grishin --- .../share/luci/menu.d/luci-app-simple-adblock.json | 13 ++++--- .../share/rpcd/acl.d/luci-app-simple-adblock.json | 40 +++++++--------------- 2 files changed, 21 insertions(+), 32 deletions(-) (limited to 'applications/luci-app-simple-adblock/root/usr/share') diff --git a/applications/luci-app-simple-adblock/root/usr/share/luci/menu.d/luci-app-simple-adblock.json b/applications/luci-app-simple-adblock/root/usr/share/luci/menu.d/luci-app-simple-adblock.json index e640dbb871..b2cdca18eb 100644 --- a/applications/luci-app-simple-adblock/root/usr/share/luci/menu.d/luci-app-simple-adblock.json +++ b/applications/luci-app-simple-adblock/root/usr/share/luci/menu.d/luci-app-simple-adblock.json @@ -2,13 +2,16 @@ "admin/services/simple-adblock": { "title": "Simple AdBlock", "action": { - "type": "cbi", - "path": "simple-adblock", - "post": { "cbi.submit": true } + "type": "view", + "path": "simple-adblock/overview" }, "depends": { - "acl": [ "luci-app-simple-adblock" ], - "uci": { "simple-adblock": true } + "acl": [ + "luci-app-simple-adblock" + ], + "uci": { + "simple-adblock": true + } } } } diff --git a/applications/luci-app-simple-adblock/root/usr/share/rpcd/acl.d/luci-app-simple-adblock.json b/applications/luci-app-simple-adblock/root/usr/share/rpcd/acl.d/luci-app-simple-adblock.json index 4635626615..6aeadc9c63 100644 --- a/applications/luci-app-simple-adblock/root/usr/share/rpcd/acl.d/luci-app-simple-adblock.json +++ b/applications/luci-app-simple-adblock/root/usr/share/rpcd/acl.d/luci-app-simple-adblock.json @@ -2,40 +2,26 @@ "luci-app-simple-adblock": { "description": "Grant UCI and file access for luci-app-simple-adblock", "read": { - "cgi-io": [ - "exec" - ], - "file": { - "/usr/lib/opkg/status": [ - "read" - ], - "/sys/class/leds/*": [ - "read" - ], - "/var/run/simple-adblock.*": [ - "read" - ], - "/etc/init.d/simple-adblock *": [ - "exec" - ], - "/usr/sbin/dnsmasq *": [ - "exec" - ], - "/usr/sbin/unbound *": [ - "exec" - ], - "/usr/sbin/ipset *": [ - "exec" + "ubus": { + "luci.simple-adblock": [ + "getInitList", + "getInitStatus", + "getPlatformSupport" ] }, - "uci": [ + "uci": [ "simple-adblock" ] }, "write": { "uci": [ "simple-adblock" - ] + ], + "ubus": { + "luci.simple-adblock": [ + "setInitAction" + ] + } } } -} \ No newline at end of file +} -- cgit v1.2.3