You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by nd...@apache.org on 2016/02/02 22:41:45 UTC

[1/3] airavata-php-gateway git commit: Minor Fix for super admin gateway preferences.

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 <ni...@gmail.com>
Authored: Tue Feb 2 16:39:11 2016 -0500
Committer: Nipurn Doshi <ni...@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];
                 }


[2/3] airavata-php-gateway git commit: Bug Fix

Posted by nd...@apache.org.
Bug Fix


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

Branch: refs/heads/develop
Commit: 5a6cba78b8b94e8c7533fe5bf24f40b55275ab2d
Parents: 428a884
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Tue Feb 2 16:39:40 2016 -0500
Committer: Nipurn Doshi <ni...@gmail.com>
Committed: Tue Feb 2 16:39:40 2016 -0500

----------------------------------------------------------------------
 app/controllers/ExperimentController.php | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/5a6cba78/app/controllers/ExperimentController.php
----------------------------------------------------------------------
diff --git a/app/controllers/ExperimentController.php b/app/controllers/ExperimentController.php
index 342db4a..704aefb 100755
--- a/app/controllers/ExperimentController.php
+++ b/app/controllers/ExperimentController.php
@@ -80,17 +80,17 @@ class ExperimentController extends BaseController
     public function summary()
     {
         $experiment = ExperimentUtilities::get_experiment($_GET['expId']);
-
-        //viewing experiments of other gateways is not allowed if user is not super admin
-        if( $experiment->gatewayId != Session::get("gateway_id") && !Session::has("super-admin"))
-            return CommonUtilities::print_error_message('It seems that you do not have permissions to view this experiment or it belongs to another gateway.');
-        
         if(isset($_GET['isAutoRefresh']) && $_GET['isAutoRefresh'] == 'true'){
             $autoRefresh = true;
         }else{
             $autoRefresh = false;
         }
         if ($experiment != null) {
+
+            //viewing experiments of other gateways is not allowed if user is not super admin
+            if( $experiment->gatewayId != Session::get("gateway_id") && !Session::has("super-admin"))
+                CommonUtilities::print_error_message('It seems that you do not have permissions to view this experiment or it belongs to another gateway.');
+        
             $project = ProjectUtilities::get_project($experiment->projectId);
             $expVal = ExperimentUtilities::get_experiment_values($experiment, $project);
             $jobDetails = ExperimentUtilities::get_job_details($experiment->experimentId);


[3/3] airavata-php-gateway git commit: Removing unneeded code.

Posted by nd...@apache.org.
Removing unneeded code.


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

Branch: refs/heads/develop
Commit: f77cd6fffbd7916d4a828a3b5f30603b5285bdaf
Parents: 5a6cba7
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Tue Feb 2 16:40:18 2016 -0500
Committer: Nipurn Doshi <ni...@gmail.com>
Committed: Tue Feb 2 16:40:18 2016 -0500

----------------------------------------------------------------------
 app/views/admin/manage-experiments.blade.php | 2 --
 app/views/partials/experiment-info.blade.php | 5 ++---
 2 files changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/f77cd6ff/app/views/admin/manage-experiments.blade.php
----------------------------------------------------------------------
diff --git a/app/views/admin/manage-experiments.blade.php b/app/views/admin/manage-experiments.blade.php
index d417032..c29212e 100644
--- a/app/views/admin/manage-experiments.blade.php
+++ b/app/views/admin/manage-experiments.blade.php
@@ -430,8 +430,6 @@ to be uncommented when actually in use.
 
     function getExperiments( startTime, endTime, msg){
 
-        console.log( startTime);
-        console.log( endTime);
         $(".experiment-statistics").html("");
         $(".loading-img-statistics").removeClass("hide");
             $.ajax({

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/f77cd6ff/app/views/partials/experiment-info.blade.php
----------------------------------------------------------------------
diff --git a/app/views/partials/experiment-info.blade.php b/app/views/partials/experiment-info.blade.php
index 2b46d16..d1b0c12 100644
--- a/app/views/partials/experiment-info.blade.php
+++ b/app/views/partials/experiment-info.blade.php
@@ -1,12 +1,11 @@
 <div class="container" style="max-width: 750px;">
-
-    @if(isset( $invalidExperimentId ) )
     <!--
+    @if(isset( $invalidExperimentId ) )
     <div class="alert alert-danger">
         The Experiment ID does not exist. Please go to correct experiment.
     </div>
-    -->
     @else
+    -->
     <h1>
         Experiment Summary
         @if( !isset($dashboard))