diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-04-20 17:55:39 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-04-20 19:05:27 +0200 |
commit | fdce990b90f21f6925795d1f788f3e87bcdd0400 (patch) | |
tree | 754477c0046c74b1e23e0ce82c1551b6950f4fbd /applications/luci-app-nlbwmon/root/usr/share | |
parent | 79814b2f5286b6956d555b796407e2394169669d (diff) |
luci-app-nlbwmon: convert to client side JS
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'applications/luci-app-nlbwmon/root/usr/share')
-rw-r--r-- | applications/luci-app-nlbwmon/root/usr/share/luci/menu.d/luci-app-nlbwmon.json | 40 | ||||
-rw-r--r-- | applications/luci-app-nlbwmon/root/usr/share/rpcd/acl.d/luci-app-nlbwmon.json | 22 |
2 files changed, 62 insertions, 0 deletions
diff --git a/applications/luci-app-nlbwmon/root/usr/share/luci/menu.d/luci-app-nlbwmon.json b/applications/luci-app-nlbwmon/root/usr/share/luci/menu.d/luci-app-nlbwmon.json new file mode 100644 index 0000000000..5b597c6329 --- /dev/null +++ b/applications/luci-app-nlbwmon/root/usr/share/luci/menu.d/luci-app-nlbwmon.json @@ -0,0 +1,40 @@ +{ + "admin/nlbw": { + "title": "Bandwidth Monitor", + "order": 80, + "action": { + "type": "firstchild" + }, + "depends": { + "acl": [ "luci-app-nlbwmon" ], + "uci": { "nlbwmon": true } + } + }, + + "admin/nlbw/display": { + "title": "Display", + "order": 1, + "action": { + "type": "view", + "path": "nlbw/display" + } + }, + + "admin/nlbw/config": { + "title": "Configuration", + "order": 2, + "action": { + "type": "view", + "path": "nlbw/config" + } + }, + + "admin/nlbw/backup": { + "title": "Backup", + "order": 3, + "action": { + "type": "view", + "path": "nlbw/backup" + } + } +} diff --git a/applications/luci-app-nlbwmon/root/usr/share/rpcd/acl.d/luci-app-nlbwmon.json b/applications/luci-app-nlbwmon/root/usr/share/rpcd/acl.d/luci-app-nlbwmon.json index 0ccc5b1c36..20f05eef03 100644 --- a/applications/luci-app-nlbwmon/root/usr/share/rpcd/acl.d/luci-app-nlbwmon.json +++ b/applications/luci-app-nlbwmon/root/usr/share/rpcd/acl.d/luci-app-nlbwmon.json @@ -2,9 +2,31 @@ "luci-app-nlbwmon": { "description": "Grant UCI access for luci-app-nlbwmon", "read": { + "cgi-io": [ "exec" ], + "file": { + "/proc/sys/kernel/hostname": [ "read" ], + "/usr/libexec/nlbwmon-action backup": [ "exec" ], + "/usr/libexec/nlbwmon-action download *": [ "exec" ], + "/usr/libexec/nlbwmon-action periods": [ "exec" ], + "/usr/share/nlbwmon/protocols": [ "read" ] + }, + "ubus": { + "file": [ "read" ], + "luci-rpc": [ "getHostHints" ], + "network.rrdns": [ "lookup" ] + }, "uci": [ "nlbwmon" ] }, "write": { + "file": { + "/tmp/nlbw-restore.tar.gz": [ "write" ], + "/usr/libexec/nlbwmon-action commit": [ "exec" ], + "/usr/libexec/nlbwmon-action restore": [ "exec" ], + "/usr/share/nlbwmon/protocols": [ "write" ] + }, + "ubus": { + "file": [ "write" ] + }, "uci": [ "nlbwmon" ] } } |