summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-vnstat/root/usr
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-app-vnstat/root/usr')
-rw-r--r--applications/luci-app-vnstat/root/usr/share/luci/menu.d/luci-app-vnstat.json31
-rw-r--r--applications/luci-app-vnstat/root/usr/share/rpcd/acl.d/luci-app-vnstat.json11
2 files changed, 42 insertions, 0 deletions
diff --git a/applications/luci-app-vnstat/root/usr/share/luci/menu.d/luci-app-vnstat.json b/applications/luci-app-vnstat/root/usr/share/luci/menu.d/luci-app-vnstat.json
new file mode 100644
index 0000000000..6433bff745
--- /dev/null
+++ b/applications/luci-app-vnstat/root/usr/share/luci/menu.d/luci-app-vnstat.json
@@ -0,0 +1,31 @@
+{
+ "admin/status/vnstat": {
+ "title": "VnStat Traffic Monitor",
+ "order": 90,
+ "action": {
+ "type": "firstchild"
+ },
+ "depends": {
+ "acl": [ "luci-app-vnstat" ]
+ }
+ },
+
+ "admin/status/vnstat/graphs": {
+ "title": "Graphs",
+ "order": 1,
+ "action": {
+ "type": "template",
+ "path": "vnstat"
+ }
+ },
+
+ "admin/status/vnstat/config": {
+ "title": "Configuration",
+ "order": 2,
+ "action": {
+ "type": "cbi",
+ "path": "vnstat",
+ "post": { "cbi.submit": true }
+ }
+ }
+}
diff --git a/applications/luci-app-vnstat/root/usr/share/rpcd/acl.d/luci-app-vnstat.json b/applications/luci-app-vnstat/root/usr/share/rpcd/acl.d/luci-app-vnstat.json
new file mode 100644
index 0000000000..01d4134c4e
--- /dev/null
+++ b/applications/luci-app-vnstat/root/usr/share/rpcd/acl.d/luci-app-vnstat.json
@@ -0,0 +1,11 @@
+{
+ "luci-app-vnstat": {
+ "description": "Grant UCI access for luci-app-vnstat",
+ "read": {
+ "uci": [ "vnstat" ]
+ },
+ "write": {
+ "uci": [ "vnstat" ]
+ }
+ }
+}