airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject airavata-php-gateway git commit: fixing bug
Date Tue, 05 Jul 2016 21:58:29 GMT
Repository: airavata-php-gateway
Updated Branches:
  refs/heads/develop 9de814f69 -> 53c00b3cb


fixing bug


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

Branch: refs/heads/develop
Commit: 53c00b3cb7a1a0a388862747474c8fdcec78d52a
Parents: 9de814f
Author: scnakandala <supun.nakandala@gmail.com>
Authored: Tue Jul 5 17:58:25 2016 -0400
Committer: scnakandala <supun.nakandala@gmail.com>
Committed: Tue Jul 5 17:58:25 2016 -0400

----------------------------------------------------------------------
 app/libraries/ExperimentUtilities.php | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/53c00b3c/app/libraries/ExperimentUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php
index 202c2e0..071e835 100644
--- a/app/libraries/ExperimentUtilities.php
+++ b/app/libraries/ExperimentUtilities.php
@@ -74,6 +74,9 @@ class ExperimentUtilities
             $order[$index] = $input->inputOrder;
         }
         array_multisort($order, SORT_ASC, $experimentInputs);
+
+        $optFilesHtml = "";
+
         if( count( $experimentInputs) > 0 ) { 
             foreach ($experimentInputs as $input) {
                 $matchingAppInput = null;
@@ -102,7 +105,7 @@ class ExperimentUtilities
 
                     foreach($uriList as $uri){
                         if (strpos($uri, "airavata-dp") === 0) {
-                            $dataProductModel = Airavata::getDataProduct(Session::get('authz-token'),
$input->value);
+                            $dataProductModel = Airavata::getDataProduct(Session::get('authz-token'),
$uri);
                             $currentInputPath = "";
                             foreach ($dataProductModel->replicaLocations as $rp) {
                                 if ($rp->replicaLocationCategory == ReplicaLocationCategory::GATEWAY_DATA_STORE)
{
@@ -115,8 +118,8 @@ class ExperimentUtilities
                             $fileName = basename($input->value);
                         }
 
-                        echo '<p>' . $input->name . ':&nbsp;<a target="_blank"
href="' . URL::to("/") . '/download/?id='
-                            . $input->value . '">' . $fileName . ' <span class="glyphicon
glyphicon-new-window"></span></a></p>';
+                        $optFilesHtml = $optFilesHtml . '<a target="_blank" href="' .
URL::to("/") . '/download/?id='
+                            . $input->value . '">' . $fileName . ' <span class="glyphicon
glyphicon-new-window"></span></a>&nbsp;';
 
                     }
 
@@ -125,6 +128,8 @@ class ExperimentUtilities
                     echo '<p>' . $input->name . ':&nbsp;' . $input->value
. '</p>';
                 }
             }
+
+            echo '<p> Optional File Inputs:&nbsp;' . $optFilesHtml;
         }
     }
 


Mime
View raw message