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

Paulo Ricardo Paz Vital pvital at linux.vnet.ibm.com
Tue Mar 25 18:37:23 UTC 2014


-- 
Reviewed-by: Paulo Vital <pvital at linux.vnet.ibm.com>


On Tue, 2014-03-25 at 11:27 -0300, Leonardo Garcia wrote:
> 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




More information about the Kimchi-devel mailing list