Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C099D105B5 for ; Fri, 19 Jul 2013 22:23:36 +0000 (UTC) Received: (qmail 44064 invoked by uid 500); 19 Jul 2013 22:23:36 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 44021 invoked by uid 500); 19 Jul 2013 22:23:36 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 44014 invoked by uid 99); 19 Jul 2013 22:23:36 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Jul 2013 22:23:36 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 64BFB8AF4CA; Fri, 19 Jul 2013 22:23:36 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jessicawang@apache.org To: commits@cloudstack.apache.org Message-Id: <87f22e61b0e34ce8857cd748fa2b44e9@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: updated refs/heads/4.2 to e2f1416 Date: Fri, 19 Jul 2013 22:23:36 +0000 (UTC) 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 Authored: Fri Jul 19 15:17:14 2013 -0700 Committer: Jessica Wang 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({