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/master to 0cdda29
Date Fri, 19 Jul 2013 22:22:48 GMT
Updated Branches:
  refs/heads/master cd6853cc1 -> 0cdda2988


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/0cdda298
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0cdda298
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0cdda298

Branch: refs/heads/master
Commit: 0cdda2988ffdd8cb2c63a056bb7cb148e39fe7bf
Parents: cd6853c
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:22:37 2013 -0700

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0cdda298/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