summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-dashboard/root
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2020-09-04 08:51:12 +0200
committerGitHub <noreply@github.com>2020-09-04 08:51:12 +0200
commitd9bca30640a5a284383f9ea605207cae8aff5618 (patch)
tree202f9b697de689bcbba9bf1929a10c0ddf154b55 /modules/luci-mod-dashboard/root
parent171480e4e71d4d9bc75d22cc9dfbc19b467ec0a4 (diff)
parent2f32ddd6031bc9e0066478696aa2b6762c35d2b3 (diff)
Merge pull request #4185 from ZoZhang/dashboard
luci-mod-dashboard: initial checkin
Diffstat (limited to 'modules/luci-mod-dashboard/root')
-rw-r--r--modules/luci-mod-dashboard/root/usr/share/luci/menu.d/luci-mod-dashboard.json13
-rw-r--r--modules/luci-mod-dashboard/root/usr/share/rpcd/acl.d/luci-mod-dashboard.json41
2 files changed, 54 insertions, 0 deletions
diff --git a/modules/luci-mod-dashboard/root/usr/share/luci/menu.d/luci-mod-dashboard.json b/modules/luci-mod-dashboard/root/usr/share/luci/menu.d/luci-mod-dashboard.json
new file mode 100644
index 0000000000..555884674d
--- /dev/null
+++ b/modules/luci-mod-dashboard/root/usr/share/luci/menu.d/luci-mod-dashboard.json
@@ -0,0 +1,13 @@
+{
+ "admin/dashboard": {
+ "title": "Dashboard",
+ "order": 1,
+ "action": {
+ "type": "view",
+ "path": "dashboard/index"
+ },
+ "depends": {
+ "acl": [ "luci-mod-dashboard-index" ]
+ }
+ }
+}
diff --git a/modules/luci-mod-dashboard/root/usr/share/rpcd/acl.d/luci-mod-dashboard.json b/modules/luci-mod-dashboard/root/usr/share/rpcd/acl.d/luci-mod-dashboard.json
new file mode 100644
index 0000000000..1f331e7b4b
--- /dev/null
+++ b/modules/luci-mod-dashboard/root/usr/share/rpcd/acl.d/luci-mod-dashboard.json
@@ -0,0 +1,41 @@
+{
+ "luci-mod-dashboard-routes": {
+ "description": "Grant access to the system route status",
+ "read": {
+ "ubus": {
+ "file": [ "exec" ]
+ }
+ }
+ },
+
+ "luci-mod-dashboard-index": {
+ "description": "Grant access to main status display",
+ "read": {
+ "file": {
+ "/www/luci-static/resources/view/status/include": [ "list" ]
+ },
+ "ubus": {
+ "file": [ "list", "read" ],
+ "system": [ "board", "info" ]
+ }
+ }
+ },
+
+ "luci-mod-dashboard-index-dhcp": {
+ "description": "Grant access to DHCP status display",
+ "read": {
+ "ubus": {
+ "luci-rpc": [ "getDHCPLeases" ]
+ }
+ }
+ },
+
+ "luci-mod-dashboard-index-wifi": {
+ "description": "Grant access to wireless status display",
+ "read": {
+ "ubus": {
+ "iwinfo": [ "assoclist" ]
+ }
+ }
+ }
+}