diff options
author | Paul Spooren <mail@aparcar.org> | 2021-02-09 17:45:52 -1000 |
---|---|---|
committer | Paul Spooren <mail@aparcar.org> | 2021-03-07 23:17:06 -1000 |
commit | 25df4114ec05d1c96e04ba2121394b3c31842e09 (patch) | |
tree | 66d553c2052bb6e696f3d01186e22fe8581fdd84 /applications/luci-app-attendedsysupgrade/root | |
parent | 5af5f4a1ee5cbcd4a3099e6e210aca0099973410 (diff) |
luci-app-attendedsysupgrade: Render on client
Use new LuCI JavaScript code instead of a mix of Lua and JS.
Signed-off-by: Paul Spooren <mail@aparcar.org>
Diffstat (limited to 'applications/luci-app-attendedsysupgrade/root')
3 files changed, 40 insertions, 36 deletions
diff --git a/applications/luci-app-attendedsysupgrade/root/usr/share/luci/menu.d/luci-app-attendedsysupgrade.json b/applications/luci-app-attendedsysupgrade/root/usr/share/luci/menu.d/luci-app-attendedsysupgrade.json index 79d82a828f..33d7019fa3 100644 --- a/applications/luci-app-attendedsysupgrade/root/usr/share/luci/menu.d/luci-app-attendedsysupgrade.json +++ b/applications/luci-app-attendedsysupgrade/root/usr/share/luci/menu.d/luci-app-attendedsysupgrade.json @@ -1,13 +1,31 @@ { - "admin/system/attended_sysupgrade": { + "admin/system/attendedsysupgrade": { "title": "Attended Sysupgrade", - "order": 1, + "order": 60, "action": { - "type": "template", - "path": "attendedsysupgrade" + "type": "firstchild" }, "depends": { - "acl": [ "attendedsysupgrade" ] + "acl": [ "luci-app-attendedsysupgrade" ], + "uci": { "attendedsysupgrade": true } + } + }, + + "admin/system/attendedsysupgrade/overview": { + "title": "Overview", + "order": 1, + "action": { + "type": "view", + "path": "attendedsysupgrade/overview" + } + }, + + "admin/system/attendedsysupgrade/configuration": { + "title": "Configuration", + "order": 2, + "action": { + "type": "view", + "path": "attendedsysupgrade/configuration" } } } diff --git a/applications/luci-app-attendedsysupgrade/root/usr/share/rpcd/acl.d/attendedsysupgrade.json b/applications/luci-app-attendedsysupgrade/root/usr/share/rpcd/acl.d/attendedsysupgrade.json deleted file mode 100644 index 7549319260..0000000000 --- a/applications/luci-app-attendedsysupgrade/root/usr/share/rpcd/acl.d/attendedsysupgrade.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "attendedsysupgrade": { - "description": "attended sysupgrade via rpcd and luci", - "read": { - "ubus": { - "rpc-sys": [ - "upgrade_start", - "packagelist" - ], - "system": [ - "board", - "info" - ], - "uci": [ - "get", "set", "commit" - ] - }, - "uci": [ - "attendedsysupgrade" - ] - }, - "write": { - "cgi-io": [ - "upload" - ], - "uci": [ - "attendedsysupgrade" - ] - } - } -} diff --git a/applications/luci-app-attendedsysupgrade/root/usr/share/rpcd/acl.d/luci-app-attendedsysupgrade.json b/applications/luci-app-attendedsysupgrade/root/usr/share/rpcd/acl.d/luci-app-attendedsysupgrade.json new file mode 100644 index 0000000000..e3ceeaa35d --- /dev/null +++ b/applications/luci-app-attendedsysupgrade/root/usr/share/rpcd/acl.d/luci-app-attendedsysupgrade.json @@ -0,0 +1,17 @@ +{ + "luci-app-attendedsysupgrade": { + "description": "Grant UCI access to LuCI app attendedsysupgrade", + "read": { + "uci": ["attendedsysupgrade"], + "ubus": { + "rpc-sys": ["upgrade_start", "packagelist"] + } + }, + "write": { + "uci": ["attendedsysupgrade"], + "ubus": { + "rpc-sys": ["upgrade_start"] + } + } + } +} |