airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndo...@apache.org
Subject [2/2] airavata-php-gateway git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/airavata-php-gateway into develop
Date Tue, 08 Mar 2016 17:44:33 GMT
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/airavata-php-gateway into
develop

# Conflicts:
#	app/libraries/ExperimentUtilities.php
#	app/routes.php


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

Branch: refs/heads/develop
Commit: 5677e06000004ba1fe9579075de8b08cf20c8b28
Parents: e873f1e e1eca29
Author: Nipurn Doshi <nipunhere@gmail.com>
Authored: Tue Mar 8 12:44:08 2016 -0500
Committer: Nipurn Doshi <nipunhere@gmail.com>
Committed: Tue Mar 8 12:44:08 2016 -0500

----------------------------------------------------------------------
 .../Model/AppCatalog/AppInterface/Types.php     | 23 +++++++++++
 .../Airavata/Model/Experiment/Types.php         | 23 +++++++++++
 app/libraries/Airavata/Model/Process/Types.php  | 23 +++++++++++
 app/libraries/Airavata/Model/Task/Types.php     |  2 +
 app/libraries/ExperimentUtilities.php           | 40 +++++++++++++-------
 app/routes.php                                  |  7 ++--
 6 files changed, 101 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/5677e060/app/libraries/ExperimentUtilities.php
----------------------------------------------------------------------
diff --cc app/libraries/ExperimentUtilities.php
index 1350193,39acdb1..3423d95
--- a/app/libraries/ExperimentUtilities.php
+++ b/app/libraries/ExperimentUtilities.php
@@@ -76,9 -76,10 +76,12 @@@ class ExperimentUtilitie
              if ($input->type == DataType::URI && empty($input->metaData))
{
                  $inputArray = explode('/', $input->value);
                  echo '<p><a target="_blank"
-                         href="' . URL::to("/") . '/download/' . $inputArray[ count($inputArray)-3]
. '/' . $inputArray[ count($inputArray)-2] . '/' . $inputArray[ count($inputArray)-1] . '">'
.
 -                        href="' . URL::to("/") . '/download/' . $inputArray[ count($inputArray)-3]
. '/' .$inputArray[ count($inputArray)-2] . '/' .
 -                $inputArray[ count($inputArray)-1] . '">' .
--                    $inputArray[ count($inputArray)-1] . '
--                <span class="glyphicon glyphicon-new-window"></span></a></p>';
++                        href="' . URL::to("/") . '/download/' . 
++                                    $inputArray[ count($inputArray)-4] . "/" .
++                                    $inputArray[ count($inputArray)-3] . '/' . 
++                                    $inputArray[ count($inputArray)-2] . '/' . 
++                                    $inputArray[ count($inputArray)-1] . '">' .
++                '<span class="glyphicon glyphicon-new-window"></span></a></p>';
              }elseif($input->type == DataType::URI && !empty($input->metaData)
                  && json_decode($input->metaData)->location=="remote"){
                  echo '<p>' . $input->name . ': ' . $input->value . '</p>';
@@@ -650,9 -656,10 +658,13 @@@
                      $outputPathArray = explode("/", $output->value);
  
                      echo '<p>' . $output->name . ' : ' . '<a target="_blank"
-                             href="' . URL::to("/") . '/download/' . $outputPathArray[ count($outputPathArray)-4]
. "/" . $outputPathArray[ count($outputPathArray)-3] . "/" . $outputPathArray[ count($outputPathArray)-2]
. '/' .
 -                            href="' . URL::to("/") . '/download/' . $outputPathArray[ count($outputPathArray)-4]
 -                        . "/" . $outputPathArray[ count($outputPathArray)-3] . "/" . $outputPathArray[
count($outputPathArray)-2] . '/' .
--            $outputPathArray[ count($outputPathArray)-1] . '">' .
--                        $outputPathArray[sizeof($outputPathArray) - 1] . ' <span class="glyphicon
glyphicon-new-window"></span></a></p>';
++                            href="' . URL::to("/") . '/download/' . 
++                                                $outputPathArray[ count($outputPathArray)-5]
. "/" .
++                                                $outputPathArray[ count($outputPathArray)-4]
. "/" . 
++                                                $outputPathArray[ count($outputPathArray)-3]
. "/" . 
++                                                $outputPathArray[ count($outputPathArray)-2]
. '/' . 
++                                                $outputPathArray[ count($outputPathArray)-1]
. '">' .
++                        ' <span class="glyphicon glyphicon-new-window"></span></a></p>';
                  }
  //                else
  //                    echo 'Output paths are not correctly defined for : <br/>' .
$output->name . '<br/><br/> Please report this issue to the admin<br/><br/>';

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/5677e060/app/routes.php
----------------------------------------------------------------------
diff --cc app/routes.php
index 3ba4afa,f91a454..8472021
mode 100755,100755..100644
--- a/app/routes.php
+++ b/app/routes.php
@@@ -97,17 -97,15 +97,18 @@@ Route::get("experiment/browse", "Experi
  
  Route::post("experiment/browse", "ExperimentController@browseView");
  
 -Route::get("download/{exp_data_dir}/{proj_folder}/{exp_folder}/{exp_file}", function($exp_data_dir,
$proj_folder, $exp_folder, $exp_file){
 -    $downloadLink = Config::get('pga_config.airavata')['experiment-data-absolute-path']
. '/' . Session::get('username')
 -        . '/' . $exp_data_dir . "/" . $proj_folder . "/" . $exp_folder . '/' . $exp_file;
 -    return Response::download( $downloadLink);
 -});
++
 +Route::get("download/{username}/{exp_data_dir}/{exp_folder}/{exp_file}", function( $username,
$exp_data_dir, $exp_folder, $exp_file){
 +
 +    if( $username == Session::get("username")){
 +        $downloadLink = Config::get('pga_config.airavata')['experiment-data-absolute-path']
. '/' . $username . '/' . $exp_data_dir . "/" . $exp_folder . '/' . $exp_file;
 +        return Response::download( $downloadLink);
 +    }
- });
++}
  
- Route::get("download/{exp_data_dir}/{exp_file}", function($exp_data_dir, $exp_file){
+ Route::get("download/{exp_data_dir}/{proj_folder}/{exp_file}", function($exp_data_dir, $proj_folder,
$exp_file){
      $downloadLink = Config::get('pga_config.airavata')['experiment-data-absolute-path']
. '/' . Session::get('username')
-         . '/' . $exp_data_dir . '/' . $exp_file;
+         . '/' . $exp_data_dir . '/' . '/' . $proj_folder . '/' . $exp_file;
      return Response::download( $downloadLink);
  });
  


Mime
View raw message