luci-app-attendedsysupgrade: reload rpcd fix #1668
authorPaul Spooren <spooren@informatik.uni-leipzig.de>
Wed, 7 Mar 2018 11:16:17 +0000 (12:16 +0100)
committerPaul Spooren <spooren@informatik.uni-leipzig.de>
Wed, 7 Mar 2018 12:11:32 +0000 (13:11 +0100)
when installing the luci app and opening it for the first time the
webinterface shows an error as some freshly installed rpcd calls are not
yet available. The reload fixes the problem.

luci-app-attendedsysupgrade: downloadable image

the creted sysupgrade image can now easily be downloaded via web
interface.

also fixed some </br> to <br />

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

index 832744f7d8b7b41ba0693d430da07781dab01473..1b890c0cbb87b12d6b786e33607c2c1682298397 100755 (executable)
@@ -2,5 +2,6 @@
 
 rm -rf /tmp/luci-indexcache /tmp/luci-modulecache/
 /etc/init.d/uhttpd restart
+/etc/init.d/rpcd reload
 
 return 0
index 9b67faf51587b93ecea7a889771d75ae5c939bee..604074ad3787edc0102958119fa86cd1382f1a56 100644 (file)
@@ -128,7 +128,7 @@ function ubus_call(command, argument, params, variable) {
                                        }
                                }
                        } else {
-                               error_box("<b>Ubus call faild:</b></br>Request: " + request_json + "</br>Response: " + JSON.stringify(response))
+                               error_box("<b>Ubus call faild:</b><br />Request: " + request_json + "<br />Response: " + JSON.stringify(response))
                        }
                        ubus_closed++;
                }
@@ -180,7 +180,7 @@ function upgrade_check_callback(request_text) {
        if(request_json.upgrades != undefined) {
                info_output += "<h3>Package upgrades available</h3>"
                for (upgrade in request_json.upgrades) {
-                       info_output += "<b>" + upgrade + "</b>: " + request_json.upgrades[upgrade][1] + " to " + request_json.upgrades[upgrade][0] + "</br>"
+                       info_output += "<b>" + upgrade + "</b>: " + request_json.upgrades[upgrade][1] + " to " + request_json.upgrades[upgrade][0] + "<br />"
                }
        }
        data.packages = request_json.packages
@@ -231,9 +231,9 @@ function upgrade_request_callback(request) {
        var filename_split = data.sysupgrade_url.split("/")
        data.filename = filename_split[filename_split.length - 1]
 
-       info_output = "Firmware created</br><b>" + data.filename + "</b>"
+       info_output = 'Firmware created: <a href="' + data.sysupgrade_url + '"><b>' + data.filename + '</b></a>'
        if(data.advanced_mode == 1) {
-               info_output += '</br><a target="_blank" href="' + data.sysupgrade_url + '.log">Build log</a>'
+               info_output += '<br /><a target="_blank" href="' + data.sysupgrade_url + '.log">Build log</a>'
        }
        info_box(info_output);
 
@@ -378,7 +378,7 @@ function server_request(request_dict, path, callback) {
                } else if (request.status === 500) {
                        request_json = JSON.parse(request_text)
 
-                       error_box_content = "<b>Internal server error</b></br>"
+                       error_box_content = "<b>Internal server error</b><br />"
                        error_box_content += request_json.error
                        if(request_json.log != undefined) {
                                data.log_url = request_json.log