Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 504C5200C0C for ; Mon, 30 Jan 2017 19:51:09 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 4EDD7160B4D; Mon, 30 Jan 2017 18:51:09 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 70CF9160B35 for ; Mon, 30 Jan 2017 19:51:08 +0100 (CET) Received: (qmail 50306 invoked by uid 500); 30 Jan 2017 18:51:07 -0000 Mailing-List: contact commits-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airavata.apache.org Delivered-To: mailing list commits@airavata.apache.org Received: (qmail 50297 invoked by uid 99); 30 Jan 2017 18:51:07 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jan 2017 18:51:07 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 763AEDFC40; Mon, 30 Jan 2017 18:51:07 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: scnakandala@apache.org To: commits@airavata.apache.org Message-Id: <6c857cc51af045a8beba57bf1861891c@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: airavata-php-gateway git commit: AIRAVATA-2266 : When tried to create tenant it asked to enter the auth key and the secret Date: Mon, 30 Jan 2017 18:51:07 +0000 (UTC) archived-at: Mon, 30 Jan 2017 18:51:09 -0000 Repository: airavata-php-gateway Updated Branches: refs/heads/develop 4c47e5408 -> c4c63b78e AIRAVATA-2266 : When tried to create tenant it asked to enter the auth key and the secret Project: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/repo Commit: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/commit/c4c63b78 Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/c4c63b78 Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/c4c63b78 Branch: refs/heads/develop Commit: c4c63b78e4c57b7b80e4082083b25cd8e2395282 Parents: 4c47e54 Author: scnakandala Authored: Mon Jan 30 13:51:02 2017 -0500 Committer: scnakandala Committed: Mon Jan 30 13:51:02 2017 -0500 ---------------------------------------------------------------------- app/views/admin/manage-gateway.blade.php | 70 ++++++++++++--------------- 1 file changed, 30 insertions(+), 40 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/c4c63b78/app/views/admin/manage-gateway.blade.php ---------------------------------------------------------------------- diff --git a/app/views/admin/manage-gateway.blade.php b/app/views/admin/manage-gateway.blade.php index 099bec8..795af43 100644 --- a/app/views/admin/manage-gateway.blade.php +++ b/app/views/admin/manage-gateway.blade.php @@ -638,52 +638,42 @@ dataObj[updateGatewayData[i].name] = updateGatewayData[i].value; } - if( updateVal == "createTenant" && - ( $.trim( dataObj['oauthClientId'] ) == "" || $.trim( dataObj['oauthClientSecret'] ) == "") ){ - $(".submit-actions").before("
Tenant creation requires Oauth Client Id and Oauth Client Secret fields to be filled.
"); - $(".loading-gif").remove(); - } - else - { - $.ajax({ - url: "{{URL::to('/')}}/admin/update-gateway-request", - method: "GET", - data: updateGatewayData - }).done( function( data){ - $(".loading-gif").remove(); - if( data == -1 ){ - //errors only with -1 - if( updateVal == "createTenant"){ - $(".submit-actions").before("
Tenant creation has failed as Tenant with the same Domain name- airavata." + $(".gatewayAcronym").val() + " already exists in Identity Server. Please change Gateway Acronym and try again."); - } - else{ - $(".submit-actions").before("
Error updating Gateway. Please try again."); - } + $.ajax({ + url: "{{URL::to('/')}}/admin/update-gateway-request", + method: "GET", + data: updateGatewayData + }).done( function( data){ + $(".loading-gif").remove(); + if( data == -1 ){ + //errors only with -1 + if( updateVal == "createTenant"){ + $(".submit-actions").before("
Tenant creation has failed as Tenant with the same Domain name- airavata." + $(".gatewayAcronym").val() + " already exists in Identity Server. Please change Gateway Acronym and try again."); } else{ - if( updateVal == "createTenant"){ - $(".submit-actions").before("
Tenant has been created with domain name- airavata." + $(".gatewayAcronym").val()); - $(".notCreatedGateway").addClass("hide"); - - $(".createdGateway").removeClass("hide"); + $(".submit-actions").before("
Error updating Gateway. Please try again."); + } + } + else{ + if( updateVal == "createTenant"){ + $(".submit-actions").before("
Tenant has been created with domain name- airavata." + $(".gatewayAcronym").val()); + $(".notCreatedGateway").addClass("hide"); - } - else{ - $(".submit-actions").before("
Gateway has been updated successfully."); - } + $(".createdGateway").removeClass("hide"); - //refresh data next time if same popup is opened. - var gatewayIdWithoutSpaces = dataObj['gateway_id'].replace(/\s+/g, '-'); - $("#view-" + gatewayIdWithoutSpaces).data("gatewayobject", data); - $("#view-" + gatewayIdWithoutSpaces ).parent().parent().find(".form-gatewayName").html( dataObj['gatewayName']); - $("#view-" + gatewayIdWithoutSpaces ).parent().parent().find(".form-gatewayURL").html( dataObj['gatewayURL']); } - //$(".onTenantComplete").removeClass("hide"); - //$(".onTenantLoad").addClass("hide"); - //$(".onTenantComplete").removeClass("hide"); - }); - } + else{ + $(".submit-actions").before("
Gateway has been updated successfully."); + } + + //refresh data next time if same popup is opened. + var gatewayIdWithoutSpaces = dataObj['gateway_id'].replace(/\s+/g, '-'); + $("#view-" + gatewayIdWithoutSpaces).data("gatewayobject", data); + $("#view-" + gatewayIdWithoutSpaces ).parent().parent().find(".form-gatewayName").html( dataObj['gatewayName']); + $("#view-" + gatewayIdWithoutSpaces ).parent().parent().find(".form-gatewayURL").html( dataObj['gatewayURL']); + } + }); + }); $(".gaStatuses option[value=REQUESTED]").prop("selected", true);