[Kimchi-devel] [PATCH ] Show error message if debug report generation errors.

Leonardo Garcia lagarcia at linux.vnet.ibm.com
Tue Mar 25 14:27:40 UTC 2014


From: Leonardo Garcia <lagarcia at br.ibm.com>

If the process of generating a debug report in Kimchi fails while it
was executing (e.g. due to running out of disk space to generate the
report), the error message was not being shown in the Kimchi UI. Basically
src/kimchi/control/tasks.py was putting the error message in a JSON field
called message, while the UI was looking for the error message in a field
called reason.

Signed-off-by: Leonardo Garcia <lagarcia at br.ibm.com>
---
 ui/js/src/kimchi.report_add_main.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ui/js/src/kimchi.report_add_main.js b/ui/js/src/kimchi.report_add_main.js
index 15cc76b..3248e2f 100644
--- a/ui/js/src/kimchi.report_add_main.js
+++ b/ui/js/src/kimchi.report_add_main.js
@@ -23,11 +23,11 @@ kimchi.report_add_main = function() {
                 result: result
             });
         }, function(result) {
-            if (result['reason']) {
-                var errText = result['reason'];
+            if (result['message']) {
+                var errText = result['message'];
             }
             else {
-                var errText = result['responseJSON']['reason'];
+                var errText = result['responseJSON']['message'];
             }
             result && kimchi.message.error(errText)
             submitButton
-- 
1.8.5.3




More information about the Kimchi-devel mailing list