Updated Branches:
  refs/heads/ui-regions c48ed610d -> 2386270d7

Regions UI: Add error handling to API calls


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/2386270d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/2386270d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/2386270d

Branch: refs/heads/ui-regions
Commit: 2386270d7b8edc0504f801aed45d7959dbb99eba
Parents: c48ed61
Author: Brian Federle <[email protected]>
Authored: Tue Feb 26 16:21:13 2013 -0800
Committer: Brian Federle <[email protected]>
Committed: Tue Feb 26 16:21:13 2013 -0800

----------------------------------------------------------------------
 ui/scripts/regions.js |   25 ++++++++++++++++++++-----
 1 files changed, 20 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2386270d/ui/scripts/regions.js
----------------------------------------------------------------------
diff --git a/ui/scripts/regions.js b/ui/scripts/regions.js
index a5ff1e9..6c0da68 100644
--- a/ui/scripts/regions.js
+++ b/ui/scripts/regions.js
@@ -65,7 +65,10 @@
 
                 args.response.success({ _custom: { jobId: jobID }});
                 $(window).trigger('cloudStack.refreshRegions');
-              }
+              },
+              error: function(json) {
+                args.response.error(parseXMLHttpResponse(json));
+              } 
             });
           }
         }
@@ -79,7 +82,10 @@
             args.response.success({
               data: regions ? regions : []
             });
-          }
+          },
+          error: function(json) {
+            args.response.error(parseXMLHttpResponse(json));
+          } 
         });
       },
       detailView: {
@@ -94,7 +100,10 @@
                 success: function(json) {
                   args.response.success();
                   $(window).trigger('cloudStack.refreshRegions');
-                }
+                },
+                error: function(json) {
+                  args.response.error(parseXMLHttpResponse(json));
+                } 
               });
             }
           },
@@ -113,7 +122,10 @@
                 success: function(json) {
                   args.response.success();
                   $(window).trigger('cloudStack.refreshRegions');
-                }
+                },
+                error: function(json) {
+                  args.response.error(parseXMLHttpResponse(json));
+                } 
               });
             }
           }
@@ -140,7 +152,10 @@
                   args.response.success({
                     data: region ? region[0] : {}
                   });
-                }
+                },
+                error: function(json) {
+                  args.response.error(parseXMLHttpResponse(json));
+                } 
               });  
             }
           }

Reply via email to