cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jessicaw...@apache.org
Subject git commit: updated refs/heads/4.2 to e2f1416
Date Fri, 19 Jul 2013 22:23:36 GMT
Updated Branches:
  refs/heads/4.2 2b254186b -> e2f14167f


CLOUDSTACK-3651: Infrastructure menu - zone detail - listVmwareDcs API only exists in non-oss
build, suppress error "The given command does not exist or it is not avaiable for user" from
UI for this specific case.


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

Branch: refs/heads/4.2
Commit: e2f14167f228c98ab81906c1892a123bc99f5cb8
Parents: 2b25418
Author: Jessica Wang <jessicawang@apache.org>
Authored: Fri Jul 19 15:17:14 2013 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Fri Jul 19 15:23:24 2013 -0700

----------------------------------------------------------------------
 ui/scripts/system.js | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e2f14167/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index c2fca60..4da3511 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -6473,7 +6473,7 @@
                                                     });
 
                                                     $.ajax({
-                                                        url: createURL('listVmwareDcs'),
+                                                        url: createURL('listVmwareDcs'),
//listVmwareDcs API exists in only non-oss bild
                                                         data: {
                                                             zoneid: args.context.physicalResources[0].id
                                                         },
@@ -6485,15 +6485,21 @@
                                                                 selectedZoneObj.vmwaredcVcenter
= vmwaredcs[0].vcenter;
                                                                 selectedZoneObj.vmwaredcId
= vmwaredcs[0].id;
                                                             }
+                                                        },
+                                                        error: function(XMLHttpResponse)
{ //override default error handling: cloudStack.dialog.notice({ message: parseXMLHttpResponse(XMLHttpResponse)});
                                                     	
+                                                        	if(parseXMLHttpResponse(XMLHttpResponse)
== 'The given command does not exist or it is not available for user')
+                                                        		return; //do nothing
+                                                        	else 
+                                                        		cloudStack.dialog.notice({ message:
parseXMLHttpResponse(XMLHttpResponse)}); //pop up error dialog box if the error is not 'The
given command does not exist or it is not available for user'
                                                         }
                                                     });
 
                                                     // for testing only (begin)
                                                     /*
-                          selectedZoneObj.vmwaredcName = "datacenter";
-                          selectedZoneObj.vmwaredcVcenter = "10.10.20.20";
-                          selectedZoneObj.vmwaredcId = "c3c2562d-65e9-4fc7-92e2-773c2efe8f37";
-                          */
+						                            selectedZoneObj.vmwaredcName = "datacenter";
+						                            selectedZoneObj.vmwaredcVcenter = "10.10.20.20";
+						                            selectedZoneObj.vmwaredcId = "c3c2562d-65e9-4fc7-92e2-773c2efe8f37";
+						                            */
                                                     // for testing only (end)
 
                                                     args.response.success({


Mime
View raw message