[Kimchi-devel] [PATCH] Add error handling for repo management

Adam King rak at linux.vnet.ibm.com
Wed Mar 26 16:36:45 UTC 2014


ListRepo call had no error handler.

Signed-off-by: Adam King <rak at linux.vnet.ibm.com>
---
 ui/js/src/kimchi.host.js | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/ui/js/src/kimchi.host.js b/ui/js/src/kimchi.host.js
index acd8e8e..e94bad6 100644
--- a/ui/js/src/kimchi.host.js
+++ b/ui/js/src/kimchi.host.js
@@ -176,6 +176,15 @@ kimchi.host_main = function() {
                     repositoriesGrid.setData(repositories);
                 }
             }
+        },
+        function(error) {
+            var message = error && error['responseJSON'] && error['responseJSON']['reason'];
+            
+            if($.isFunction(gridCallback)) {
+                gridCallback([]);
+            }
+            repositoriesGrid &&
+                repositoriesGrid.showMessage(message || i18n['KCHUPD6008M']);
         });
 
         $('#repositories-grid-remove-button').prop('disabled', true);
-- 
1.8.1.4




More information about the Kimchi-devel mailing list