luci-app-attendedsysupgrade: show unknown package
authorPaul Spooren <spooren@informatik.uni-leipzig.de>
Tue, 6 Mar 2018 18:23:28 +0000 (19:23 +0100)
committerPaul Spooren <spooren@informatik.uni-leipzig.de>
Tue, 6 Mar 2018 18:25:08 +0000 (19:25 +0100)
Reads the header X-Unknown-Package offered by the sysupgrade server and
shows it in the error message.

Signed-off-by: Paul Spooren <spooren@informatik.uni-leipzig.de>
applications/luci-app-attendedsysupgrade/root/www/luci-static/resources/attendedsysupgrade.js

index c2fe81d58ab068f412a972673ed568da2c0c6e10..9b67faf51587b93ecea7a889771d75ae5c939bee 100644 (file)
@@ -373,8 +373,8 @@ function server_request(request_dict, path, callback) {
                error_box("No firmware created due to image size. Try again with less packages selected.")
 
                } else if (request.status === 422) {
-                       error_box("Unknown package in request")
-
+                       var package_missing = response.getResponseHeader("X-Unknown-Package");
+                       error_box("Unknown package in request: <b>" + package_missing + "</b>")
                } else if (request.status === 500) {
                        request_json = JSON.parse(request_text)