[Kimchi-devel] [PATCH 3/5] Fix VM reset (UI) error messages hnadling

Rodrigo Trujillo rodrigo.trujillo at linux.vnet.ibm.com
Mon Feb 24 20:27:13 UTC 2014


This patch fixes the UI in order to show properly the messages sent by
backend when usert tries to reset a running VM. Error messages are
basically sent from vm 'stop' and 'start' functions.

Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo at linux.vnet.ibm.com>
---
 ui/js/src/kimchi.guest_main.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ui/js/src/kimchi.guest_main.js b/ui/js/src/kimchi.guest_main.js
index 4070c01..2976cac 100644
--- a/ui/js/src/kimchi.guest_main.js
+++ b/ui/js/src/kimchi.guest_main.js
@@ -64,8 +64,8 @@ kimchi.vmreset = function(event){
     var vm_id=vm.attr("id");
     kimchi.resetVM(vm_id, function(result) {
             kimchi.listVmsAuto();
-        }, function() {
-            kimchi.message.error(i18n['msg.fail.reset']);
+        }, function(err) {
+            kimchi.message.error(err.responseJSON.reason);
         }
     );
 };
-- 
1.8.5.3




More information about the Kimchi-devel mailing list