[Kimchi-devel] [PATCH V2] Show error message from debug report generation async task

Aline Manera alinefm at linux.vnet.ibm.com
Tue Mar 25 19:45:26 UTC 2014


Reviewed-by: Aline Manera <alinefm at linux.vnet.ibm.com>

On 03/25/2014 04:33 PM, Rodrigo Trujillo wrote:
> 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. 'reason' is used in standard
> exception json returned only.
>
> Signed-off-by: Leonardo Garcia <lagarcia at br.ibm.com>
> Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo at linux.vnet.ibm.com>
> ---
>   ui/js/src/kimchi.report_add_main.js | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/ui/js/src/kimchi.report_add_main.js b/ui/js/src/kimchi.report_add_main.js
> index 15cc76b..8759c2b 100644
> --- a/ui/js/src/kimchi.report_add_main.js
> +++ b/ui/js/src/kimchi.report_add_main.js
> @@ -23,9 +23,11 @@ kimchi.report_add_main = function() {
>                   result: result
>               });
>           }, function(result) {
> -            if (result['reason']) {
> -                var errText = result['reason'];
> +            // Error message from Async Task status
> +            if (result['message']) {
> +                var errText = result['message'];
>               }
> +            // Error message from standard kimchi exception
>               else {
>                   var errText = result['responseJSON']['reason'];
>               }




More information about the Kimchi-devel mailing list