summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-attendedsysupgrade/luasrc
AgeCommit message (Collapse)Author
2020-02-05treewide: convert simple Lua controllers to declarative JSONJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-01-25luci-app-attendedsysupgrade: new api, unify statusPaul Spooren
to distinguish between installed packages and requested packages, the API call is now "installed" instead of "packages". Also unify "info_box" and "error_box" to "status_box" Signed-off-by: Paul Spooren <mail@aparcar.org>
2017-12-27luci-app-attendedsysupgrade: remove outdated checksPaul Spooren
the upgrade server used to store a md5 checksum and the image filesize, due to complexity this was removed. Instead a sha256sums file is created by the IB with additional signature. The firmware filesize can be retrived by requesting Content-Length data.sysupgrade_url. As the deeper layers (rpcd) currently do not offer an easy way to to perform a sha256sum check & verify a usign sig these features will be re-added once supported. Until then the security of the sysupgrades depend on TLS and so the luci-app is meant as a demonstration only. Signed-off-by: Paul Spooren <paul@spooren.de>
2017-12-27luci-app-attendedsysupgrade: separate js from htmlPaul Spooren
also use hide(), show() and $() like jquery Signed-off-by: Paul Spooren <spooren@informatik.uni-leipzig.de>
2017-11-24luci-app-attendedsysupgrade: use rpc-sys pkglistPaul Spooren
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-12luci-app-attendedsysupgrade: use commonPaul Spooren
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-04luci-app-attendedsysupgrade: upgrade to version 2Paul Spooren
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-10-20luci-app-attendedsysupgrade: editable packagelistPaul Spooren
add textarea with all to be installed packages, allows user to changes packages before requesting the image add button to open build log in Signed-off-by: Paul Spooren <paul@spooren.de>
2017-08-22Merge pull request #1314 from aparcar/acldJo-Philipp Wich
luci-app-attendedsysupgrade: lua code for acl.d
2017-08-19luci-app-attendedsysupgrade: lua code for acl.dPaul Spooren
re add lua code to handle content of acl.d/. This should enable users to use the luci-app without having the full snapshot luci installed, e.g. trying the app from 17.01.2 Signed-off-by: Paul Spooren <paul@spooren.de>
2017-08-17luci-app-attendedsysupgrade: param update_packagePaul Spooren
the "update_package" option explicitly asks the server to check for packages updates as well not only upgrades to a new release Signed-off-by: Paul Spooren <paul@spooren.de>
2017-08-14luci-app-attendedsysupgrade: use JSON.stringifyPaul Spooren
now uses JSON.stringify instead of creating pseudo JSON data via `'{' + variable + '}'` also simplify uci naming Signed-off-by: Paul Spooren <paul@spooren.de>
2017-08-13luci-app-attendedsysupgrade: send model infoPaul Spooren
as reported [here][1] the board_name is not everywhere unified yet. to solve this problem, the model name is transported as well and used as a fallback identifier [1]: https://github.com/aparcar/gsoc17-attended-sysupgrade/issues/26 Signed-off-by: Paul Spooren <paul@spooren.de>
2017-08-13luci-app-attendedsysupgrade: add keep-settings optPaul Spooren
add a keep-settings checkbox to the webview this PR depends on [this][1] PR in openwrt/packages [1]: https://github.com/openwrt/packages/pull/4689 Signed-off-by: Paul Spooren <paul@spooren.de>
2017-08-11luci-app-attendedsysupgrade: show updated packagesPaul Spooren
since the update server now checks packages for updates the web view will show all changed package versions. this PR is also important to support future package transformations of the server Signed-off-by: Paul Spooren <paul@spooren.de>
2017-08-04luci-app-attendedsysupgrade: remove leading slashPaul Spooren
the slash leads to // redirecting to /. The redirecting causes problems with CORS [1]. [1]: http://enable-cors.org/ Signed-off-by: Paul Spooren <paul@spooren.de>
2017-08-02luci-app-attendedsysupgrade: add packagePaul Spooren
Add a simple luci view in system tab to perform a sysupgrade with no hassle. Asks an external update server for upgrades, downloads and flashes the upgrade. This packge is the frontend for my current GSoC project: https://summerofcode.withgoogle.com/projects/#5684958571003904 More code is found here: https://github.com/aparcar/gsoc17-attended-sysupgrade Signed-off-by: Paul Spooren <paul@spooren.de> [jo@mein.io: squash commits, remove PKGARCH from Makefile] Signed-off-by: Jo-Philipp Wich <jo@mein.io>