You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@airavata.apache.org by tilaks26 <gi...@git.apache.org> on 2017/06/30 17:50:06 UTC
[GitHub] airavata-php-gateway pull request #58: PGA Enhancements and Bug Fixes
GitHub user tilaks26 opened a pull request:
https://github.com/apache/airavata-php-gateway/pull/58
PGA Enhancements and Bug Fixes
This PR is created for all the changes made to the PGA portal. The following issues were fixed -
[AIRAVATA-2385] - Portal checks for Gateway requests with the same name or URL as that of an already approved/created/deployed Gateway.
[AIRAVATA-2463] - The portal now accepts duplicate Gateway requests.
[AIRAVATA-2199] - The modified flow includes the following states: REQUESTED (when a new Gateway is requested), APPROVED (when a Gateway is approved by the Admin), DENIED (when a Gateway is denied by the Admin), CREATED (when the Gateway details have been filled and the Admin chooses to create a Tenant), DEPLOYED (when the SciGaP Admin deploys a Gateway after which the provider can use it), DEACTIVATED (when the Gateway is no longer in use).
[AIRAVATA-2325] - The auth keys are generated only when the Admin chooses to create the tenant.
[AIRAVATA-2199] - The Gateway status changes to APPROVED when the Admin approves the request and CREATED when the Admin created the tenant.
[AIRAVATA-2079] - An email is sent to the Admin every time a user requests for a new Gateway. Also, an email is sent to the Gateway Provider and Admin when ever there is a change or update in the Gateway details.
[AIRAVATA-2046] - The Admin can edit the gateway request until the tenant is created.
[AIRAVATA-2022] - When a new Gateway is requested, the message displayed is "Your request for Gateway <Gateway Name> has been created."
[AIRAVATA-2404] - When the Admin creates a tenant, the IAMAdminServices's setUpGateway() method is invoked which then generated the Keycloak secret keys.
[AIRAVATA-2446] - The request for a new Gateway now asks for minimal information which includes the Gateway Name, Contact Email ID and Public Project Description. Once approved by the Admin, the provider can update the other details through a form.
[AIRAVATA-1989] - The 'Add a new Gateway' button on the Admin's portal now redirects to a standalone new form where the Admin can create a new Gateway which directly goes into the APPROVED state.
Since there were many changes to be made with respect to the PGA, I have created just one PR with all the changes.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/tilaks26/airavata-php-gateway develop
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/airavata-php-gateway/pull/58.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #58
----
commit f33f4226893cc986df260b7097fc254f69c8c511
Author: Sneha Tilak <ti...@149-160-244-249.dhcp-bl.indiana.edu>
Date: 2017-06-29T21:12:12Z
Adding PGA enhancements and bug fixes
commit 516b13aeb3b765c1dd93b726de06da0c7d4659a5
Author: Sneha Tilak <ti...@149-160-244-249.dhcp-bl.indiana.edu>
Date: 2017-06-29T21:26:28Z
Modifying email function
commit fba2720f89413ff9e7ff113eee9d275a9e71c58c
Author: Sneha Tilak <ti...@149-160-244-249.dhcp-bl.indiana.edu>
Date: 2017-06-30T16:02:30Z
Merge remote-tracking branch 'upstream/develop' into develop
commit 75d43f746797e142a6750e577c8dfb8a4d64525c
Author: Sneha Tilak <ti...@149-160-244-249.dhcp-bl.indiana.edu>
Date: 2017-06-30T17:26:41Z
Modified view to return duplicate gateway requests
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] airavata-php-gateway pull request #58: PGA Enhancements and Bug Fixes
Posted by machristie <gi...@git.apache.org>.
Github user machristie commented on a diff in the pull request:
https://github.com/apache/airavata-php-gateway/pull/58#discussion_r125105421
--- Diff: app/libraries/AdminUtilities.php ---
@@ -58,39 +97,80 @@ public static function get_gateway_approval_statuses()
return $gatewayApprovalStatusObject::$__names;
}
+ public static function update_form( $gatewayId, $gatewayData){
+
+ if( isset( $gatewayData["updateRequest"])) {
+ return TenantProfileService::getGateway( Session::get('authz-token'), $gatewayId);
+ }
+
+ }
+
+ public static function user_update_gateway( $gatewayId, $gatewayData){
+ $gateway = TenantProfileService::getGateway( Session::get('authz-token'), $gatewayId);
+ $gateway->gatewayApprovalStatus = GatewayApprovalStatus::APPROVED;
+ $gateway->emailAddress = $gatewayData["email-address"];
+ $gateway->gatewayURL = $gatewayData["gateway-url"];
+ $gateway->identityServerUserName = $gatewayData["admin-username"];
+ $gateway->identityServerPasswordToken = $gatewayData["admin-password"];
+ $gateway->gatewayAdminFirstName = $gatewayData["admin-firstname"];
+ $gateway->gatewayAdminLastName = $gatewayData["admin-lastname"];
+ $gateway->gatewayAdminEmail = $gatewayData["admin-email"];
+ $gateway->reviewProposalDescription = $gatewayData["project-details"];
+ $gateway->gatewayPublicAbstract = $gatewayData["public-project-description"];
+ if( TenantProfileService::updateGateway( Session::get('authz-token'), $gateway) ){
+ return 1;
+ }
+ else{
+ //Need to find a better way for this.
+ // retun echo "Tenant Name is already in use";
+ return -1;
+ }
+ }
+
public static function update_gateway( $gatewayId, $gatewayData){
- $gateway = Airavata::getGateway( Session::get('authz-token'), $gatewayId);
+ $gateway = TenantProfileService::getGateway( Session::get('authz-token'), $gatewayId);
--- End diff --
I don't think this will work to get a gateway by gatewayId and then update it, when it is possible for multiple gateways to have the same id. I think we need a backend method to get a gateway by the internal id. What do you think? I can add it.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] airavata-php-gateway pull request #58: PGA Enhancements and Bug Fixes
Posted by machristie <gi...@git.apache.org>.
Github user machristie commented on a diff in the pull request:
https://github.com/apache/airavata-php-gateway/pull/58#discussion_r125104911
--- Diff: app/controllers/UpdateController.php ---
@@ -0,0 +1,70 @@
+<?php
+
+class UpdateController extends BaseController
--- End diff --
Can we call this GatewayRequestUpdateController or something?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] airavata-php-gateway pull request #58: PGA Enhancements and Bug Fixes
Posted by machristie <gi...@git.apache.org>.
Github user machristie commented on a diff in the pull request:
https://github.com/apache/airavata-php-gateway/pull/58#discussion_r125108802
--- Diff: app/libraries/AdminUtilities.php ---
@@ -58,39 +97,80 @@ public static function get_gateway_approval_statuses()
return $gatewayApprovalStatusObject::$__names;
}
+ public static function update_form( $gatewayId, $gatewayData){
+
+ if( isset( $gatewayData["updateRequest"])) {
+ return TenantProfileService::getGateway( Session::get('authz-token'), $gatewayId);
+ }
+
+ }
+
+ public static function user_update_gateway( $gatewayId, $gatewayData){
+ $gateway = TenantProfileService::getGateway( Session::get('authz-token'), $gatewayId);
+ $gateway->gatewayApprovalStatus = GatewayApprovalStatus::APPROVED;
+ $gateway->emailAddress = $gatewayData["email-address"];
+ $gateway->gatewayURL = $gatewayData["gateway-url"];
+ $gateway->identityServerUserName = $gatewayData["admin-username"];
+ $gateway->identityServerPasswordToken = $gatewayData["admin-password"];
+ $gateway->gatewayAdminFirstName = $gatewayData["admin-firstname"];
+ $gateway->gatewayAdminLastName = $gatewayData["admin-lastname"];
+ $gateway->gatewayAdminEmail = $gatewayData["admin-email"];
+ $gateway->reviewProposalDescription = $gatewayData["project-details"];
+ $gateway->gatewayPublicAbstract = $gatewayData["public-project-description"];
+ if( TenantProfileService::updateGateway( Session::get('authz-token'), $gateway) ){
+ return 1;
+ }
+ else{
+ //Need to find a better way for this.
+ // retun echo "Tenant Name is already in use";
+ return -1;
+ }
+ }
+
public static function update_gateway( $gatewayId, $gatewayData){
- $gateway = Airavata::getGateway( Session::get('authz-token'), $gatewayId);
+ $gateway = TenantProfileService::getGateway( Session::get('authz-token'), $gatewayId);
--- End diff --
Also I think we can go ahead and merge this pull request and fix this after.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] airavata-php-gateway pull request #58: PGA Enhancements and Bug Fixes
Posted by tilaks26 <gi...@git.apache.org>.
Github user tilaks26 commented on a diff in the pull request:
https://github.com/apache/airavata-php-gateway/pull/58#discussion_r125107007
--- Diff: app/controllers/UpdateController.php ---
@@ -0,0 +1,70 @@
+<?php
+
+class UpdateController extends BaseController
--- End diff --
Sure, Marcus.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] airavata-php-gateway pull request #58: PGA Enhancements and Bug Fixes
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/airavata-php-gateway/pull/58
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---