You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sc...@apache.org on 2016/03/23 17:56:32 UTC

airavata-php-gateway git commit: fixing cannot download output

Repository: airavata-php-gateway
Updated Branches:
  refs/heads/develop 72a1cb7ed -> bfff10f58


fixing cannot download output


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

Branch: refs/heads/develop
Commit: bfff10f58468ddbd25dabc112974f5ea6aa5acde
Parents: 72a1cb7
Author: scnakandala <su...@gmail.com>
Authored: Wed Mar 23 12:56:25 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Wed Mar 23 12:56:25 2016 -0400

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


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/bfff10f5/app/libraries/ExperimentUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php
index ea46ae8..978e5ec 100644
--- a/app/libraries/ExperimentUtilities.php
+++ b/app/libraries/ExperimentUtilities.php
@@ -7,7 +7,6 @@ use Airavata\API\Error\InvalidRequestException;
 use Airavata\Facades\Airavata;
 use Airavata\Model\Application\Io\DataType;
 use Airavata\Model\AppCatalog\AppInterface\ApplicationInterfaceDescription;
-use Airavata\Model\Application\Io\InputDataObjectType;
 use Airavata\Model\Scheduling\ComputationalResourceSchedulingModel;
 use Airavata\Model\Experiment\ExperimentModel;
 use Airavata\Model\Status\ExperimentState;
@@ -16,6 +15,11 @@ use Airavata\Model\Status\JobState;
 use Airavata\Model\Status\TaskState;
 use Airavata\Model\Task\TaskTypes;
 use Airavata\Model\Experiment\UserConfigurationDataModel;
+use Airavata\Model\Data\Product\DataProductModel;
+use Airavata\Model\Data\Product\DataProductType;
+use Airavata\Model\Data\Product\DataReplicaLocationModel;
+use Airavata\Model\Data\Product\ReplicaLocationCategory;
+use Airavata\Model\Data\Product\ReplicaPersistentType;
 
 class ExperimentUtilities
 {
@@ -298,9 +302,14 @@ class ExperimentUtilities
                     $experimentAssemblySuccessful = false;
                 }
 
+                $experimentInput->type = $applicationInput->type;
+                $dataProductModel = new DataProductModel();
+                $dataProductModel->gatewayId = Config::get("pga_config.airavata")["gateway-id"];
+                $dataProductModel->ownerName = Session::get("username");
+
                 $hostName = $_SERVER['SERVER_NAME'];
                 $experimentInput->value = 'file://' . $hostName . ':' . $filePath;
-                $experimentInput->type = $applicationInput->type;
+
 
             } else {
                 CommonUtilities::print_error_message('I cannot accept this input type yet!');
@@ -625,7 +634,6 @@ class ExperimentUtilities
 
                     echo '<p>' . $output->name . ' : ' . '<a target="_blank"
                             href="' . URL::to("/") . '/download?path=' .
-                                                $outputPathArray[ count($outputPathArray)-5] . "/" .
                                                 $outputPathArray[ count($outputPathArray)-4] . "/" . 
                                                 $outputPathArray[ count($outputPathArray)-3] . "/" . 
                                                 $outputPathArray[ count($outputPathArray)-2] . '/' .