airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndo...@apache.org
Subject [1/3] airavata-php-gateway git commit: Minor Fix for super admin gateway preferences.
Date Tue, 02 Feb 2016 21:41:45 GMT
Repository: airavata-php-gateway
Updated Branches:
  refs/heads/develop 828533a11 -> f77cd6fff


Minor Fix for super admin gateway preferences.


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/428a884c
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/428a884c
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/428a884c

Branch: refs/heads/develop
Commit: 428a884cf13841515054ccc572a55b31901a0649
Parents: 828533a
Author: Nipurn Doshi <nipunhere@gmail.com>
Authored: Tue Feb 2 16:39:11 2016 -0500
Committer: Nipurn Doshi <nipunhere@gmail.com>
Committed: Tue Feb 2 16:39:11 2016 -0500

----------------------------------------------------------------------
 app/libraries/CRUtilities.php | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/428a884c/app/libraries/CRUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/CRUtilities.php b/app/libraries/CRUtilities.php
index 6261acd..e38a475 100755
--- a/app/libraries/CRUtilities.php
+++ b/app/libraries/CRUtilities.php
@@ -459,11 +459,17 @@ class CRUtilities
                 if ($gw->gatewayId == $gp->gatewayID) {
                     foreach ((array)$gp->computeResourcePreferences as $i => $crp)
{
                         $gatewayProfiles[$index]->computeResourcePreferences[$i]->crDetails
= Airavata::getComputeResource(Session::get('authz-token'), $crp->computeResourceId);
-                        $selectedCRs[] = $crp->computeResourceId;
+                        
+                        //had to add this condition since for super admin it takes CRs selected
in all gateways.
+                        if( $gp->gatewayID == Session::get("gateway_id"))
+                            $selectedCRs[] = $crp->computeResourceId;
                     }
                     foreach( (array)$gp->storagePreferences as $j => $srp){
                         $gatewayProfiles[$index]->storagePreferences[$j]->srDetails
= Airavata::getStorageResource( Session::get('authz-token'), $srp->storageResourceId);
-                        $selectedSRs[] = $srp->storageResourceId;
+                        
+                        //had to add this condition since for super admin it takes SRs selected
in all gateways.
+                        if( $gp->gatewayID == Session::get("gateway_id"))
+                            $selectedSRs[] = $srp->storageResourceId;
                     }
                     $gateways[$key]->profile = $gatewayProfiles[$index];
                 }


Mime
View raw message