diff --git a/addon/www/index.html b/addon/www/index.html
index 9710efa..47c185f 100644
--- a/addon/www/index.html
+++ b/addon/www/index.html
@@ -59,7 +59,7 @@ along with this program. If not, see .
function display_message(type, text, millis) {
clear_message();
- $('#message').contents().last()[0].textContent = text;
+ $('#message-text').html(text);
$('#message').attr('class', 'ui ' + type + ' message visible');
message_timer_id = setTimeout(clear_message, millis);
}
@@ -69,7 +69,7 @@ along with this program. If not, see .
clearTimeout(message_timer_id);
}
message_timer_id = null;
- $('#message').contents().last()[0].textContent = '';
+ $('#message-text').html('');
$('#message').attr('class', 'ui message hidden');
}
@@ -256,9 +256,18 @@ along with this program. If not, see .
// We are not expecting a response
},
function(xhr, ajaxOptions, thrownError) {
+ err = thrownError;
+ try {
+ obj = JSON.parse(xhr.responseText);
+ if (obj.error != null) {
+ err = obj.error;
+ }
+ }
+ catch(e) {
+ }
console.error("Firmware installation error: " + thrownError + ": " + xhr.responseText);
//$('#modal-log').modal('hide');
- set_running_installation("", thrownError + ": " + xhr.responseText);
+ set_running_installation("", err);
}
);
}
@@ -980,6 +989,7 @@ along with this program. If not, see .
diff --git a/addon/www/rest.cgi b/addon/www/rest.cgi
index 4f8cdd7..5b3f52c 100644
--- a/addon/www/rest.cgi
+++ b/addon/www/rest.cgi
@@ -240,7 +240,7 @@ if [catch {process} result] {
puts "Content-Type: ${content_type}"
puts "Status: $status";
puts ""
- set result [json_string $result]
+ set result [json_string "${result} - ${::errorCode} - ${::errorInfo}"]
puts -nonewline "\{\"error\":\"${result}\"\}"
} else {
puts "Content-Type: ${content_type}"