Commit graph

8 commits

Author SHA1 Message Date
Paul Spooren
de3e0bbffd luci-app-attendedsysupgrade: LuCIfy codebase
This should make the code a bit more readable and LuCI like instead of
using plain JavaScript.

Handle the filesystem correctly to avoid installing suqashfs images on
ext4 devices and the other way around, also recognize systems running
efi.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2022-03-02 10:48:31 +01:00
Paul Spooren
02de3e4a2b luci-app-attendedsysupgrade: fix ACL definition
Fix the ACL file which handles the permissions for the LuCI app.

Suggested-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-07-02 09:22:59 -10:00
Paul Spooren
25df4114ec 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>
2021-03-07 23:17:06 -10:00
Jo-Philipp Wich
8f34e105c0 treewide: add ACL annotations to menu entries
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-17 12:40:31 +02:00
Jo-Philipp Wich
625abbfdbe treewide: convert simple Lua controllers to declarative JSON
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-02-05 16:52:58 +01:00
Paul Spooren
802d5b6bec luci-app-attendedsysupgrade: use rpc-sys pkglist
The bash package rpcd-mod-packagelist is no longer required as it has
been ported to rpc-sys by @dangowrt. The luci app now uses that feature.

The packagelist.acls is no longer required and has been removed.

luci-app-attendedsysupgrade: follow new server api

a new api uses more status codes and headers instead of genric 400 code
with json payload.

show error message when ubus call fail

fix typo

more info here
https://github.com/aparcar/attendedsysupgrade-server#response-status-codes

luci-app-attendedsysupgrade: refactoring

luci-app-attendedsysupgrade: use checksum

now compares cgi-io md5 checksum with md5 of server
as well checks if enough free memory is available to store image

Added needed ACL to let Luci request "system info"

rename "image" to "firmware" in output strings. This was requested as
"unification"

rpcd-mod-packelist used to return a variable called "packagelist", the
new "rpc-sys packagelist" returns a variable called "packages". This has
been adapted.

Signed-off-by: Paul Spooren <paul@spooren.de>
2017-11-24 02:10:31 +01:00
Paul Spooren
4891deaf94 luci-app-attendedsysupgrade: use common
use attendedsysupgrade-common package and rpc-sys instead of
rpcd-mod-attendedsysupgrade

luci-app-attendedsysupgrade: editable server url

the server url can now be changed. The solution is kept as simple as
possible to not introduce any lua code.

Small cleanup, but needs a refactoring.

Add acl rights to edit the attendedsysupgrade file

Add cgi-io as a dependencie to upload image to router

Signed-off-by: Paul Spooren <paul@spooren.de>
2017-11-12 03:09:33 +01:00
Paul Spooren
26c93debe9 luci-app-attendedsysupgrade: upgrade to version 2
Add required ubus acls from package rpcd-mod-attendedsysupgrade.

luci-app-attendedsysupgrade: add postinst script

removes caches and restarts uhttpd as mentioned here:
https://github.com/aparcar/gsoc17-attended-sysupgrade/issues/58#issuecomment-339370803

luci-app-attendedsysupgrade: redesign

simplified the interface and made it more "luci" like

simplify ubus interaction, use uci_call und ubus_call functions

add optional settings:

auto_search:
search on opening the view without clicking

advanced_mode:
if set, allow package edits, show build log

rename updateserver to upgradeserver
rename url to server_url

luci-app-attendedsysupgrade: rename uci options

remove leading "upgrade" from uci options
also rename server_url to url

cleaning

use new api/ urls

wait for successfull reboot

Signed-off-by: Paul Spooren <paul@spooren.de>
2017-11-04 19:25:10 +01:00