You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2017/02/01 13:36:30 UTC

[01/21] airavata-php-gateway git commit: AIRAVATA-1397 File size detection for opt. input files

Repository: airavata-php-gateway
Updated Branches:
  refs/heads/dreg-gateway fc04148bd -> dae6cd756


AIRAVATA-1397 File size detection for opt. input files


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

Branch: refs/heads/dreg-gateway
Commit: 65ef21b2a8bdaf3d3d32d1faf917554fea45c6ba
Parents: 4ece55f
Author: Marcus Christie <ma...@apache.org>
Authored: Tue Jan 10 16:03:28 2017 -0500
Committer: Marcus Christie <ma...@apache.org>
Committed: Tue Jan 10 16:03:28 2017 -0500

----------------------------------------------------------------------
 app/libraries/ExperimentUtilities.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/65ef21b2/app/libraries/ExperimentUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php
index 92c54e0..d939f7d 100755
--- a/app/libraries/ExperimentUtilities.php
+++ b/app/libraries/ExperimentUtilities.php
@@ -830,7 +830,7 @@ class ExperimentUtilities
         if($appInterface->hasOptionalFileInputs){
             echo '<div>
                 <label>Optional Input Files</label>
-                <input type="file" id="optInputFiles" name="optInputFiles[]" multiple onchange="javascript:updateList()" >
+                <input type="file" class="file-input" id="optInputFiles" name="optInputFiles[]" multiple onchange="javascript:updateList()" >
                 <div id="optFileList"></div>
             </div>';
         }
@@ -870,7 +870,7 @@ class ExperimentUtilities
             CommonUtilities::print_error_message('AiravataSystemException!<br><br>' . $ase->getMessage());
         }
 
-        if(Config::get('pga_config.airavata')["data-sharing-enabled"]){
+        if(Config::get('pga_config.airavata')["data-sharing-enabled"] && $expId){
             ExperimentUtilities::share_experiment($expId, json_decode($share));
         }
 


[11/21] airavata-php-gateway git commit: updating thrift generated libraries

Posted by ma...@apache.org.
updating thrift generated libraries


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

Branch: refs/heads/dreg-gateway
Commit: fd292859d9cfac2013742e7c48424f91a7005985
Parents: bfd2c06
Author: Suresh Marru <sm...@apache.org>
Authored: Fri Jan 20 05:40:24 2017 -0500
Committer: Suresh Marru <sm...@apache.org>
Committed: Fri Jan 20 05:40:24 2017 -0500

----------------------------------------------------------------------
 app/libraries/Airavata/API/Types.php            |   2 +-
 .../Model/AppCatalog/CredetialSummary/Types.php | 210 -----
 .../Airavata/Model/Data/Product/Types.php       | 879 -------------------
 .../Airavata/Model/Data/Resource/Types.php      | 854 ------------------
 4 files changed, 1 insertion(+), 1944 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/fd292859/app/libraries/Airavata/API/Types.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/API/Types.php b/app/libraries/Airavata/API/Types.php
index 389e1ca..84e30af 100644
--- a/app/libraries/Airavata/API/Types.php
+++ b/app/libraries/Airavata/API/Types.php
@@ -35,7 +35,7 @@ final class Constant extends \Thrift\Type\TConstant {
      *              in a change to major/minor version numbers.
      * 
      */
-"0.16.0";
+"0.17.0";
   }
 }
 

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/fd292859/app/libraries/Airavata/Model/AppCatalog/CredetialSummary/Types.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/Model/AppCatalog/CredetialSummary/Types.php b/app/libraries/Airavata/Model/AppCatalog/CredetialSummary/Types.php
deleted file mode 100644
index 2dd144c..0000000
--- a/app/libraries/Airavata/Model/AppCatalog/CredetialSummary/Types.php
+++ /dev/null
@@ -1,210 +0,0 @@
-<?php
-namespace Airavata\Model\AppCatalog\CredetialSummary;
-
-/**
- * Autogenerated by Thrift Compiler (0.9.3)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *  @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class CredentialSummary {
-  static $_TSPEC;
-
-  /**
-   * @var string
-   */
-  public $gatewayId = null;
-  /**
-   * @var string
-   */
-  public $username = null;
-  /**
-   * @var string
-   */
-  public $token = null;
-  /**
-   * @var string
-   */
-  public $publicKey = null;
-  /**
-   * @var int
-   */
-  public $persistedTime = null;
-  /**
-   * @var string
-   */
-  public $description = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'gatewayId',
-          'type' => TType::STRING,
-          ),
-        2 => array(
-          'var' => 'username',
-          'type' => TType::STRING,
-          ),
-        3 => array(
-          'var' => 'token',
-          'type' => TType::STRING,
-          ),
-        4 => array(
-          'var' => 'publicKey',
-          'type' => TType::STRING,
-          ),
-        5 => array(
-          'var' => 'persistedTime',
-          'type' => TType::I64,
-          ),
-        6 => array(
-          'var' => 'description',
-          'type' => TType::STRING,
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['gatewayId'])) {
-        $this->gatewayId = $vals['gatewayId'];
-      }
-      if (isset($vals['username'])) {
-        $this->username = $vals['username'];
-      }
-      if (isset($vals['token'])) {
-        $this->token = $vals['token'];
-      }
-      if (isset($vals['publicKey'])) {
-        $this->publicKey = $vals['publicKey'];
-      }
-      if (isset($vals['persistedTime'])) {
-        $this->persistedTime = $vals['persistedTime'];
-      }
-      if (isset($vals['description'])) {
-        $this->description = $vals['description'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'CredentialSummary';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->gatewayId);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->username);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->token);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 4:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->publicKey);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 5:
-          if ($ftype == TType::I64) {
-            $xfer += $input->readI64($this->persistedTime);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 6:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->description);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('CredentialSummary');
-    if ($this->gatewayId !== null) {
-      $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 1);
-      $xfer += $output->writeString($this->gatewayId);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->username !== null) {
-      $xfer += $output->writeFieldBegin('username', TType::STRING, 2);
-      $xfer += $output->writeString($this->username);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->token !== null) {
-      $xfer += $output->writeFieldBegin('token', TType::STRING, 3);
-      $xfer += $output->writeString($this->token);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->publicKey !== null) {
-      $xfer += $output->writeFieldBegin('publicKey', TType::STRING, 4);
-      $xfer += $output->writeString($this->publicKey);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->persistedTime !== null) {
-      $xfer += $output->writeFieldBegin('persistedTime', TType::I64, 5);
-      $xfer += $output->writeI64($this->persistedTime);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->description !== null) {
-      $xfer += $output->writeFieldBegin('description', TType::STRING, 6);
-      $xfer += $output->writeString($this->description);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/fd292859/app/libraries/Airavata/Model/Data/Product/Types.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/Model/Data/Product/Types.php b/app/libraries/Airavata/Model/Data/Product/Types.php
deleted file mode 100644
index aa26196..0000000
--- a/app/libraries/Airavata/Model/Data/Product/Types.php
+++ /dev/null
@@ -1,879 +0,0 @@
-<?php
-namespace Airavata\Model\Data\Product;
-
-/**
- * Autogenerated by Thrift Compiler (0.9.3)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *  @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-final class ReplicaLocationCategory {
-  const GATEWAY_DATA_STORE = 0;
-  const COMPUTE_RESOURCE = 1;
-  const LONG_TERM_STORAGE_RESOURCE = 2;
-  const OTHER = 3;
-  static public $__names = array(
-    0 => 'GATEWAY_DATA_STORE',
-    1 => 'COMPUTE_RESOURCE',
-    2 => 'LONG_TERM_STORAGE_RESOURCE',
-    3 => 'OTHER',
-  );
-}
-
-final class ReplicaPersistentType {
-  const TRANSIENT = 0;
-  const PERSISTENT = 1;
-  static public $__names = array(
-    0 => 'TRANSIENT',
-    1 => 'PERSISTENT',
-  );
-}
-
-final class DataProductType {
-  const DIR = 0;
-  const FILE = 1;
-  const COLLECTION = 2;
-  static public $__names = array(
-    0 => 'DIR',
-    1 => 'FILE',
-    2 => 'COLLECTION',
-  );
-}
-
-class DataProductModel {
-  static $_TSPEC;
-
-  /**
-   * @var string
-   */
-  public $productUri = null;
-  /**
-   * @var string
-   */
-  public $gatewayId = null;
-  /**
-   * @var string
-   */
-  public $parentProductUri = null;
-  /**
-   * @var string
-   */
-  public $logicalPath = null;
-  /**
-   * @var string
-   */
-  public $productName = null;
-  /**
-   * @var string
-   */
-  public $productDescription = null;
-  /**
-   * @var string
-   */
-  public $ownerName = null;
-  /**
-   * @var int
-   */
-  public $dataProductType = null;
-  /**
-   * @var int
-   */
-  public $productSize = null;
-  /**
-   * @var int
-   */
-  public $creationTime = null;
-  /**
-   * @var int
-   */
-  public $lastModifiedTime = null;
-  /**
-   * @var array
-   */
-  public $productMetadata = null;
-  /**
-   * @var \Airavata\Model\Data\Product\DataReplicaLocationModel[]
-   */
-  public $replicaLocations = null;
-  /**
-   * @var \Airavata\Model\Data\Product\DataProductModel[]
-   */
-  public $childProducts = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'productUri',
-          'type' => TType::STRING,
-          ),
-        2 => array(
-          'var' => 'gatewayId',
-          'type' => TType::STRING,
-          ),
-        3 => array(
-          'var' => 'parentProductUri',
-          'type' => TType::STRING,
-          ),
-        4 => array(
-          'var' => 'logicalPath',
-          'type' => TType::STRING,
-          ),
-        5 => array(
-          'var' => 'productName',
-          'type' => TType::STRING,
-          ),
-        6 => array(
-          'var' => 'productDescription',
-          'type' => TType::STRING,
-          ),
-        7 => array(
-          'var' => 'ownerName',
-          'type' => TType::STRING,
-          ),
-        8 => array(
-          'var' => 'dataProductType',
-          'type' => TType::I32,
-          ),
-        9 => array(
-          'var' => 'productSize',
-          'type' => TType::I32,
-          ),
-        10 => array(
-          'var' => 'creationTime',
-          'type' => TType::I64,
-          ),
-        11 => array(
-          'var' => 'lastModifiedTime',
-          'type' => TType::I64,
-          ),
-        12 => array(
-          'var' => 'productMetadata',
-          'type' => TType::MAP,
-          'ktype' => TType::STRING,
-          'vtype' => TType::STRING,
-          'key' => array(
-            'type' => TType::STRING,
-          ),
-          'val' => array(
-            'type' => TType::STRING,
-            ),
-          ),
-        13 => array(
-          'var' => 'replicaLocations',
-          'type' => TType::LST,
-          'etype' => TType::STRUCT,
-          'elem' => array(
-            'type' => TType::STRUCT,
-            'class' => '\Airavata\Model\Data\Product\DataReplicaLocationModel',
-            ),
-          ),
-        14 => array(
-          'var' => 'childProducts',
-          'type' => TType::LST,
-          'etype' => TType::STRUCT,
-          'elem' => array(
-            'type' => TType::STRUCT,
-            'class' => '\Airavata\Model\Data\Product\DataProductModel',
-            ),
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['productUri'])) {
-        $this->productUri = $vals['productUri'];
-      }
-      if (isset($vals['gatewayId'])) {
-        $this->gatewayId = $vals['gatewayId'];
-      }
-      if (isset($vals['parentProductUri'])) {
-        $this->parentProductUri = $vals['parentProductUri'];
-      }
-      if (isset($vals['logicalPath'])) {
-        $this->logicalPath = $vals['logicalPath'];
-      }
-      if (isset($vals['productName'])) {
-        $this->productName = $vals['productName'];
-      }
-      if (isset($vals['productDescription'])) {
-        $this->productDescription = $vals['productDescription'];
-      }
-      if (isset($vals['ownerName'])) {
-        $this->ownerName = $vals['ownerName'];
-      }
-      if (isset($vals['dataProductType'])) {
-        $this->dataProductType = $vals['dataProductType'];
-      }
-      if (isset($vals['productSize'])) {
-        $this->productSize = $vals['productSize'];
-      }
-      if (isset($vals['creationTime'])) {
-        $this->creationTime = $vals['creationTime'];
-      }
-      if (isset($vals['lastModifiedTime'])) {
-        $this->lastModifiedTime = $vals['lastModifiedTime'];
-      }
-      if (isset($vals['productMetadata'])) {
-        $this->productMetadata = $vals['productMetadata'];
-      }
-      if (isset($vals['replicaLocations'])) {
-        $this->replicaLocations = $vals['replicaLocations'];
-      }
-      if (isset($vals['childProducts'])) {
-        $this->childProducts = $vals['childProducts'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'DataProductModel';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->productUri);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->gatewayId);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->parentProductUri);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 4:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->logicalPath);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 5:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->productName);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 6:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->productDescription);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 7:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->ownerName);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 8:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->dataProductType);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 9:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->productSize);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 10:
-          if ($ftype == TType::I64) {
-            $xfer += $input->readI64($this->creationTime);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 11:
-          if ($ftype == TType::I64) {
-            $xfer += $input->readI64($this->lastModifiedTime);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 12:
-          if ($ftype == TType::MAP) {
-            $this->productMetadata = array();
-            $_size0 = 0;
-            $_ktype1 = 0;
-            $_vtype2 = 0;
-            $xfer += $input->readMapBegin($_ktype1, $_vtype2, $_size0);
-            for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
-            {
-              $key5 = '';
-              $val6 = '';
-              $xfer += $input->readString($key5);
-              $xfer += $input->readString($val6);
-              $this->productMetadata[$key5] = $val6;
-            }
-            $xfer += $input->readMapEnd();
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 13:
-          if ($ftype == TType::LST) {
-            $this->replicaLocations = array();
-            $_size7 = 0;
-            $_etype10 = 0;
-            $xfer += $input->readListBegin($_etype10, $_size7);
-            for ($_i11 = 0; $_i11 < $_size7; ++$_i11)
-            {
-              $elem12 = null;
-              $elem12 = new \Airavata\Model\Data\Product\DataReplicaLocationModel();
-              $xfer += $elem12->read($input);
-              $this->replicaLocations []= $elem12;
-            }
-            $xfer += $input->readListEnd();
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 14:
-          if ($ftype == TType::LST) {
-            $this->childProducts = array();
-            $_size13 = 0;
-            $_etype16 = 0;
-            $xfer += $input->readListBegin($_etype16, $_size13);
-            for ($_i17 = 0; $_i17 < $_size13; ++$_i17)
-            {
-              $elem18 = null;
-              $elem18 = new \Airavata\Model\Data\Product\DataProductModel();
-              $xfer += $elem18->read($input);
-              $this->childProducts []= $elem18;
-            }
-            $xfer += $input->readListEnd();
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('DataProductModel');
-    if ($this->productUri !== null) {
-      $xfer += $output->writeFieldBegin('productUri', TType::STRING, 1);
-      $xfer += $output->writeString($this->productUri);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->gatewayId !== null) {
-      $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 2);
-      $xfer += $output->writeString($this->gatewayId);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->parentProductUri !== null) {
-      $xfer += $output->writeFieldBegin('parentProductUri', TType::STRING, 3);
-      $xfer += $output->writeString($this->parentProductUri);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->logicalPath !== null) {
-      $xfer += $output->writeFieldBegin('logicalPath', TType::STRING, 4);
-      $xfer += $output->writeString($this->logicalPath);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->productName !== null) {
-      $xfer += $output->writeFieldBegin('productName', TType::STRING, 5);
-      $xfer += $output->writeString($this->productName);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->productDescription !== null) {
-      $xfer += $output->writeFieldBegin('productDescription', TType::STRING, 6);
-      $xfer += $output->writeString($this->productDescription);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->ownerName !== null) {
-      $xfer += $output->writeFieldBegin('ownerName', TType::STRING, 7);
-      $xfer += $output->writeString($this->ownerName);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->dataProductType !== null) {
-      $xfer += $output->writeFieldBegin('dataProductType', TType::I32, 8);
-      $xfer += $output->writeI32($this->dataProductType);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->productSize !== null) {
-      $xfer += $output->writeFieldBegin('productSize', TType::I32, 9);
-      $xfer += $output->writeI32($this->productSize);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->creationTime !== null) {
-      $xfer += $output->writeFieldBegin('creationTime', TType::I64, 10);
-      $xfer += $output->writeI64($this->creationTime);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->lastModifiedTime !== null) {
-      $xfer += $output->writeFieldBegin('lastModifiedTime', TType::I64, 11);
-      $xfer += $output->writeI64($this->lastModifiedTime);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->productMetadata !== null) {
-      if (!is_array($this->productMetadata)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('productMetadata', TType::MAP, 12);
-      {
-        $output->writeMapBegin(TType::STRING, TType::STRING, count($this->productMetadata));
-        {
-          foreach ($this->productMetadata as $kiter19 => $viter20)
-          {
-            $xfer += $output->writeString($kiter19);
-            $xfer += $output->writeString($viter20);
-          }
-        }
-        $output->writeMapEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->replicaLocations !== null) {
-      if (!is_array($this->replicaLocations)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('replicaLocations', TType::LST, 13);
-      {
-        $output->writeListBegin(TType::STRUCT, count($this->replicaLocations));
-        {
-          foreach ($this->replicaLocations as $iter21)
-          {
-            $xfer += $iter21->write($output);
-          }
-        }
-        $output->writeListEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->childProducts !== null) {
-      if (!is_array($this->childProducts)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('childProducts', TType::LST, 14);
-      {
-        $output->writeListBegin(TType::STRUCT, count($this->childProducts));
-        {
-          foreach ($this->childProducts as $iter22)
-          {
-            $xfer += $iter22->write($output);
-          }
-        }
-        $output->writeListEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class DataReplicaLocationModel {
-  static $_TSPEC;
-
-  /**
-   * @var string
-   */
-  public $replicaId = null;
-  /**
-   * @var string
-   */
-  public $productUri = null;
-  /**
-   * @var string
-   */
-  public $replicaName = null;
-  /**
-   * @var string
-   */
-  public $replicaDescription = null;
-  /**
-   * @var int
-   */
-  public $creationTime = null;
-  /**
-   * @var int
-   */
-  public $lastModifiedTime = null;
-  /**
-   * @var int
-   */
-  public $validUntilTime = null;
-  /**
-   * @var int
-   */
-  public $replicaLocationCategory = null;
-  /**
-   * @var int
-   */
-  public $replicaPersistentType = null;
-  /**
-   * @var string
-   */
-  public $storageResourceId = null;
-  /**
-   * @var string
-   */
-  public $filePath = null;
-  /**
-   * @var array
-   */
-  public $replicaMetadata = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'replicaId',
-          'type' => TType::STRING,
-          ),
-        2 => array(
-          'var' => 'productUri',
-          'type' => TType::STRING,
-          ),
-        3 => array(
-          'var' => 'replicaName',
-          'type' => TType::STRING,
-          ),
-        4 => array(
-          'var' => 'replicaDescription',
-          'type' => TType::STRING,
-          ),
-        5 => array(
-          'var' => 'creationTime',
-          'type' => TType::I64,
-          ),
-        6 => array(
-          'var' => 'lastModifiedTime',
-          'type' => TType::I64,
-          ),
-        7 => array(
-          'var' => 'validUntilTime',
-          'type' => TType::I64,
-          ),
-        8 => array(
-          'var' => 'replicaLocationCategory',
-          'type' => TType::I32,
-          ),
-        9 => array(
-          'var' => 'replicaPersistentType',
-          'type' => TType::I32,
-          ),
-        10 => array(
-          'var' => 'storageResourceId',
-          'type' => TType::STRING,
-          ),
-        11 => array(
-          'var' => 'filePath',
-          'type' => TType::STRING,
-          ),
-        12 => array(
-          'var' => 'replicaMetadata',
-          'type' => TType::MAP,
-          'ktype' => TType::STRING,
-          'vtype' => TType::STRING,
-          'key' => array(
-            'type' => TType::STRING,
-          ),
-          'val' => array(
-            'type' => TType::STRING,
-            ),
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['replicaId'])) {
-        $this->replicaId = $vals['replicaId'];
-      }
-      if (isset($vals['productUri'])) {
-        $this->productUri = $vals['productUri'];
-      }
-      if (isset($vals['replicaName'])) {
-        $this->replicaName = $vals['replicaName'];
-      }
-      if (isset($vals['replicaDescription'])) {
-        $this->replicaDescription = $vals['replicaDescription'];
-      }
-      if (isset($vals['creationTime'])) {
-        $this->creationTime = $vals['creationTime'];
-      }
-      if (isset($vals['lastModifiedTime'])) {
-        $this->lastModifiedTime = $vals['lastModifiedTime'];
-      }
-      if (isset($vals['validUntilTime'])) {
-        $this->validUntilTime = $vals['validUntilTime'];
-      }
-      if (isset($vals['replicaLocationCategory'])) {
-        $this->replicaLocationCategory = $vals['replicaLocationCategory'];
-      }
-      if (isset($vals['replicaPersistentType'])) {
-        $this->replicaPersistentType = $vals['replicaPersistentType'];
-      }
-      if (isset($vals['storageResourceId'])) {
-        $this->storageResourceId = $vals['storageResourceId'];
-      }
-      if (isset($vals['filePath'])) {
-        $this->filePath = $vals['filePath'];
-      }
-      if (isset($vals['replicaMetadata'])) {
-        $this->replicaMetadata = $vals['replicaMetadata'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'DataReplicaLocationModel';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->replicaId);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->productUri);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->replicaName);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 4:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->replicaDescription);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 5:
-          if ($ftype == TType::I64) {
-            $xfer += $input->readI64($this->creationTime);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 6:
-          if ($ftype == TType::I64) {
-            $xfer += $input->readI64($this->lastModifiedTime);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 7:
-          if ($ftype == TType::I64) {
-            $xfer += $input->readI64($this->validUntilTime);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 8:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->replicaLocationCategory);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 9:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->replicaPersistentType);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 10:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->storageResourceId);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 11:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->filePath);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 12:
-          if ($ftype == TType::MAP) {
-            $this->replicaMetadata = array();
-            $_size23 = 0;
-            $_ktype24 = 0;
-            $_vtype25 = 0;
-            $xfer += $input->readMapBegin($_ktype24, $_vtype25, $_size23);
-            for ($_i27 = 0; $_i27 < $_size23; ++$_i27)
-            {
-              $key28 = '';
-              $val29 = '';
-              $xfer += $input->readString($key28);
-              $xfer += $input->readString($val29);
-              $this->replicaMetadata[$key28] = $val29;
-            }
-            $xfer += $input->readMapEnd();
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('DataReplicaLocationModel');
-    if ($this->replicaId !== null) {
-      $xfer += $output->writeFieldBegin('replicaId', TType::STRING, 1);
-      $xfer += $output->writeString($this->replicaId);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->productUri !== null) {
-      $xfer += $output->writeFieldBegin('productUri', TType::STRING, 2);
-      $xfer += $output->writeString($this->productUri);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->replicaName !== null) {
-      $xfer += $output->writeFieldBegin('replicaName', TType::STRING, 3);
-      $xfer += $output->writeString($this->replicaName);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->replicaDescription !== null) {
-      $xfer += $output->writeFieldBegin('replicaDescription', TType::STRING, 4);
-      $xfer += $output->writeString($this->replicaDescription);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->creationTime !== null) {
-      $xfer += $output->writeFieldBegin('creationTime', TType::I64, 5);
-      $xfer += $output->writeI64($this->creationTime);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->lastModifiedTime !== null) {
-      $xfer += $output->writeFieldBegin('lastModifiedTime', TType::I64, 6);
-      $xfer += $output->writeI64($this->lastModifiedTime);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->validUntilTime !== null) {
-      $xfer += $output->writeFieldBegin('validUntilTime', TType::I64, 7);
-      $xfer += $output->writeI64($this->validUntilTime);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->replicaLocationCategory !== null) {
-      $xfer += $output->writeFieldBegin('replicaLocationCategory', TType::I32, 8);
-      $xfer += $output->writeI32($this->replicaLocationCategory);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->replicaPersistentType !== null) {
-      $xfer += $output->writeFieldBegin('replicaPersistentType', TType::I32, 9);
-      $xfer += $output->writeI32($this->replicaPersistentType);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->storageResourceId !== null) {
-      $xfer += $output->writeFieldBegin('storageResourceId', TType::STRING, 10);
-      $xfer += $output->writeString($this->storageResourceId);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->filePath !== null) {
-      $xfer += $output->writeFieldBegin('filePath', TType::STRING, 11);
-      $xfer += $output->writeString($this->filePath);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->replicaMetadata !== null) {
-      if (!is_array($this->replicaMetadata)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('replicaMetadata', TType::MAP, 12);
-      {
-        $output->writeMapBegin(TType::STRING, TType::STRING, count($this->replicaMetadata));
-        {
-          foreach ($this->replicaMetadata as $kiter30 => $viter31)
-          {
-            $xfer += $output->writeString($kiter30);
-            $xfer += $output->writeString($viter31);
-          }
-        }
-        $output->writeMapEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/fd292859/app/libraries/Airavata/Model/Data/Resource/Types.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/Model/Data/Resource/Types.php b/app/libraries/Airavata/Model/Data/Resource/Types.php
deleted file mode 100644
index cd5542a..0000000
--- a/app/libraries/Airavata/Model/Data/Resource/Types.php
+++ /dev/null
@@ -1,854 +0,0 @@
-<?php
-namespace Airavata\Model\Data\Resource;
-
-/**
- * Autogenerated by Thrift Compiler (0.9.3)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *  @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-final class ReplicaLocationCategory {
-  const GATEWAY_DATA_STORE = 0;
-  const COMPUTE_RESOURCE = 1;
-  const LONG_TERM_STORAGE_RESOURCE = 2;
-  const OTHER = 3;
-  static public $__names = array(
-    0 => 'GATEWAY_DATA_STORE',
-    1 => 'COMPUTE_RESOURCE',
-    2 => 'LONG_TERM_STORAGE_RESOURCE',
-    3 => 'OTHER',
-  );
-}
-
-final class ReplicaPersistentType {
-  const TRANSIENT = 0;
-  const PERSISTENT = 1;
-  static public $__names = array(
-    0 => 'TRANSIENT',
-    1 => 'PERSISTENT',
-  );
-}
-
-final class DataResourceType {
-  const COLLECTION = 0;
-  const FILE = 1;
-  static public $__names = array(
-    0 => 'COLLECTION',
-    1 => 'FILE',
-  );
-}
-
-class DataResourceModel {
-  static $_TSPEC;
-
-  /**
-   * @var string
-   */
-  public $resourceId = null;
-  /**
-   * @var string
-   */
-  public $gatewayId = null;
-  /**
-   * @var string
-   */
-  public $parentResourceId = null;
-  /**
-   * @var string
-   */
-  public $resourceName = null;
-  /**
-   * @var string
-   */
-  public $resourceDescription = null;
-  /**
-   * @var string
-   */
-  public $ownerName = null;
-  /**
-   * @var int
-   */
-  public $dataResourceType = null;
-  /**
-   * @var int
-   */
-  public $resourceSize = null;
-  /**
-   * @var int
-   */
-  public $creationTime = null;
-  /**
-   * @var int
-   */
-  public $lastModifiedTime = null;
-  /**
-   * @var array
-   */
-  public $resourceMetadata = null;
-  /**
-   * @var \Airavata\Model\Data\Resource\DataReplicaLocationModel[]
-   */
-  public $replicaLocations = null;
-  /**
-   * @var \Airavata\Model\Data\Resource\DataResourceModel[]
-   */
-  public $childResources = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'resourceId',
-          'type' => TType::STRING,
-          ),
-        2 => array(
-          'var' => 'gatewayId',
-          'type' => TType::STRING,
-          ),
-        3 => array(
-          'var' => 'parentResourceId',
-          'type' => TType::STRING,
-          ),
-        4 => array(
-          'var' => 'resourceName',
-          'type' => TType::STRING,
-          ),
-        5 => array(
-          'var' => 'resourceDescription',
-          'type' => TType::STRING,
-          ),
-        6 => array(
-          'var' => 'ownerName',
-          'type' => TType::STRING,
-          ),
-        7 => array(
-          'var' => 'dataResourceType',
-          'type' => TType::I32,
-          ),
-        8 => array(
-          'var' => 'resourceSize',
-          'type' => TType::I32,
-          ),
-        9 => array(
-          'var' => 'creationTime',
-          'type' => TType::I64,
-          ),
-        10 => array(
-          'var' => 'lastModifiedTime',
-          'type' => TType::I64,
-          ),
-        11 => array(
-          'var' => 'resourceMetadata',
-          'type' => TType::MAP,
-          'ktype' => TType::STRING,
-          'vtype' => TType::STRING,
-          'key' => array(
-            'type' => TType::STRING,
-          ),
-          'val' => array(
-            'type' => TType::STRING,
-            ),
-          ),
-        12 => array(
-          'var' => 'replicaLocations',
-          'type' => TType::LST,
-          'etype' => TType::STRUCT,
-          'elem' => array(
-            'type' => TType::STRUCT,
-            'class' => '\Airavata\Model\Data\Resource\DataReplicaLocationModel',
-            ),
-          ),
-        13 => array(
-          'var' => 'childResources',
-          'type' => TType::LST,
-          'etype' => TType::STRUCT,
-          'elem' => array(
-            'type' => TType::STRUCT,
-            'class' => '\Airavata\Model\Data\Resource\DataResourceModel',
-            ),
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['resourceId'])) {
-        $this->resourceId = $vals['resourceId'];
-      }
-      if (isset($vals['gatewayId'])) {
-        $this->gatewayId = $vals['gatewayId'];
-      }
-      if (isset($vals['parentResourceId'])) {
-        $this->parentResourceId = $vals['parentResourceId'];
-      }
-      if (isset($vals['resourceName'])) {
-        $this->resourceName = $vals['resourceName'];
-      }
-      if (isset($vals['resourceDescription'])) {
-        $this->resourceDescription = $vals['resourceDescription'];
-      }
-      if (isset($vals['ownerName'])) {
-        $this->ownerName = $vals['ownerName'];
-      }
-      if (isset($vals['dataResourceType'])) {
-        $this->dataResourceType = $vals['dataResourceType'];
-      }
-      if (isset($vals['resourceSize'])) {
-        $this->resourceSize = $vals['resourceSize'];
-      }
-      if (isset($vals['creationTime'])) {
-        $this->creationTime = $vals['creationTime'];
-      }
-      if (isset($vals['lastModifiedTime'])) {
-        $this->lastModifiedTime = $vals['lastModifiedTime'];
-      }
-      if (isset($vals['resourceMetadata'])) {
-        $this->resourceMetadata = $vals['resourceMetadata'];
-      }
-      if (isset($vals['replicaLocations'])) {
-        $this->replicaLocations = $vals['replicaLocations'];
-      }
-      if (isset($vals['childResources'])) {
-        $this->childResources = $vals['childResources'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'DataResourceModel';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->resourceId);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->gatewayId);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->parentResourceId);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 4:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->resourceName);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 5:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->resourceDescription);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 6:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->ownerName);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 7:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->dataResourceType);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 8:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->resourceSize);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 9:
-          if ($ftype == TType::I64) {
-            $xfer += $input->readI64($this->creationTime);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 10:
-          if ($ftype == TType::I64) {
-            $xfer += $input->readI64($this->lastModifiedTime);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 11:
-          if ($ftype == TType::MAP) {
-            $this->resourceMetadata = array();
-            $_size0 = 0;
-            $_ktype1 = 0;
-            $_vtype2 = 0;
-            $xfer += $input->readMapBegin($_ktype1, $_vtype2, $_size0);
-            for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
-            {
-              $key5 = '';
-              $val6 = '';
-              $xfer += $input->readString($key5);
-              $xfer += $input->readString($val6);
-              $this->resourceMetadata[$key5] = $val6;
-            }
-            $xfer += $input->readMapEnd();
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 12:
-          if ($ftype == TType::LST) {
-            $this->replicaLocations = array();
-            $_size7 = 0;
-            $_etype10 = 0;
-            $xfer += $input->readListBegin($_etype10, $_size7);
-            for ($_i11 = 0; $_i11 < $_size7; ++$_i11)
-            {
-              $elem12 = null;
-              $elem12 = new \Airavata\Model\Data\Resource\DataReplicaLocationModel();
-              $xfer += $elem12->read($input);
-              $this->replicaLocations []= $elem12;
-            }
-            $xfer += $input->readListEnd();
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 13:
-          if ($ftype == TType::LST) {
-            $this->childResources = array();
-            $_size13 = 0;
-            $_etype16 = 0;
-            $xfer += $input->readListBegin($_etype16, $_size13);
-            for ($_i17 = 0; $_i17 < $_size13; ++$_i17)
-            {
-              $elem18 = null;
-              $elem18 = new \Airavata\Model\Data\Resource\DataResourceModel();
-              $xfer += $elem18->read($input);
-              $this->childResources []= $elem18;
-            }
-            $xfer += $input->readListEnd();
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('DataResourceModel');
-    if ($this->resourceId !== null) {
-      $xfer += $output->writeFieldBegin('resourceId', TType::STRING, 1);
-      $xfer += $output->writeString($this->resourceId);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->gatewayId !== null) {
-      $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 2);
-      $xfer += $output->writeString($this->gatewayId);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->parentResourceId !== null) {
-      $xfer += $output->writeFieldBegin('parentResourceId', TType::STRING, 3);
-      $xfer += $output->writeString($this->parentResourceId);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->resourceName !== null) {
-      $xfer += $output->writeFieldBegin('resourceName', TType::STRING, 4);
-      $xfer += $output->writeString($this->resourceName);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->resourceDescription !== null) {
-      $xfer += $output->writeFieldBegin('resourceDescription', TType::STRING, 5);
-      $xfer += $output->writeString($this->resourceDescription);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->ownerName !== null) {
-      $xfer += $output->writeFieldBegin('ownerName', TType::STRING, 6);
-      $xfer += $output->writeString($this->ownerName);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->dataResourceType !== null) {
-      $xfer += $output->writeFieldBegin('dataResourceType', TType::I32, 7);
-      $xfer += $output->writeI32($this->dataResourceType);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->resourceSize !== null) {
-      $xfer += $output->writeFieldBegin('resourceSize', TType::I32, 8);
-      $xfer += $output->writeI32($this->resourceSize);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->creationTime !== null) {
-      $xfer += $output->writeFieldBegin('creationTime', TType::I64, 9);
-      $xfer += $output->writeI64($this->creationTime);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->lastModifiedTime !== null) {
-      $xfer += $output->writeFieldBegin('lastModifiedTime', TType::I64, 10);
-      $xfer += $output->writeI64($this->lastModifiedTime);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->resourceMetadata !== null) {
-      if (!is_array($this->resourceMetadata)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('resourceMetadata', TType::MAP, 11);
-      {
-        $output->writeMapBegin(TType::STRING, TType::STRING, count($this->resourceMetadata));
-        {
-          foreach ($this->resourceMetadata as $kiter19 => $viter20)
-          {
-            $xfer += $output->writeString($kiter19);
-            $xfer += $output->writeString($viter20);
-          }
-        }
-        $output->writeMapEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->replicaLocations !== null) {
-      if (!is_array($this->replicaLocations)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('replicaLocations', TType::LST, 12);
-      {
-        $output->writeListBegin(TType::STRUCT, count($this->replicaLocations));
-        {
-          foreach ($this->replicaLocations as $iter21)
-          {
-            $xfer += $iter21->write($output);
-          }
-        }
-        $output->writeListEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->childResources !== null) {
-      if (!is_array($this->childResources)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('childResources', TType::LST, 13);
-      {
-        $output->writeListBegin(TType::STRUCT, count($this->childResources));
-        {
-          foreach ($this->childResources as $iter22)
-          {
-            $xfer += $iter22->write($output);
-          }
-        }
-        $output->writeListEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class DataReplicaLocationModel {
-  static $_TSPEC;
-
-  /**
-   * @var string
-   */
-  public $replicaId = null;
-  /**
-   * @var string
-   */
-  public $resourceId = null;
-  /**
-   * @var string
-   */
-  public $replicaName = null;
-  /**
-   * @var string
-   */
-  public $replicaDescription = null;
-  /**
-   * @var int
-   */
-  public $creationTime = null;
-  /**
-   * @var int
-   */
-  public $lastModifiedTime = null;
-  /**
-   * @var int
-   */
-  public $validUntilTime = null;
-  /**
-   * @var int
-   */
-  public $replicaLocationCategory = null;
-  /**
-   * @var int
-   */
-  public $replicaPersistentType = null;
-  /**
-   * @var string
-   */
-  public $storageResourceId = null;
-  /**
-   * @var string
-   */
-  public $fileAbsolutePath = null;
-  /**
-   * @var array
-   */
-  public $replicaMetadata = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'replicaId',
-          'type' => TType::STRING,
-          ),
-        2 => array(
-          'var' => 'resourceId',
-          'type' => TType::STRING,
-          ),
-        3 => array(
-          'var' => 'replicaName',
-          'type' => TType::STRING,
-          ),
-        4 => array(
-          'var' => 'replicaDescription',
-          'type' => TType::STRING,
-          ),
-        5 => array(
-          'var' => 'creationTime',
-          'type' => TType::I64,
-          ),
-        6 => array(
-          'var' => 'lastModifiedTime',
-          'type' => TType::I64,
-          ),
-        7 => array(
-          'var' => 'validUntilTime',
-          'type' => TType::I64,
-          ),
-        8 => array(
-          'var' => 'replicaLocationCategory',
-          'type' => TType::I32,
-          ),
-        9 => array(
-          'var' => 'replicaPersistentType',
-          'type' => TType::I32,
-          ),
-        10 => array(
-          'var' => 'storageResourceId',
-          'type' => TType::STRING,
-          ),
-        11 => array(
-          'var' => 'fileAbsolutePath',
-          'type' => TType::STRING,
-          ),
-        12 => array(
-          'var' => 'replicaMetadata',
-          'type' => TType::MAP,
-          'ktype' => TType::STRING,
-          'vtype' => TType::STRING,
-          'key' => array(
-            'type' => TType::STRING,
-          ),
-          'val' => array(
-            'type' => TType::STRING,
-            ),
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['replicaId'])) {
-        $this->replicaId = $vals['replicaId'];
-      }
-      if (isset($vals['resourceId'])) {
-        $this->resourceId = $vals['resourceId'];
-      }
-      if (isset($vals['replicaName'])) {
-        $this->replicaName = $vals['replicaName'];
-      }
-      if (isset($vals['replicaDescription'])) {
-        $this->replicaDescription = $vals['replicaDescription'];
-      }
-      if (isset($vals['creationTime'])) {
-        $this->creationTime = $vals['creationTime'];
-      }
-      if (isset($vals['lastModifiedTime'])) {
-        $this->lastModifiedTime = $vals['lastModifiedTime'];
-      }
-      if (isset($vals['validUntilTime'])) {
-        $this->validUntilTime = $vals['validUntilTime'];
-      }
-      if (isset($vals['replicaLocationCategory'])) {
-        $this->replicaLocationCategory = $vals['replicaLocationCategory'];
-      }
-      if (isset($vals['replicaPersistentType'])) {
-        $this->replicaPersistentType = $vals['replicaPersistentType'];
-      }
-      if (isset($vals['storageResourceId'])) {
-        $this->storageResourceId = $vals['storageResourceId'];
-      }
-      if (isset($vals['fileAbsolutePath'])) {
-        $this->fileAbsolutePath = $vals['fileAbsolutePath'];
-      }
-      if (isset($vals['replicaMetadata'])) {
-        $this->replicaMetadata = $vals['replicaMetadata'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'DataReplicaLocationModel';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->replicaId);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->resourceId);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->replicaName);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 4:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->replicaDescription);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 5:
-          if ($ftype == TType::I64) {
-            $xfer += $input->readI64($this->creationTime);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 6:
-          if ($ftype == TType::I64) {
-            $xfer += $input->readI64($this->lastModifiedTime);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 7:
-          if ($ftype == TType::I64) {
-            $xfer += $input->readI64($this->validUntilTime);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 8:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->replicaLocationCategory);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 9:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->replicaPersistentType);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 10:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->storageResourceId);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 11:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->fileAbsolutePath);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 12:
-          if ($ftype == TType::MAP) {
-            $this->replicaMetadata = array();
-            $_size23 = 0;
-            $_ktype24 = 0;
-            $_vtype25 = 0;
-            $xfer += $input->readMapBegin($_ktype24, $_vtype25, $_size23);
-            for ($_i27 = 0; $_i27 < $_size23; ++$_i27)
-            {
-              $key28 = '';
-              $val29 = '';
-              $xfer += $input->readString($key28);
-              $xfer += $input->readString($val29);
-              $this->replicaMetadata[$key28] = $val29;
-            }
-            $xfer += $input->readMapEnd();
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('DataReplicaLocationModel');
-    if ($this->replicaId !== null) {
-      $xfer += $output->writeFieldBegin('replicaId', TType::STRING, 1);
-      $xfer += $output->writeString($this->replicaId);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->resourceId !== null) {
-      $xfer += $output->writeFieldBegin('resourceId', TType::STRING, 2);
-      $xfer += $output->writeString($this->resourceId);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->replicaName !== null) {
-      $xfer += $output->writeFieldBegin('replicaName', TType::STRING, 3);
-      $xfer += $output->writeString($this->replicaName);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->replicaDescription !== null) {
-      $xfer += $output->writeFieldBegin('replicaDescription', TType::STRING, 4);
-      $xfer += $output->writeString($this->replicaDescription);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->creationTime !== null) {
-      $xfer += $output->writeFieldBegin('creationTime', TType::I64, 5);
-      $xfer += $output->writeI64($this->creationTime);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->lastModifiedTime !== null) {
-      $xfer += $output->writeFieldBegin('lastModifiedTime', TType::I64, 6);
-      $xfer += $output->writeI64($this->lastModifiedTime);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->validUntilTime !== null) {
-      $xfer += $output->writeFieldBegin('validUntilTime', TType::I64, 7);
-      $xfer += $output->writeI64($this->validUntilTime);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->replicaLocationCategory !== null) {
-      $xfer += $output->writeFieldBegin('replicaLocationCategory', TType::I32, 8);
-      $xfer += $output->writeI32($this->replicaLocationCategory);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->replicaPersistentType !== null) {
-      $xfer += $output->writeFieldBegin('replicaPersistentType', TType::I32, 9);
-      $xfer += $output->writeI32($this->replicaPersistentType);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->storageResourceId !== null) {
-      $xfer += $output->writeFieldBegin('storageResourceId', TType::STRING, 10);
-      $xfer += $output->writeString($this->storageResourceId);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->fileAbsolutePath !== null) {
-      $xfer += $output->writeFieldBegin('fileAbsolutePath', TType::STRING, 11);
-      $xfer += $output->writeString($this->fileAbsolutePath);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->replicaMetadata !== null) {
-      if (!is_array($this->replicaMetadata)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('replicaMetadata', TType::MAP, 12);
-      {
-        $output->writeMapBegin(TType::STRING, TType::STRING, count($this->replicaMetadata));
-        {
-          foreach ($this->replicaMetadata as $kiter30 => $viter31)
-          {
-            $xfer += $output->writeString($kiter30);
-            $xfer += $output->writeString($viter31);
-          }
-        }
-        $output->writeMapEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-


[04/21] airavata-php-gateway git commit: AIRAVATA-1397 Display error when file upload too big

Posted by ma...@apache.org.
AIRAVATA-1397 Display error when file upload too big

Throws and displays error when file upload exceeds upload_max_filesize
or any other error with uploading the file.


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

Branch: refs/heads/dreg-gateway
Commit: bc6ded07f8067b86846cd171fd8eda27f7d0ccac
Parents: 6cdc2a1
Author: Marcus Christie <ma...@apache.org>
Authored: Wed Jan 18 15:18:38 2017 -0500
Committer: Marcus Christie <ma...@apache.org>
Committed: Wed Jan 18 15:18:38 2017 -0500

----------------------------------------------------------------------
 app/controllers/ExperimentController.php | 17 +++++++++++++++--
 app/libraries/ExperimentUtilities.php    | 12 ++++++++++++
 app/views/experiment/create.blade.php    |  7 +++++++
 app/views/experiment/edit.blade.php      |  6 ++++++
 4 files changed, 40 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/bc6ded07/app/controllers/ExperimentController.php
----------------------------------------------------------------------
diff --git a/app/controllers/ExperimentController.php b/app/controllers/ExperimentController.php
index 7bfd8c5..6f4364f 100755
--- a/app/controllers/ExperimentController.php
+++ b/app/controllers/ExperimentController.php
@@ -89,7 +89,13 @@ class ExperimentController extends BaseController
             }
 
         } else if (isset($_POST['save']) || isset($_POST['launch'])) {
-            $expId = ExperimentUtilities::create_experiment();
+            try {
+                $expId = ExperimentUtilities::create_experiment();
+            } catch (Exception $ex) {
+                Log::error("Failed to create experiment!");
+                Log::error($ex);
+                return Redirect::to("experiment/create")->with("error-message", "Failed to create experiment: " . $ex->getMessage());
+            }
 
             if (isset($_POST['launch']) && $expId) {
                 ExperimentUtilities::launch_experiment($expId);
@@ -354,7 +360,14 @@ class ExperimentController extends BaseController
     public function editSubmit()
     {
         $experiment = ExperimentUtilities::get_experiment(Input::get('expId')); // update local experiment variable
-        $updatedExperiment = ExperimentUtilities::apply_changes_to_experiment($experiment, Input::all());
+        try {
+            $updatedExperiment = ExperimentUtilities::apply_changes_to_experiment($experiment, Input::all());
+        } catch (Exception $ex) {
+            $errMessage = "Failed to update experiment: " . $ex->getMessage();
+            Log::error($errMessage);
+            Log::error($ex);
+            return Redirect::to("experiment/edit?expId=" . urlencode(Input::get('expId')))->with("error-message", $errMessage);
+        }
 
         if(Config::get('pga_config.airavata')["data-sharing-enabled"]){
             if (SharingUtilities::userCanWrite(Session::get("username"), Input::get('expId'), ResourceType::EXPERIMENT)) {

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/bc6ded07/app/libraries/ExperimentUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php
index 0b89df1..005ddee 100755
--- a/app/libraries/ExperimentUtilities.php
+++ b/app/libraries/ExperimentUtilities.php
@@ -396,7 +396,12 @@ class ExperimentUtilities
                 }
             } elseif ($applicationInput->type == DataType::URI) {
                 if ($_FILES[$applicationInput->sanitizedFormName]['name']) {
+
                     $file = $_FILES[$applicationInput->sanitizedFormName];
+                    if ($file['error'] != 0) {
+                        throw new Exception("Failure occurred while uploading file '"
+                            . $file['name'] . "'. File upload error code is " . $file['error'] . ".");
+                    }
 
                     //
                     // move file to experiment data directory
@@ -463,6 +468,13 @@ class ExperimentUtilities
             $uriList = "";
             for($i=0; $i < count($_FILES['optInputFiles']['name']); $i++){
                 if(!empty($_FILES['optInputFiles']['name'][$i])){
+
+                    // Check if there is an error with the upload (like if it exceeded upload_max_filesize)
+                    if ($_FILES['optInputFiles']['error'][$i] != 0) {
+                        throw new Exception("Failure occurred while uploading file '"
+                            . $_FILES['optInputFiles']['name'][$i] . "'. File upload error code is " . $_FILES['optInputFiles']['error'][$i] . ".");
+                    }
+
                     $filePath = ExperimentUtilities::$experimentPath . $_FILES['optInputFiles']['name'][$i];
 
                     // check if file already exists

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/bc6ded07/app/views/experiment/create.blade.php
----------------------------------------------------------------------
diff --git a/app/views/experiment/create.blade.php b/app/views/experiment/create.blade.php
index 82687c0..87225d4 100755
--- a/app/views/experiment/create.blade.php
+++ b/app/views/experiment/create.blade.php
@@ -6,6 +6,13 @@
 @stop
 
 @section('content')
+
+@if( Session::has("error-message" ) )
+    <div class="alert alert-danger">
+        {{{ Session::get("error-message") }}}
+    </div>
+@endif
+
 <div class="col-md-offset-3 col-md-6">
 
     <h1>Create a new experiment</h1>

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/bc6ded07/app/views/experiment/edit.blade.php
----------------------------------------------------------------------
diff --git a/app/views/experiment/edit.blade.php b/app/views/experiment/edit.blade.php
index 52e035b..00fd008 100755
--- a/app/views/experiment/edit.blade.php
+++ b/app/views/experiment/edit.blade.php
@@ -17,6 +17,12 @@
 
 <div class="container">
 
+    @if (Session::has("error-message"))
+        <div class="alert alert-danger">
+            {{{ Session::get("error-message") }}}
+        </div>
+    @endif
+
     <div class="col-md-offset-3 col-md-6">
         <h1>Edit Experiment</h1>
 


[18/21] airavata-php-gateway git commit: fixing AIRAVATA-1885 : Cannot add data movement interface for a new storage resource as scigap admin. Page crashes in PGA

Posted by ma...@apache.org.
fixing AIRAVATA-1885 : Cannot add data movement interface for a new storage resource as scigap admin. Page crashes in PGA


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

Branch: refs/heads/dreg-gateway
Commit: d9cbd6c5cf01b53df94876605509dff5f9655f21
Parents: 9b300d6
Author: scnakandala <su...@gmail.com>
Authored: Fri Jan 27 10:56:18 2017 -0500
Committer: scnakandala <su...@gmail.com>
Committed: Fri Jan 27 10:56:18 2017 -0500

----------------------------------------------------------------------
 app/views/storage-resource/edit.blade.php | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/d9cbd6c5/app/views/storage-resource/edit.blade.php
----------------------------------------------------------------------
diff --git a/app/views/storage-resource/edit.blade.php b/app/views/storage-resource/edit.blade.php
index da80867..1039939 100644
--- a/app/views/storage-resource/edit.blade.php
+++ b/app/views/storage-resource/edit.blade.php
@@ -324,6 +324,7 @@
                     <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
                     <button type="submit" class="btn btn-danger danger">Delete</button>
                 </div>
+            </form>
         </div>
     </div>
 </div>


[19/21] airavata-php-gateway git commit: fixing AIRAVATA-2269 : The gateway admin cannot get access to the gateway even with 'admin' role

Posted by ma...@apache.org.
fixing AIRAVATA-2269 : The gateway admin cannot get access to the gateway even with 'admin' role

There is a bug in WSO2 IS which doest not return the admin role for the default admin user.
Hence as a workaround we manually add it here.


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

Branch: refs/heads/dreg-gateway
Commit: e84cc14fa4dc2ecc050accbba62bea60b1dac72d
Parents: d9cbd6c
Author: scnakandala <su...@gmail.com>
Authored: Fri Jan 27 11:32:01 2017 -0500
Committer: scnakandala <su...@gmail.com>
Committed: Fri Jan 27 11:32:01 2017 -0500

----------------------------------------------------------------------
 app/controllers/AccountController.php | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/e84cc14f/app/controllers/AccountController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php
index da3a6e7..4b83536 100644
--- a/app/controllers/AccountController.php
+++ b/app/controllers/AccountController.php
@@ -180,8 +180,15 @@ class AccountController extends BaseController
 
         $userProfile = WSIS::getUserProfileFromOAuthToken($accessToken);
         $username = $userProfile['username'];
+
         $userRoles = $userProfile['roles'];
 
+        //FIXME There is a bug in WSO2 IS which doest not return the admin role for the default admin user.
+        //FIXME Hence as a workaround we manually add it here.
+        if ($username == Config::get('pga_config.wsis')['admin-username'] ){
+            $userRoles[] = Config::get('pga_config.wsis')['admin-role-name'];
+        }
+
         $authzToken = new Airavata\Model\Security\AuthzToken();
         $authzToken->accessToken = $accessToken;
         $authzToken->claimsMap = array('userName'=>$username, 'gatewayID'=> Config::get('pga_config.airavata')['gateway-id']);


[15/21] airavata-php-gateway git commit: Brand logo modifications for theming.

Posted by ma...@apache.org.
Brand logo modifications for theming.


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

Branch: refs/heads/dreg-gateway
Commit: 6e37d636e2b6069b83cd619368c446d3ea7756bc
Parents: 998ac38
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Wed Jan 25 12:27:49 2017 -0800
Committer: Nipurn Doshi <ni...@gmail.com>
Committed: Wed Jan 25 12:27:49 2017 -0800

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


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/6e37d636/app/libraries/CommonUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/CommonUtilities.php b/app/libraries/CommonUtilities.php
index 4159136..585016f 100644
--- a/app/libraries/CommonUtilities.php
+++ b/app/libraries/CommonUtilities.php
@@ -157,6 +157,12 @@ class CommonUtilities
                 <!-- Collect the nav links, forms, and other content for toggling -->
                 <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-2">
                     <ul class="nav navbar-nav">';
+            
+            $navbar .= '<li>
+                        <a href="' . URL::to("/") . '">
+                            <span class="brand-logo"></span>
+                        </a>
+                        </li>';
 
 
         foreach ($menus as $label => $options) {
@@ -181,8 +187,6 @@ class CommonUtilities
 
             $navbar .= '</ul></li>';
         }
-        if( count( $menus) == 0)
-            $navbar .= '<li class="brand-logo"></li>';
 
         $active = "";
         if(Session::has('loggedin') && 


[07/21] airavata-php-gateway git commit: AIRAVATA-1397 removed savedExp, clonedExp flags

Posted by ma...@apache.org.
AIRAVATA-1397 removed savedExp, clonedExp flags

savedExp wasn't consistently applied, but rather than consistently
applying it I removed this flag along with clonedExp since it doesn't
appear to be needed.  The only relevant fact is whether an existing
experiment is being edited which is easily derivable.


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

Branch: refs/heads/dreg-gateway
Commit: 2232fe650a88968c3d5940abd76ec27bc1605050
Parents: 9e75b85
Author: Marcus Christie <ma...@apache.org>
Authored: Thu Jan 19 10:57:52 2017 -0500
Committer: Marcus Christie <ma...@apache.org>
Committed: Thu Jan 19 10:57:52 2017 -0500

----------------------------------------------------------------------
 app/controllers/ExperimentController.php       | 18 +-----------------
 app/views/partials/experiment-info.blade.php   |  2 +-
 app/views/partials/experiment-inputs.blade.php |  6 +-----
 3 files changed, 3 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/2232fe65/app/controllers/ExperimentController.php
----------------------------------------------------------------------
diff --git a/app/controllers/ExperimentController.php b/app/controllers/ExperimentController.php
index 6f4364f..cb71bfb 100755
--- a/app/controllers/ExperimentController.php
+++ b/app/controllers/ExperimentController.php
@@ -44,15 +44,7 @@ class ExperimentController extends BaseController
             );
 
 
-            $clonedExp = false; $savedExp = false;
-            if( Input::has("clonedExp"))
-                $clonedExp = true;
-            if( Input::has("savedExp"))
-                $savedExp = true;
-
             $experimentInputs = array(
-                "clonedExp" => $clonedExp,
-                "savedExp" => $savedExp,
                 "disabled" => ' disabled',
                 "experimentName" => $_POST['experiment-name'],
                 "experimentDescription" => $_POST['experiment-description'] . ' ',
@@ -281,15 +273,7 @@ class ExperimentController extends BaseController
         $userComputeResourcePreferences = URPUtilities::get_all_user_compute_resource_prefs();
         $userHasComputeResourcePreference = array_key_exists($expVal['scheduling']->resourceHostId, $userComputeResourcePreferences);
 
-        $clonedExp = false; $savedExp = false;
-        if( Input::has("clonedExp"))
-            $clonedExp = true;
-        if( Input::has("savedExp"))
-            $savedExp = true;
-
         $experimentInputs = array(
-            "clonedExp" => $clonedExp,
-            "savedExp" => $savedExp,
             "disabled" => ' ',
             "experimentName" => $experiment->experimentName,
             "experimentDescription" => $experiment->description,
@@ -350,7 +334,7 @@ class ExperimentController extends BaseController
     {
         try{
             $cloneId = ExperimentUtilities::clone_experiment(Input::get('expId'), Input::get('projectId'));
-            return Redirect::to('experiment/edit?expId=' . urlencode($cloneId) . "&clonedExp=true");
+            return Redirect::to('experiment/edit?expId=' . urlencode($cloneId));
         }catch (Exception $ex){
             return Redirect::to("experiment/summary?expId=" . urlencode(Input::get('expId')))
                 ->with("cloning-error", "Failed to clone experiment: " . $ex->getMessage());

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/2232fe65/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 4b4c44b..cb1a156 100644
--- a/app/views/partials/experiment-info.blade.php
+++ b/app/views/partials/experiment-info.blade.php
@@ -250,7 +250,7 @@
                 Cancel
             </button>
             <input type="hidden" name="expId" value="{{{ Input::get('expId') }}}"/>
-            <a href="{{URL::to('/') }}/experiment/edit?expId={{ urlencode($experiment->experimentId) }}&savedExp=true"
+            <a href="{{URL::to('/') }}/experiment/edit?expId={{ urlencode($experiment->experimentId) }}"
                class="btn btn-primary"
                role="button"
                title="Edit experiment" <?php if (!$expVal["editable"]) echo 'style="display: none"' ?>>

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/2232fe65/app/views/partials/experiment-inputs.blade.php
----------------------------------------------------------------------
diff --git a/app/views/partials/experiment-inputs.blade.php b/app/views/partials/experiment-inputs.blade.php
index bd3ef79..90cb2fa 100644
--- a/app/views/partials/experiment-inputs.blade.php
+++ b/app/views/partials/experiment-inputs.blade.php
@@ -14,11 +14,7 @@
 </div>
 <div class="form-group required">
     <label for="project" class="control-label">Project</label>
-    {{-- @if( $expInputs["clonedExp"] || $expInputs["savedExp"]) --}}
         {{ ProjectUtilities::create_project_select($expInputs["project"], false) }}
-    {{-- @else --}}
-        {{-- {{ ProjectUtilities::create_project_select($expInputs["project"], true) }} --}}
-    {{-- @endif --}}
 </div>
 <div class="form-group">
     <label for="application">Application</label>
@@ -35,7 +31,7 @@
         <label>Application Inputs</label>
 
         <div class="well">
-            @if( $expInputs["clonedExp"] || $expInputs["savedExp"])
+            @if( isset( $expInputs['experiment'] ) )
             <div class="form-group">
                 <p><strong>Current Inputs</strong></p>
                 {{ ExperimentUtilities::list_input_files($expInputs['experiment']->experimentInputs) }}


[02/21] airavata-php-gateway git commit: AIRAVATA-1397 Display max upload file size in form

Posted by ma...@apache.org.
AIRAVATA-1397 Display max upload file size in form

Also no longer using 'server-allowed'file-size' from pga_config.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/d0af4e3b
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/d0af4e3b
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/d0af4e3b

Branch: refs/heads/dreg-gateway
Commit: d0af4e3b43c72cfb4c9c405cfe8f39202f439a19
Parents: 65ef21b
Author: Marcus Christie <ma...@apache.org>
Authored: Wed Jan 11 10:16:45 2017 -0500
Committer: Marcus Christie <ma...@apache.org>
Committed: Wed Jan 11 10:18:57 2017 -0500

----------------------------------------------------------------------
 app/config/pga_config.php.template             |  5 ----
 app/controllers/ExperimentController.php       | 26 ++++++++++++++-------
 app/libraries/ExperimentUtilities.php          | 15 ++++++++----
 app/views/experiment/edit.blade.php            |  1 +
 app/views/partials/experiment-inputs.blade.php |  4 ++--
 public/css/bootstrap.min.css                   | 18 ++++++++++++++
 6 files changed, 49 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/d0af4e3b/app/config/pga_config.php.template
----------------------------------------------------------------------
diff --git a/app/config/pga_config.php.template b/app/config/pga_config.php.template
index 7a18f5a..ac378f6 100644
--- a/app/config/pga_config.php.template
+++ b/app/config/pga_config.php.template
@@ -114,11 +114,6 @@ return array(
         'gateway-id' => 'default',
 
         /**
-         * Maximum size of a file which is allowed to upload to the server
-         */
-        'server-allowed-file-size' => 64,
-
-        /**
          * absolute path of the data dir
          */
         'experiment-data-absolute-path' => '/var/www/experimentData',

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/d0af4e3b/app/controllers/ExperimentController.php
----------------------------------------------------------------------
diff --git a/app/controllers/ExperimentController.php b/app/controllers/ExperimentController.php
index 5f1533f..7bfd8c5 100755
--- a/app/controllers/ExperimentController.php
+++ b/app/controllers/ExperimentController.php
@@ -50,13 +50,6 @@ class ExperimentController extends BaseController
             if( Input::has("savedExp"))
                 $savedExp = true;
 
-            // Condition added to deal with php ini default value set for post_max_size issue.
-            $allowedFileSize = Config::get('pga_config.airavata')["server-allowed-file-size"];
-            $serverLimit = intval( ini_get( 'post_max_size') );
-            if( $serverLimit < $allowedFileSize)
-                $allowedFileSize = $serverLimit;
-
-
             $experimentInputs = array(
                 "clonedExp" => $clonedExp,
                 "savedExp" => $savedExp,
@@ -72,7 +65,7 @@ class ExperimentController extends BaseController
                 "computeResources" => $computeResources,
                 "resourceHostId" => null,
                 "advancedOptions" => Config::get('pga_config.airavata')["advanced-experiment-options"],
-                "allowedFileSize" => $allowedFileSize
+                "allowedFileSize" => $this->getAllowedFileSize()
             );
 
             if(Config::get('pga_config.airavata')["data-sharing-enabled"]){
@@ -299,7 +292,7 @@ class ExperimentController extends BaseController
             "userDN" => $experiment->userConfigurationData->userDN,
             "userHasComputeResourcePreference" => $userHasComputeResourcePreference,
             "useUserCRPref" => $experiment->userConfigurationData->useUserCRPref,
-            "allowedFileSize" => Config::get('pga_config.airavata')["server-allowed-file-size"],
+            "allowedFileSize" => $this->getAllowedFileSize(),
             'experiment' => $experiment,
             "queueDefaults" => $queueDefaults,
             'computeResources' => $computeResources,
@@ -503,6 +496,21 @@ class ExperimentController extends BaseController
             return Response::json(array("success" => false, "error" => "Error: failed to update sharing: " . $ex->getMessage()));
         }
     }
+
+    private function getAllowedFileSize()
+    {
+        // Condition added to deal with php ini default value set for post_max_size issue.
+        // NOTE: the following assumes that upload_max_filesize and
+        // post_max_size are in megabytes (for example, if
+        // upload_max_filesize is 8M then $allowedFileSize is 8, but the 'M'
+        // is assumed and not considered)
+        $allowedFileSize = intval( ini_get( 'upload_max_filesize' ) );
+        $serverLimit = intval( ini_get( 'post_max_size' ) );
+        if( $serverLimit < $allowedFileSize) {
+            $allowedFileSize = $serverLimit;
+        }
+        return $allowedFileSize;
+    }
 }
 
 ?>

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/d0af4e3b/app/libraries/ExperimentUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php
index d939f7d..a4fee3b 100755
--- a/app/libraries/ExperimentUtilities.php
+++ b/app/libraries/ExperimentUtilities.php
@@ -753,9 +753,10 @@ class ExperimentUtilities
      * Create form inputs to accept the inputs to the given application
      * @param $id
      * @param $isRequired
+     * @param $allowedFileSize maximum file size in megabytes
      * @internal param $required
      */
-    public static function create_inputs($id, $isRequired)
+    public static function create_inputs($id, $isRequired, $allowedFileSize)
     {
         $inputs = AppUtilities::get_application_inputs($id);
 
@@ -812,8 +813,11 @@ class ExperimentUtilities
                             <label for="experiment-input">' . $input->name . '</label>
                             <div data-file-id="' . $input->sanitizedFormName . '" class="readBytesButtons btn btn-default btn-xs"
                              data-toggle="modal" style="float: right">view file</div>
-                            <input class="file-input" type="file" name="' . $input->sanitizedFormName .
-                                    '" id="' . $input->sanitizedFormName . '" ' . $required . '>
+                             <div class="file-upload-container">
+                                <input class="file-input" type="file" name="' . $input->sanitizedFormName .
+                                        '" id="' . $input->sanitizedFormName . '" ' . $required . '>
+                                    <div class="file-upload-max-size">Max Upload Size: ' . $allowedFileSize .'M</div>
+                             </div>
                             <p class="help-block">' . $input->userFriendlyDescription . '</p>
                             </div>';
                         break;
@@ -830,7 +834,10 @@ class ExperimentUtilities
         if($appInterface->hasOptionalFileInputs){
             echo '<div>
                 <label>Optional Input Files</label>
-                <input type="file" class="file-input" id="optInputFiles" name="optInputFiles[]" multiple onchange="javascript:updateList()" >
+                <div class="file-upload-container">
+                    <input type="file" class="file-input" id="optInputFiles" name="optInputFiles[]" multiple onchange="javascript:updateList()" >
+                    <div class="file-upload-max-size">Max Upload Size: ' . $allowedFileSize .'M</div>
+                </div>
                 <div id="optFileList"></div>
             </div>';
         }

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/d0af4e3b/app/views/experiment/edit.blade.php
----------------------------------------------------------------------
diff --git a/app/views/experiment/edit.blade.php b/app/views/experiment/edit.blade.php
index bfa5331..52e035b 100755
--- a/app/views/experiment/edit.blade.php
+++ b/app/views/experiment/edit.blade.php
@@ -39,6 +39,7 @@
                 This experiment is connected with an Application which is currently not deployed on any Resource. The experiment cannot be launched at the moment.
             </p>
             @endif
+            <input type="hidden" id="allowedFileSize" value="{{ $expInputs['allowedFileSize'] }}"/>
         </form>
     </div>
 

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/d0af4e3b/app/views/partials/experiment-inputs.blade.php
----------------------------------------------------------------------
diff --git a/app/views/partials/experiment-inputs.blade.php b/app/views/partials/experiment-inputs.blade.php
index c2c85f8..dfe9d6c 100644
--- a/app/views/partials/experiment-inputs.blade.php
+++ b/app/views/partials/experiment-inputs.blade.php
@@ -41,9 +41,9 @@
                 {{ ExperimentUtilities::list_input_files($expInputs['experiment']->experimentInputs) }}
                 <hr/>
             </div>
-            {{ ExperimentUtilities::create_inputs($expInputs['application'], false) }}
+            {{ ExperimentUtilities::create_inputs($expInputs['application'], false, $expInputs['allowedFileSize']) }}
             @else
-            {{ ExperimentUtilities::create_inputs($expInputs['application'], true) }}
+            {{ ExperimentUtilities::create_inputs($expInputs['application'], true, $expInputs['allowedFileSize']) }}
             @endif
         </div>
         <!-- Modal to view file inputs-->

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/d0af4e3b/public/css/bootstrap.min.css
----------------------------------------------------------------------
diff --git a/public/css/bootstrap.min.css b/public/css/bootstrap.min.css
index 69ea7f4..0f7ca0c 100644
--- a/public/css/bootstrap.min.css
+++ b/public/css/bootstrap.min.css
@@ -144,4 +144,22 @@ body{
 	top: 0px;
 	bottom: 0px;
 	right: 0px;
+}
+
+.file-upload-container {
+	position: relative;
+	padding-right: 120px;
+}
+.file-upload-container > input[type="file"] {
+	width: 100%;
+}
+.file-upload-container > .file-upload-max-size {
+	position: absolute;
+	right: 0px;
+	top: 50%;
+	/* negative one half of the height of this element (which is approx. font-size * line-height) */
+	margin-top: calc( -1/2 * (12px * 1.42) );
+	font-size: 12px;
+	font-style: italic;
+	color: #737373;
 }
\ No newline at end of file


[16/21] airavata-php-gateway git commit: How to add brand logo

Posted by ma...@apache.org.
How to add brand logo


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

Branch: refs/heads/dreg-gateway
Commit: dc971cb419e89550fa1f0a6875dc930c6016e7d5
Parents: 6e37d63
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Wed Jan 25 12:58:01 2017 -0800
Committer: Nipurn Doshi <ni...@gmail.com>
Committed: Wed Jan 25 12:58:01 2017 -0800

----------------------------------------------------------------------
 public/themes/README | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/dc971cb4/public/themes/README
----------------------------------------------------------------------
diff --git a/public/themes/README b/public/themes/README
index f803f76..2b77383 100644
--- a/public/themes/README
+++ b/public/themes/README
@@ -99,6 +99,16 @@ Register Link:  {{URL::to('/')}}/register
 
 PGA footer mainly includes scripts needed in PGA.
 
+Although, Theme Users can add their Brand logo on the left of the PGA Navbar. 
+Simply add an image as background of class 'brand-logo'.
+Put the image in assets folder and reference it from your custom styles file.
+
+Example css inside custom style file ( assuming it is in assets/css/style.css and image is at assets/img/mylogo.png):
+
+.brand-logo{
+    background: url("../img/mylogo.png");
+}
+
 PGA BODY:
 ------------
 Theme landing page content should be added to  theme1/partials/template.blade.php.


[09/21] airavata-php-gateway git commit: AIRAVATA-1397 edit experiment: add updateList function

Posted by ma...@apache.org.
AIRAVATA-1397 edit experiment: add updateList function

updateList function, which displays a list of optional upload files
selected, was not there on the experiemnt edit page (was only on
experiment create page).


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

Branch: refs/heads/dreg-gateway
Commit: 561fbe3027d83782917732dabcb8327e1c0da85e
Parents: 0edd8bd
Author: Marcus Christie <ma...@apache.org>
Authored: Thu Jan 19 14:41:35 2017 -0500
Committer: Marcus Christie <ma...@apache.org>
Committed: Thu Jan 19 14:41:35 2017 -0500

----------------------------------------------------------------------
 app/views/experiment/edit.blade.php | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/561fbe30/app/views/experiment/edit.blade.php
----------------------------------------------------------------------
diff --git a/app/views/experiment/edit.blade.php b/app/views/experiment/edit.blade.php
index cbefee3..db21068 100755
--- a/app/views/experiment/edit.blade.php
+++ b/app/views/experiment/edit.blade.php
@@ -111,5 +111,16 @@
             }
         });
     });
+
+    updateList = function() {
+        var input = document.getElementById('optInputFiles');
+        var output = document.getElementById('optFileList');
+
+        output.innerHTML = '<ul>';
+        for (var i = 0; i < input.files.length; ++i) {
+            output.innerHTML += '<li>' + input.files.item(i).name + '</li>';
+        }
+        output.innerHTML += '</ul>';
+    }
 </script>
 @stop


[08/21] airavata-php-gateway git commit: AIRAVATA-1397 Fixing editing optional upload files

Posted by ma...@apache.org.
AIRAVATA-1397 Fixing editing optional upload files


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

Branch: refs/heads/dreg-gateway
Commit: 0edd8bdd5aa07023802ff2b82185c5cf6fbc53aa
Parents: 2232fe6
Author: Marcus Christie <ma...@apache.org>
Authored: Thu Jan 19 14:40:37 2017 -0500
Committer: Marcus Christie <ma...@apache.org>
Committed: Thu Jan 19 14:40:37 2017 -0500

----------------------------------------------------------------------
 app/libraries/ExperimentUtilities.php | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/0edd8bdd/app/libraries/ExperimentUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php
index 005ddee..47a0c0e 100755
--- a/app/libraries/ExperimentUtilities.php
+++ b/app/libraries/ExperimentUtilities.php
@@ -475,8 +475,7 @@ class ExperimentUtilities
                             . $_FILES['optInputFiles']['name'][$i] . "'. File upload error code is " . $_FILES['optInputFiles']['error'][$i] . ".");
                     }
 
-                    $filePath = ExperimentUtilities::$experimentPath . $_FILES['optInputFiles']['name'][$i];
-
+                    $filePath = $experimentFilePath . $_FILES['optInputFiles']['name'][$i];
                     // check if file already exists
                     if (is_file($filePath)) {
                         unlink($filePath);


[12/21] airavata-php-gateway git commit: AIRAVATA-2223 Fix sharing disabled bugs

Posted by ma...@apache.org.
AIRAVATA-2223 Fix sharing disabled bugs


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

Branch: refs/heads/dreg-gateway
Commit: b68d9a8d8038dbf03e246fa4b4cb2069f6f28999
Parents: fd29285
Author: Marcus Christie <ma...@iu.edu>
Authored: Fri Jan 20 11:35:07 2017 -0500
Committer: Marcus Christie <ma...@iu.edu>
Committed: Fri Jan 20 11:35:07 2017 -0500

----------------------------------------------------------------------
 app/controllers/ExperimentController.php        |  34 ++-
 app/controllers/ProjectController.php           |  36 ++--
 app/libraries/ExperimentUtilities.php           |   3 +-
 app/libraries/ProjectUtilities.php              |  10 +-
 .../experiment/no-sharing-browse.blade.php      | 214 -------------------
 .../no-sharing-create-complete.blade.php        |  40 ++--
 app/views/experiment/no-sharing-edit.blade.php  |  32 ++-
 .../partials/experiment-container.blade.php     |   6 +-
 app/views/partials/experiment-inputs.blade.php  |   2 +
 app/views/project/browse.blade.php              |   4 +-
 app/views/project/no-sharing-browse.blade.php   | 146 -------------
 app/views/project/no-sharing-create.blade.php   |   4 +-
 app/views/project/no-sharing-edit.blade.php     |   4 +-
 app/views/project/no-sharing-summary.blade.php  |   2 +-
 14 files changed, 93 insertions(+), 444 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/b68d9a8d/app/controllers/ExperimentController.php
----------------------------------------------------------------------
diff --git a/app/controllers/ExperimentController.php b/app/controllers/ExperimentController.php
index cb71bfb..29004d1 100755
--- a/app/controllers/ExperimentController.php
+++ b/app/controllers/ExperimentController.php
@@ -428,29 +428,23 @@ class ExperimentController extends BaseController
             ($pageNo - 1) * $this->limit);
         $experimentStates = ExperimentUtilities::getExpStates();
 
-        if(Config::get('pga_config.airavata')["data-sharing-enabled"]){
-            $can_write = array();
-            foreach ($expContainer as $experiment) {
+        $can_write = array();
+        foreach ($expContainer as $experiment) {
+            if(Config::get('pga_config.airavata')["data-sharing-enabled"]){
                 $can_write[$experiment['experiment']->experimentId] = SharingUtilities::userCanWrite(Session::get("username"), $experiment['experiment']->experimentId, ResourceType::EXPERIMENT);
+            } else {
+                $can_write[$experiment['experiment']->experimentId] = true;
             }
-
-            return View::make('experiment/browse', array(
-                'input' => Input::all(),
-                'pageNo' => $pageNo,
-                'limit' => $this->limit,
-                'expStates' => $experimentStates,
-                'expContainer' => $expContainer,
-                'can_write' => $can_write
-            ));
-        }else{
-            return View::make('experiment/no-sharing-browse', array(
-                'input' => Input::all(),
-                'pageNo' => $pageNo,
-                'limit' => $this->limit,
-                'expStates' => $experimentStates,
-                'expContainer' => $expContainer
-            ));
         }
+
+        return View::make('experiment/browse', array(
+            'input' => Input::all(),
+            'pageNo' => $pageNo,
+            'limit' => $this->limit,
+            'expStates' => $experimentStates,
+            'expContainer' => $expContainer,
+            'can_write' => $can_write
+        ));
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/b68d9a8d/app/controllers/ProjectController.php
----------------------------------------------------------------------
diff --git a/app/controllers/ProjectController.php b/app/controllers/ProjectController.php
index 0322820..7651b25 100755
--- a/app/controllers/ProjectController.php
+++ b/app/controllers/ProjectController.php
@@ -198,32 +198,22 @@ class ProjectController extends BaseController
             $projects = ProjectUtilities::get_all_user_accessible_projects_with_pagination($this->limit, ($pageNo - 1) * $this->limit);
         }
 
-        if(Config::get('pga_config.airavata')["data-sharing-enabled"]){
-            $can_write = array();
-            $user = Session::get("username");
-            foreach($projects as $project) {
-                if (SharingUtilities::userCanWrite($user, $project->projectID, ResourceType::PROJECT)) {
-                    $can_write[$project->projectID] = true;
-                }
-                else {
-                    $can_write[$project->projectID] = false;
-                }
+        $can_write = array();
+        $user = Session::get("username");
+        foreach($projects as $project) {
+            if(Config::get('pga_config.airavata')["data-sharing-enabled"]){
+                $can_write[$project->projectID] = SharingUtilities::userCanWrite($user, $project->projectID, ResourceType::PROJECT);
+            } else {
+                $can_write[$project->projectID] = true;
             }
-
-            return View::make('project/browse', array(
-                'pageNo' => $pageNo,
-                'limit' => $this->limit,
-                'projects' => $projects,
-                'can_write' => $can_write
-            ));
-        }else{
-            return View::make('project/no-sharing-browse', array(
-                'pageNo' => $pageNo,
-                'limit' => $this->limit,
-                'projects' => $projects
-            ));
         }
 
+        return View::make('project/browse', array(
+            'pageNo' => $pageNo,
+            'limit' => $this->limit,
+            'projects' => $projects,
+            'can_write' => $can_write
+        ));
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/b68d9a8d/app/libraries/ExperimentUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php
index 47a0c0e..12718f1 100755
--- a/app/libraries/ExperimentUtilities.php
+++ b/app/libraries/ExperimentUtilities.php
@@ -865,8 +865,6 @@ class ExperimentUtilities
         $experiment = ExperimentUtilities::assemble_experiment();
         $expId = null;
 
-        $share = $_POST['share-settings'];
-
         try {
             if ($experiment) {
                 $expId = Airavata::createExperiment(Session::get('authz-token'), Session::get("gateway_id"), $experiment);
@@ -889,6 +887,7 @@ class ExperimentUtilities
         }
 
         if(Config::get('pga_config.airavata')["data-sharing-enabled"] && $expId){
+            $share = $_POST['share-settings'];
             ExperimentUtilities::share_experiment($expId, json_decode($share));
         }
 

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/b68d9a8d/app/libraries/ProjectUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ProjectUtilities.php b/app/libraries/ProjectUtilities.php
index d5fb338..a02ae69 100755
--- a/app/libraries/ProjectUtilities.php
+++ b/app/libraries/ProjectUtilities.php
@@ -61,10 +61,14 @@ class ProjectUtilities
     {
         $writeableProjects = array();
         $userProjects = ProjectUtilities::get_all_user_projects($gatewayId, $username);
-        foreach($userProjects as $project) {
-            if (SharingUtilities::userCanWrite($username, $project->projectID, ResourceType::PROJECT)) {
-                $writeableProjects[] = $project;
+        if (Config::get('pga_config.airavata')["data-sharing-enabled"]){
+            foreach($userProjects as $project) {
+                if (SharingUtilities::userCanWrite($username, $project->projectID, ResourceType::PROJECT)) {
+                    $writeableProjects[] = $project;
+                }
             }
+        } else {
+            $writeableProjects = $userProjects;
         }
 
         return $writeableProjects;

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/b68d9a8d/app/views/experiment/no-sharing-browse.blade.php
----------------------------------------------------------------------
diff --git a/app/views/experiment/no-sharing-browse.blade.php b/app/views/experiment/no-sharing-browse.blade.php
deleted file mode 100755
index 09e9929..0000000
--- a/app/views/experiment/no-sharing-browse.blade.php
+++ /dev/null
@@ -1,214 +0,0 @@
-@extends('layout.basic')
-
-@section('page-header')
-@parent
-{{ HTML::style('css/datetimepicker.css')}}
-
-@stop
-
-@section('content')
-
-<div class="container" style="max-width: 80%;">
-    <form action="{{URL::to('/')}}/experiment/browse" method="post" class="form-inline" role="form">
-        <div class="panel panel-default">
-            <div class="panel-heading">
-                <h3>Search for Experiments</h3>
-            </div>
-            <div class="panel-body">
-                <div class="form-group">
-                    <label for="search-key">Search by</label>
-                    <select class="form-control" name="search-key" id="search-key">
-                        <?php
-
-                        // set up options for select input
-                        $values = array('experiment-name', 'experiment-description', 'application', 'creation-time');
-                        $labels = array('Experiment Name', 'Experiment Description', 'Application', 'Creation Time');
-                        $disabled = array('', '', '', '');
-
-                        ExperimentUtilities::create_options($values, $labels, $disabled);
-
-                        ?>
-                    </select>
-                </div>
-
-                <div class="form-group search-text-block">
-                    <label for="search-value">for</label>
-                    <input type="search" class="form-control" name="search-value" id="search-value" placeholder="value"
-                           value="<?php if (isset($_POST['search-value'])) echo $_POST['search-value'] ?>">
-                </div>
-
-                <select name="status-type" class="form-control select-status">
-                    <option value="ALL">Status</option>
-                    <?php
-                    foreach ($expStates as $index => $state) {
-                        if (isset($input) && isset($input["status-type"]) && $state == $input["status-type"]) {
-                            echo '<option value="' . $state . '" selected>' . $state . '</option>';
-                        } else {
-                            echo '<option value="' . $state . '">' . $state . '</option>';
-                        }
-                    }
-                    ?>
-                </select>
-
-                <div class="container select-dates hide">
-                    <div class="col-md-12">
-                        Select dates between which you want to search for experiments.
-                    </div>
-                    <div class="col-sm-8" style="height:75px;">
-                        <div class='col-md-6'>
-                            <div class="form-group">
-                                <div class='input-group date' id='datetimepicker9'>
-                                    <input type='text' class="form-control" placeholder="From Date" name="from-date"
-                                           value="<?php if (isset($_POST['from-date'])) echo $_POST['from-date'] ?>"/>
-                        <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span>
-                        </span>
-                                </div>
-                            </div>
-                        </div>
-                        <div class='col-md-6'>
-                            <div class="form-group">
-                                <div class='input-group date' id='datetimepicker10'>
-                                    <input type='text' class="form-control" placeholder="To Date" name="to-date"
-                                           value="<?php if (isset($_POST['to-date'])) echo $_POST['to-date'] ?>"/>
-                        <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span>
-                        </span>
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-
-                <button name="search" type="submit" class="btn btn-primary pull-right" value="Search"><span
-                        class="glyphicon glyphicon-search"></span> Search
-                </button>
-                <p class="help-block">You can use * as a wildcard character. Tip: search for * alone to retrieve all of your
-                    experiments.</p>
-
-            </div>
-        </div>
-
-        <!-- Pagination Handling -->
-        <?php
-        if (isset($expContainer)) {
-            ?>
-            <div class="pull-right btn-toolbar" style="padding-bottom: 5px">
-                <?php
-                if ($pageNo != 1) {
-                    echo '<input class="btn btn-primary btn-xs" type="submit" style="cursor: pointer" name="prev" value="Previous"/>';
-                }
-                if (sizeof($expContainer) > 0) {
-                    echo '<input class="btn btn-primary btn-xs" type="submit" style="cursor: pointer" name="next" value="Next"/>';
-                }
-                ?>
-            </div>
-            <div class="pull-left">
-                <?php if (sizeof($expContainer) != 0) echo 'Showing experiments from ' . strval(($pageNo - 1) * $limit + 1)
-                    . ' to ' . strval(min($pageNo * $limit, ($pageNo - 1) * $limit + sizeof($expContainer))); ?>
-            </div>
-            <input type="hidden" name="pageNo" value="<?php echo($pageNo) ?>"/>
-            <div style="clear: both"></div>
-        <?php
-        }
-        ?>
-    </form>
-
-    @include('partials/experiment-container')
-
-</div>
-
-@stop
-
-@section('scripts')
-@parent
-{{ HTML::script('js/moment.js')}}
-{{ HTML::script('js/datetimepicker-3.1.3.js')}}
-
-<script type="text/javascript">
-
-    $(document).ready(function () {
-
-//------------------------Commenting Client Side filtering--------------------------------------
-//            /* script to make status select work on the UI side itself. */
-//
-//            $(".select-status").on("change", function(){
-//                selectedStatus = this.value;
-//
-//                if( selectedStatus == "ALL")
-//                {
-//                    $("table tr").slideDown();
-//                }
-//                else
-//                {
-//                    $("table tr").each(function(index) {
-//                        if (index != 0) {
-//
-//                            $row = $(this);
-//
-//                            var status = $.trim( $row.find("td:last").text() );
-//                            if (status == selectedStatus )
-//                            {
-//                                $(this).slideDown();
-//                            }
-//                            else {
-//                                $(this).slideUp();
-//                            }
-//                        }
-//                    });
-//                }
-//            });
-
-        /* making datetimepicker work for exp search */
-
-        $('#datetimepicker9').datetimepicker({
-            pick12HourFormat: false
-        });
-        $('#datetimepicker10').datetimepicker({
-            pick12HourFormat: false
-        });
-        $("#datetimepicker9").on("dp.change", function (e) {
-            $('#datetimepicker10').data("DateTimePicker").setMinDate(e.date);
-
-            //hack to close calendar on selecting date
-            $(this).find(".glyphicon-calendar").click();
-        });
-        $("#datetimepicker10").on("dp.change", function (e) {
-            $('#datetimepicker9').data("DateTimePicker").setMaxDate(e.date);
-
-            //hack to close calendar on selecting date
-            $(this).find(".glyphicon-calendar").click();
-        });
-
-        /* selecting creation time */
-        $("#search-key").on("change", function () {
-            if (this.value == "creation-time") {
-                $(".search-text-block").addClass("hide");
-                $(".select-dates").removeClass("hide");
-                $("#search-value").removeAttr("required");
-
-            }
-            else {
-                $(".search-text-block").removeClass("hide");
-                $(".select-dates").addClass("hide");
-                $("#search-value").attr("required");
-            }
-        });
-
-        changeInputVisibility($("#search-key").val());
-
-    });
-
-    function changeInputVisibility(selectedStatus) {
-        if (selectedStatus == "creation-time") {
-            $(".search-text-block").addClass("hide");
-            $(".select-dates").removeClass("hide");
-            $("#search-value").removeAttr("required");
-
-        }
-        else {
-            $(".search-text-block").removeClass("hide");
-            $(".select-dates").addClass("hide");
-            $("#search-value").attr("required");
-        }
-    }
-</script>
-@stop
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/b68d9a8d/app/views/experiment/no-sharing-create-complete.blade.php
----------------------------------------------------------------------
diff --git a/app/views/experiment/no-sharing-create-complete.blade.php b/app/views/experiment/no-sharing-create-complete.blade.php
index 106a7e1..3fef1b1 100755
--- a/app/views/experiment/no-sharing-create-complete.blade.php
+++ b/app/views/experiment/no-sharing-create-complete.blade.php
@@ -41,6 +41,7 @@
 
 @section('scripts')
 @parent
+{{ HTML::script('js/util.js') }}
 <script>
     var warn = true;
 
@@ -51,12 +52,14 @@
 
     $('.file-input').bind('change', function () {
 
-        var inputFileSize = Math.round(this.files[0].size / (1024 * 1024));
-        if (inputFileSize > $("#allowedFileSize").val()) {
-            alert("The input file size is greater than the allowed file size (" + $("#allowedFileSize").val() + " MB) in a form. Please upload another file.");
+        var allowedFileSize = $("#allowedFileSize").val();
+        var tooLargeFilenames = util.validateMaxUploadFileSize(this.files, allowedFileSize);
+
+        if (tooLargeFilenames.length > 0) {
+            var singleOrMultiple = tooLargeFilenames.length === 1 ? " the file [" : " each of the files [";
+            alert("The size of " + singleOrMultiple + tooLargeFilenames.join(", ") + "] is greater than the allowed file size (" + allowedFileSize + " MB) in a form. Please upload another file.");
             $(this).val("");
         }
-
     });
 
     $("#enableEmail").change(function () {
@@ -99,19 +102,22 @@
 
     //Selecting the first option as the default
     $( document ).ready(function() {
-        var crId = $("#compute-resource").val();
-        $(".loading-img ").removeClass("hide");
-        $.ajax({
-            url: '../experiment/getQueueView',
-            type: 'get',
-            data: {crId: crId},
-            success: function (data) {
-                $(".queue-view").html(data);
-                $(".loading-img ").addClass("hide");
-            },error : function(data){
-                $(".loading-img ").addClass("hide");
-            }
-        });
+        var $cr = $("#compute-resource");
+        var crId = $cr.val();
+        if ($cr.children("option").size() === 1 && crId !== "") {
+            $(".loading-img ").removeClass("hide");
+            $.ajax({
+                url: '../experiment/getQueueView',
+                type: 'get',
+                data: {crId: crId},
+                success: function (data) {
+                    $(".queue-view").html(data);
+                    $(".loading-img ").addClass("hide");
+                },error : function(data){
+                    $(".loading-img ").addClass("hide");
+                }
+            });
+        }
     });
 
     //Setting the file input view JS code

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/b68d9a8d/app/views/experiment/no-sharing-edit.blade.php
----------------------------------------------------------------------
diff --git a/app/views/experiment/no-sharing-edit.blade.php b/app/views/experiment/no-sharing-edit.blade.php
index 68d17be..10fa19a 100755
--- a/app/views/experiment/no-sharing-edit.blade.php
+++ b/app/views/experiment/no-sharing-edit.blade.php
@@ -16,6 +16,12 @@
 
 <div class="container">
 
+    @if (Session::has("error-message"))
+        <div class="alert alert-danger">
+            {{{ Session::get("error-message") }}}
+        </div>
+    @endif
+
     <div class="col-md-offset-3 col-md-6">
         <h1>Edit Experiment</h1>
 
@@ -38,14 +44,11 @@
                 This experiment is connected with an Application which is currently not deployed on any Resource. The experiment cannot be launched at the moment.
             </p>
             @endif
+            <input type="hidden" id="allowedFileSize" value="{{ $expInputs['allowedFileSize'] }}"/>
         </form>
     </div>
 
 </div>
-
-{{ HTML::image("assets/Profile_avatar_placeholder_large.png", 'placeholder image', array('class' => 'baseimage')) }}
-
-@include('partials/sharing-form-modal', array("entityName" => "experiment"))
 @stop
 
 
@@ -54,12 +57,14 @@
 <script>
     $('.file-input').bind('change', function () {
 
-        var inputFileSize = Math.round(this.files[0].size / (1024 * 1024));
-        if (inputFileSize > $("#allowedFileSize").val()) {
-            alert("The input file size is greater than the allowed file size (" + $("#allowedFileSize").val() + " MB) in a form. Please upload another file.");
+        var allowedFileSize = $("#allowedFileSize").val();
+        var tooLargeFilenames = util.validateMaxUploadFileSize(this.files, allowedFileSize);
+
+        if (tooLargeFilenames.length > 0) {
+            var singleOrMultiple = tooLargeFilenames.length === 1 ? " the file [" : " each of the files [";
+            alert("The size of " + singleOrMultiple + tooLargeFilenames.join(", ") + "] is greater than the allowed file size (" + allowedFileSize + " MB) in a form. Please upload another file.");
             $(this).val("");
         }
-
     });
 
     $("#enableEmail").change(function () {
@@ -92,5 +97,16 @@
             }
         });
     });
+
+    updateList = function() {
+        var input = document.getElementById('optInputFiles');
+        var output = document.getElementById('optFileList');
+
+        output.innerHTML = '<ul>';
+        for (var i = 0; i < input.files.length; ++i) {
+            output.innerHTML += '<li>' + input.files.item(i).name + '</li>';
+        }
+        output.innerHTML += '</ul>';
+    }
 </script>
 @stop

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/b68d9a8d/app/views/partials/experiment-container.blade.php
----------------------------------------------------------------------
diff --git a/app/views/partials/experiment-container.blade.php b/app/views/partials/experiment-container.blade.php
index 2d28b2d..9f7e347 100644
--- a/app/views/partials/experiment-container.blade.php
+++ b/app/views/partials/experiment-container.blade.php
@@ -28,10 +28,8 @@
                         <a href="{{URL::to('/')}}/experiment/summary?expId={{urlencode($experiment['experiment']->experimentId)}}" target="_blank">
                         {{{ $experiment['experiment']->name }}}
                         </a>
-                        @if(Config::get('pga_config.airavata')["data-sharing-enabled"])
-                            @if( $experiment['expValue']['editable'] and $can_write[$experiment['experiment']->experimentId] === true)
-                                <a href="{{URL::to('/')}}/experiment/edit?expId={{urlencode($experiment['experiment']->experimentId)}}" title="Edit"><span class="glyphicon glyphicon-pencil"></span></a>
-                            @endif
+                        @if( $experiment['expValue']['editable'] and $can_write[$experiment['experiment']->experimentId] === true)
+                            <a href="{{URL::to('/')}}/experiment/edit?expId={{urlencode($experiment['experiment']->experimentId)}}" title="Edit"><span class="glyphicon glyphicon-pencil"></span></a>
                         @endif
                     </td>
                     <td>{{$experiment['experiment']->userName}}</td>

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/b68d9a8d/app/views/partials/experiment-inputs.blade.php
----------------------------------------------------------------------
diff --git a/app/views/partials/experiment-inputs.blade.php b/app/views/partials/experiment-inputs.blade.php
index 90cb2fa..956e99d 100644
--- a/app/views/partials/experiment-inputs.blade.php
+++ b/app/views/partials/experiment-inputs.blade.php
@@ -21,9 +21,11 @@
     {{ ExperimentUtilities::create_application_select($expInputs['application'], false) }}
 </div>
 
+@if (Config::get('pga_config.airavata')["data-sharing-enabled"])
 <div class="form-group">
     @include('partials/sharing-display-body', array("form" => $canEditSharing))
 </div>
+@endif
 
 <div class="panel panel-default">
     <div class="panel-heading">Application configuration</div>

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/b68d9a8d/app/views/project/browse.blade.php
----------------------------------------------------------------------
diff --git a/app/views/project/browse.blade.php b/app/views/project/browse.blade.php
index 8700882..a7e322e 100755
--- a/app/views/project/browse.blade.php
+++ b/app/views/project/browse.blade.php
@@ -108,7 +108,7 @@
                     <td>
                         {{$project->name}}
                         @if($can_write[$project->projectID])
-                        <a href="{{URL::to('/')}}/project/edit?projId={{rawurlencode($project->projectID)}}" title="Edit">
+                        <a href="{{URL::to('/')}}/project/edit?projId={{urlencode($project->projectID)}}" title="Edit">
                             <span class="glyphicon glyphicon-pencil"></span>
                         </a>
                         @endif
@@ -123,7 +123,7 @@
                         <a href="{{URL::to('/')}}/project/summary?projId={{ urlencode($project->projectID) }}">
                             <span class="glyphicon glyphicon-list"></span>
                         </a>
-                        <a href="{{URL::to('/')}}/project/summary?projId={{{ $project->projectID }}}"> View</a>
+                        <a href="{{URL::to('/')}}/project/summary?projId={{ urlencode($project->projectID) }}"> View</a>
                     </td>
                 </tr>
             <?php

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/b68d9a8d/app/views/project/no-sharing-browse.blade.php
----------------------------------------------------------------------
diff --git a/app/views/project/no-sharing-browse.blade.php b/app/views/project/no-sharing-browse.blade.php
deleted file mode 100755
index 7b79e4c..0000000
--- a/app/views/project/no-sharing-browse.blade.php
+++ /dev/null
@@ -1,146 +0,0 @@
-@extends('layout.basic')
-
-@section('page-header')
-@parent
-@stop
-
-@section('content')
-
-<div class="container" style="max-width: 80%;">
-
-    <form action="{{ URL::to('/') }}/project/browse" method="post" class="form-inline" role="form">
-        <div class="panel panel-default">
-            <div class="panel-heading">
-                <h3>Search for Projects</h3>
-            </div>
-            <div class="panel-body">
-                <div class="form-group">
-                    <label for="search-key">Search by</label>
-                    <select class="form-control" name="search-key" id="search-key">
-                        <option value="project-name">Project Name</option>
-                        <option value="project-description">Project description</option>
-                    </select>
-                </div>
-
-                <div class="form-group">
-                    <label for="search-value">for</label>
-                    <input type="search" class="form-control" name="search-value" id="search-value" placeholder="value"
-                           value="<?php if (isset($_POST['search-value'])) echo $_POST['search-value'] ?>">
-                </div>
-
-                <button name="search" type="submit" class="btn btn-primary" value="Search"><span
-                        class="glyphicon glyphicon-search"></span> Search
-                </button>
-                <p class="help-block">You can use * as a wildcard character. Tip: search for * alone to retrieve all of your
-                    projects.</p>
-            </div>
-        </div>
-
-
-        <!-- Pagination Handling -->
-        <?php
-        if (isset($projects)) {
-            ?>
-            <div class="pull-right btn-toolbar" style="padding-bottom: 5px">
-                <?php
-                if ($pageNo != 1) {
-                    echo '<input class="btn btn-primary btn-xs" type="submit" style="cursor: pointer" name="prev" value="Previous"/>';
-                }
-                if (sizeof($projects) > 0) {
-                    echo '<input class="btn btn-primary btn-xs" type="submit" style="cursor: pointer" name="next" value="Next"/>';
-                }
-                ?>
-            </div>
-            <div class="pull-left">
-                <?php if (sizeof($projects) != 0) echo 'Showing projects from ' . strval(($pageNo - 1) * $limit + 1)
-                    . ' to ' . strval(min($pageNo * $limit, ($pageNo - 1) * $limit + sizeof($projects))); ?>
-            </div>
-            <input type="hidden" name="pageNo" value="<?php echo($pageNo) ?>"/>
-            <div style="clear: both"></div>
-        <?php
-        }
-        ?>
-    </form>
-
-
-
-
-
-    <?php
-
-    if (isset($projects))
-    {
-    /**
-     * get results
-     */
-
-    /**
-     * display results
-     */
-    if (sizeof($projects) == 0)
-    {
-        if ($pageNo == 1) {
-            CommonUtilities::print_warning_message('No results found. Please try again.');
-        } else {
-            CommonUtilities::print_warning_message('No more results found.');
-        }
-    }
-    else
-    {
-    ?>
-    <div class="table-responsive">
-        <table class="table">
-
-            <tr>
-
-                <th>Name</th>
-                <th>Owner</th>
-                <th>Creation Time</th>
-                <th>Experiments</th>
-
-            </tr>
-            <?php
-
-            foreach ($projects as $project) {
-
-                ?>
-                <tr>
-                    <td>
-                        {{{ $project->name }}}
-                        <a href="{{URL::to('/')}}/project/edit?projId={{ urlencode($project->projectID) }}" title="Edit">
-                            <span class="glyphicon glyphicon-pencil"></span>
-                        </a>
-                    </td>
-                    <td>
-                        {{$project->owner}}
-                    </td>
-                    <td class="time" unix-time="
-                            <?php echo $project->creationTime / 1000 ?>">
-                    </td>
-                    <td>
-                        <a href="{{URL::to('/')}}/project/summary?projId={{ urlencode($project->projectID) }}">
-                            <span class="glyphicon glyphicon-list"></span>
-                        </a>
-                        <a href="{{URL::to('/')}}/project/summary?projId={{ urlencode($project->projectID) }}"> View</a>
-                    </td>
-                </tr>
-            <?php
-
-            }
-
-            echo '</table>';
-            echo '</div>';
-            }
-
-            }
-
-            ?>
-
-
-    </div>
-
-    @stop
-    @section('scripts')
-    @parent
-    {{ HTML::script('js/time-conversion.js')}}
-    @stop

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/b68d9a8d/app/views/project/no-sharing-create.blade.php
----------------------------------------------------------------------
diff --git a/app/views/project/no-sharing-create.blade.php b/app/views/project/no-sharing-create.blade.php
index 665fe78..2efc0ed 100755
--- a/app/views/project/no-sharing-create.blade.php
+++ b/app/views/project/no-sharing-create.blade.php
@@ -1,6 +1,6 @@
 @extends('layout.basic')
 @section('page-header')
-    @parent
+@parent
 @stop
 
 @section('content')
@@ -30,4 +30,4 @@
 
 </div>
 
-@stop
\ No newline at end of file
+@stop

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/b68d9a8d/app/views/project/no-sharing-edit.blade.php
----------------------------------------------------------------------
diff --git a/app/views/project/no-sharing-edit.blade.php b/app/views/project/no-sharing-edit.blade.php
index 8e17b72..c7da3f9 100755
--- a/app/views/project/no-sharing-edit.blade.php
+++ b/app/views/project/no-sharing-edit.blade.php
@@ -1,7 +1,7 @@
 @extends('layout.basic')
 
 @section('page-header')
-    @parent
+@parent
 @stop
 
 @section('content')
@@ -46,4 +46,4 @@
 
 
 </div>
-@stop
\ No newline at end of file
+@stop

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/b68d9a8d/app/views/project/no-sharing-summary.blade.php
----------------------------------------------------------------------
diff --git a/app/views/project/no-sharing-summary.blade.php b/app/views/project/no-sharing-summary.blade.php
index 48307d5..95bf319 100755
--- a/app/views/project/no-sharing-summary.blade.php
+++ b/app/views/project/no-sharing-summary.blade.php
@@ -1,7 +1,7 @@
 @extends('layout.basic')
 
 @section('page-header')
-    @parent
+@parent
 @stop
 
 @section('content')


[06/21] airavata-php-gateway git commit: AIRAVATA-1397 Fix client side checking for opt input files

Posted by ma...@apache.org.
AIRAVATA-1397 Fix client side checking for opt input files


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

Branch: refs/heads/dreg-gateway
Commit: 9e75b854f6b0f0165f97c5e2095cf8fb5434faa8
Parents: 71f32f4
Author: Marcus Christie <ma...@apache.org>
Authored: Wed Jan 18 16:27:23 2017 -0500
Committer: Marcus Christie <ma...@apache.org>
Committed: Wed Jan 18 16:27:23 2017 -0500

----------------------------------------------------------------------
 app/views/experiment/create-complete.blade.php | 11 +++++----
 app/views/experiment/edit.blade.php            | 11 +++++----
 public/js/util.js                              | 25 ++++++++++++++++++++-
 3 files changed, 38 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/9e75b854/app/views/experiment/create-complete.blade.php
----------------------------------------------------------------------
diff --git a/app/views/experiment/create-complete.blade.php b/app/views/experiment/create-complete.blade.php
index 8860df2..7f085ca 100755
--- a/app/views/experiment/create-complete.blade.php
+++ b/app/views/experiment/create-complete.blade.php
@@ -52,6 +52,7 @@
 </script>
 {{ HTML::script('js/sharing/sharing_utils.js') }}
 {{ HTML::script('js/sharing/share.js') }}
+{{ HTML::script('js/util.js') }}
 <script>
     var warn = true;
 
@@ -62,12 +63,14 @@
 
     $('.file-input').bind('change', function () {
 
-        var inputFileSize = Math.round(this.files[0].size / (1024 * 1024));
-        if (inputFileSize > $("#allowedFileSize").val()) {
-            alert("The input file size is greater than the allowed file size (" + $("#allowedFileSize").val() + " MB) in a form. Please upload another file.");
+        var allowedFileSize = $("#allowedFileSize").val();
+        var tooLargeFilenames = util.validateMaxUploadFileSize(this.files, allowedFileSize);
+
+        if (tooLargeFilenames.length > 0) {
+            var singleOrMultiple = tooLargeFilenames.length === 1 ? " the file [" : " each of the files [";
+            alert("The size of " + singleOrMultiple + tooLargeFilenames.join(", ") + "] is greater than the allowed file size (" + allowedFileSize + " MB) in a form. Please upload another file.");
             $(this).val("");
         }
-
     });
 
     $("#enableEmail").change(function () {

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/9e75b854/app/views/experiment/edit.blade.php
----------------------------------------------------------------------
diff --git a/app/views/experiment/edit.blade.php b/app/views/experiment/edit.blade.php
index 00fd008..cbefee3 100755
--- a/app/views/experiment/edit.blade.php
+++ b/app/views/experiment/edit.blade.php
@@ -67,15 +67,18 @@
 </script>
 {{ HTML::script('js/sharing/sharing_utils.js') }}
 {{ HTML::script('js/sharing/share.js') }}
+{{ HTML::script('js/util.js') }}
 <script>
     $('.file-input').bind('change', function () {
 
-        var inputFileSize = Math.round(this.files[0].size / (1024 * 1024));
-        if (inputFileSize > $("#allowedFileSize").val()) {
-            alert("The input file size is greater than the allowed file size (" + $("#allowedFileSize").val() + " MB) in a form. Please upload another file.");
+        var allowedFileSize = $("#allowedFileSize").val();
+        var tooLargeFilenames = util.validateMaxUploadFileSize(this.files, allowedFileSize);
+
+        if (tooLargeFilenames.length > 0) {
+            var singleOrMultiple = tooLargeFilenames.length === 1 ? " the file [" : " each of the files [";
+            alert("The size of " + singleOrMultiple + tooLargeFilenames.join(", ") + "] is greater than the allowed file size (" + allowedFileSize + " MB) in a form. Please upload another file.");
             $(this).val("");
         }
-
     });
 
     $("#enableEmail").change(function () {

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/9e75b854/public/js/util.js
----------------------------------------------------------------------
diff --git a/public/js/util.js b/public/js/util.js
index c5cbb24..0b7d1e6 100644
--- a/public/js/util.js
+++ b/public/js/util.js
@@ -1,12 +1,35 @@
 
 var util = (function(){
     "use strict";
-    
+
     return {
         sanitizeHTMLId: function(id) {
             // Replace anything that isn't an HTML safe id character with underscore
             // Here safe means allowable by HTML5 and also safe to use in a jQuery selector
             return id.replace(/[^a-zA-Z0-9_-]/g, "_");
+        },
+
+        /**
+         * Return a list of filenames that exceed the given maxUploadFileSize.
+         *
+         * @param fileList is of type FileList
+         * @param maxUploadFileSize is a number of megabytes
+         * @return Array of string filenames. Array is empty if none of the
+         * files exceed the given maxUploadFileSize.
+         */
+        validateMaxUploadFileSize: function(fileList, maxUploadFileSize) {
+
+            var tooLargeFilenames = [];
+            for (var i=0; i < fileList.length; i++) {
+
+                var file = fileList[i];
+                var inputFileSize = file.size / (1024 * 1024);
+                if (inputFileSize > maxUploadFileSize) {
+                    tooLargeFilenames.push(file.name);
+                }
+            }
+
+            return tooLargeFilenames;
         }
     };
 })();
\ No newline at end of file


[05/21] airavata-php-gateway git commit: AIRAVATA-1397 Set upload_max_filesize to 64M in .htaccess

Posted by ma...@apache.org.
AIRAVATA-1397 Set upload_max_filesize to 64M in .htaccess

These settings in .htaccess override whatever is in /etc/php.ini. This
provides a better out of the box default max upload size.


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

Branch: refs/heads/dreg-gateway
Commit: 71f32f4ee5c3eb200750f22aaf45692f3d45c308
Parents: bc6ded0
Author: Marcus Christie <ma...@apache.org>
Authored: Wed Jan 18 15:36:56 2017 -0500
Committer: Marcus Christie <ma...@apache.org>
Committed: Wed Jan 18 15:36:56 2017 -0500

----------------------------------------------------------------------
 public/.htaccess | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/71f32f4e/public/.htaccess
----------------------------------------------------------------------
diff --git a/public/.htaccess b/public/.htaccess
index 77827ae..6963271 100755
--- a/public/.htaccess
+++ b/public/.htaccess
@@ -13,3 +13,8 @@
     RewriteCond %{REQUEST_FILENAME} !-f
     RewriteRule ^ index.php [L]
 </IfModule>
+
+# Allow uploading files up to 64MB in size.
+# NOTE: if you change one of these values you will need to change the other one likewise.
+php_value upload_max_filesize 64M
+php_value post_max_size 64M
\ No newline at end of file


[20/21] airavata-php-gateway git commit: appending the last commit

Posted by ma...@apache.org.
appending the last commit


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

Branch: refs/heads/dreg-gateway
Commit: 3c94537529b0f7f6c6614ec66cc92b5bc7927360
Parents: e84cc14
Author: scnakandala <su...@gmail.com>
Authored: Fri Jan 27 11:38:04 2017 -0500
Committer: scnakandala <su...@gmail.com>
Committed: Fri Jan 27 11:38:04 2017 -0500

----------------------------------------------------------------------
 app/controllers/AccountController.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/3c945375/app/controllers/AccountController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php
index 4b83536..baa8e07 100644
--- a/app/controllers/AccountController.php
+++ b/app/controllers/AccountController.php
@@ -185,7 +185,8 @@ class AccountController extends BaseController
 
         //FIXME There is a bug in WSO2 IS which doest not return the admin role for the default admin user.
         //FIXME Hence as a workaround we manually add it here.
-        if ($username == Config::get('pga_config.wsis')['admin-username'] ){
+        if ($username == Config::get('pga_config.wsis')['admin-username']
+            || $username == Config::get('pga_config.wsis')['admin-username'] . '@' . Config::get('pga_config.wsis')['tenant-domain']){
             $userRoles[] = Config::get('pga_config.wsis')['admin-role-name'];
         }
 


[14/21] airavata-php-gateway git commit: Documentation for Theming added.

Posted by ma...@apache.org.
Documentation for Theming added.


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

Branch: refs/heads/dreg-gateway
Commit: 998ac3816211f3eb485d3f4071c7383cb85746b5
Parents: b0b5152
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Tue Jan 24 13:52:03 2017 -0800
Committer: Nipurn Doshi <ni...@gmail.com>
Committed: Tue Jan 24 13:52:03 2017 -0800

----------------------------------------------------------------------
 public/themes/README                         | 115 ++++++++++++++++++++++
 public/themes/base/partials/header.blade.php |   0
 public/themes/base/partials/header.php       |   0
 3 files changed, 115 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/998ac381/public/themes/README
----------------------------------------------------------------------
diff --git a/public/themes/README b/public/themes/README
new file mode 100644
index 0000000..f803f76
--- /dev/null
+++ b/public/themes/README
@@ -0,0 +1,115 @@
+Theme Documentation ( Read before starting to work on your themes)
+------------
+
+Steps to create your own theme:
+
+1) First thing first, PGA themes use Bootstrap 3.x and Blade as its templating engine as a base for all UI Development. The capability to let users use another UI framework is being worked upon and would be available in the future. If users still want to use another UI framework, they could add it in theme header/footer and it will act as the overwriting entity on anything which Bootstrap has a hold on.
+
+2) Copy <pga-root-folder>/public/themes/base folder in the same 'themes' folder and rename it to your theme. Lets call this folder 'theme1' for the rest of the steps.
+
+3) PGA Theme structure:
+
+Below is how all UIs are layered in a theme. 
+
+ ----------------------------------
+| THEME HEADER                     |
+ ----------------------------------
+| PGA HEADER                       |
+ ----------------------------------
+| PGA BODY (main content)          |
+ ----------------------------------
+| PGA FOOTER                       |
+ ----------------------------------
+| THEME FOOTER                     |
+ ----------------------------------
+
+Folder 'Theme1' contains 4 folders:
+
+- Assets:             All styling, scripts and image files can be kept here and accessed in theme pages using- 
+{{ URL::to('/') }}/themes/{{Session::get('theme')}}/assets/<filename.css>
+Users can create additional folders inside 'assets' for structuring purposes like css, js, img files.
+- Partials:           All HTML blocks and pages which should be included in a theme can be added here. By default, this folder contains header.blade.php, footer.blade.php and template.blade.php and should NOT be deleted.
+- Layouts and Views:  Additional folders to structure extra theme components and plugin layouts if any.
+
+
+
+THEME HEADER:
+------------
+This is the space where Theme creaters can add their theme headers which would
+generally contain styles or links to styles, global navigation for a Scientific gateway having logo/s, links etc which would show across all pages on PGA.
+
+All content for Theme Header can be added in theme1/partials/header.blade.php.
+
+Additional pages other than the landing page can be created and linked to THEME header. The way to do that is add the page content to 'theme1/partials/<page1.blade.php>' and can be referenced/linked from anywhere inside the theme pages with the link: '{{URL::to('/')}}/pages/page1' ( blade.php does not need to be written).
+
+Sample Theme Header content: 
+-----------------------------------
+<title>Theme1</title>
+
+<link href='http://fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic' rel='stylesheet' type='text/css'>
+<link href='http://fonts.googleapis.com/css?family=Arvo:400,700' rel='stylesheet' type='text/css'>
+
+<link media="all" type="text/css" rel="stylesheet" href="{{ URL::to('/') }}/themes/{{Session::get('theme')}}/assets/css/style.css"/>
+
+<div class="container-fluid">
+    <nav class="nav navbar-default navbar-inverse">
+        <!-- Brand and toggle get grouped for better mobile display -->
+    <!--    <div class="navbar-header page-scroll" id="home">
+            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
+                <span class="sr-only">Toggle navigation</span>
+                <span class="icon-bar"></span>
+                <span class="icon-bar"></span>
+                <span class="icon-bar"></span>
+            </button>
+            <a class="navbar-brand page-scroll" href="{{ URL::to('/') }}/home">
+                THEME 1
+            </a>
+        </div>
+
+        <!-- Collect the nav links, forms, and other content for toggling -->
+        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
+            <ul class="nav navbar-nav navbar-right">
+                <li>
+                    <a href="{{URL::to('/')}}/pages/documentation">Documentation</a>
+                </li>
+                <li>
+                    <a href="{{URL::to('/')}}/pages/publications">Publications</a>
+                </li>
+                <li>
+                    <a href="{{URL::to('/')}}/pages/about">About</a>
+                </li>
+                <li>
+                    <a href="{{URL::to('/')}}/pages/contact">Contact</a>
+                </li>
+            </ul>
+        </div>
+        <!-- /.navbar-collapse -->
+<!--</nav>
+</div>
+-----------------------------------
+
+PGA HEADER and PGA FOOTER:
+------------
+All layout files which help PGA dashboard to run smoothly exist in this layer and should NOT be changed. Any changes done to these files will get removed on updating PGA. 
+
+PGA header contains a default navbar which helps to navigate throughout user dashboard. A simple capability to remove this navbar before users log in, exists in pga_config.php where they can set 'theme-based-login-links-configured' to true.
+Before setting this property to true, please ensure that Login and Register links are configured somewhere in THEME HEADER.
+Login Link:     {{URL::to('/')}}/login
+Register Link:  {{URL::to('/')}}/register
+
+PGA footer mainly includes scripts needed in PGA.
+
+PGA BODY:
+------------
+Theme landing page content should be added to  theme1/partials/template.blade.php.
+
+Any other pages ( outside of PGA Dashboard) can also be created inside theme1/partials/<page1.blade.php> and can be referenced/linked from anywhere inside the theme pages with the link: '{{URL::to('/')}}/pages/page1' ( blade.php does not need to be written). This helps to add global links to THEME HEADER like About, Contact, Documentation etc.
+
+
+THEME FOOTER:
+------------
+Global theme footer can be added to THEME FOOTER layer. It is recommended that all script files and/or their links are added in Theme footer instead of Header unless necessary.
+
+Since THEME FOOTER is the last layer, it helps to overwrite any scripts included before by PGA HEADER/PGA FOOTER. 
+
+All content for Theme Footer can be added in theme1/partials/footer.blade.php.

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/998ac381/public/themes/base/partials/header.blade.php
----------------------------------------------------------------------
diff --git a/public/themes/base/partials/header.blade.php b/public/themes/base/partials/header.blade.php
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/998ac381/public/themes/base/partials/header.php
----------------------------------------------------------------------
diff --git a/public/themes/base/partials/header.php b/public/themes/base/partials/header.php
deleted file mode 100644
index e69de29..0000000


[13/21] airavata-php-gateway git commit: AIRAVATA-2223 Remove $experiment_can_write check when sharing disabled

Posted by ma...@apache.org.
AIRAVATA-2223 Remove $experiment_can_write check when sharing disabled


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

Branch: refs/heads/dreg-gateway
Commit: b0b5152e553e8c78cac5334501ba46950470e183
Parents: b68d9a8
Author: Marcus Christie <ma...@iu.edu>
Authored: Fri Jan 20 11:51:33 2017 -0500
Committer: Marcus Christie <ma...@iu.edu>
Committed: Fri Jan 20 11:51:33 2017 -0500

----------------------------------------------------------------------
 app/views/project/no-sharing-summary.blade.php | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/b0b5152e/app/views/project/no-sharing-summary.blade.php
----------------------------------------------------------------------
diff --git a/app/views/project/no-sharing-summary.blade.php b/app/views/project/no-sharing-summary.blade.php
index 95bf319..595ff43 100755
--- a/app/views/project/no-sharing-summary.blade.php
+++ b/app/views/project/no-sharing-summary.blade.php
@@ -60,9 +60,7 @@
                         <a href="{{URL::to('/')}}/experiment/summary?expId={{urlencode($experiment->experimentId)}}">
                         {{{ $experiment->experimentName }}}
                         </a>
-                        @if( $expValues['editable'] and $experiment_can_write[$experiment->experimentId] === true)
-                            <a href="{{URL::to('/')}}/experiment/edit?expId={{urlencode($experiment->experimentId)}}" title="Edit"><span class="glyphicon glyphicon-pencil"></span></a>
-                        @endif
+                        <a href="{{URL::to('/')}}/experiment/edit?expId={{urlencode($experiment->experimentId)}}" title="Edit"><span class="glyphicon glyphicon-pencil"></span></a>
                     </td>
                     <td>{{ $experiment->userName }}</td>
                     <td>


[10/21] airavata-php-gateway git commit: Merge branch 'AIRAVATA-1397-max-filesize-exceeded-uploads' into develop

Posted by ma...@apache.org.
Merge branch 'AIRAVATA-1397-max-filesize-exceeded-uploads' into develop

This should fix AIRAVATA-1397


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

Branch: refs/heads/dreg-gateway
Commit: bfd2c06da6a19b3fa2c9dc0acdd481154dc79ce9
Parents: fc04148 561fbe3
Author: Marcus Christie <ma...@apache.org>
Authored: Thu Jan 19 14:50:12 2017 -0500
Committer: Marcus Christie <ma...@apache.org>
Committed: Thu Jan 19 14:50:12 2017 -0500

----------------------------------------------------------------------
 app/config/pga_config.php.template             |  5 --
 app/controllers/ExperimentController.php       | 61 +++++++++++----------
 app/libraries/ExperimentUtilities.php          | 32 ++++++++---
 app/views/experiment/create-complete.blade.php | 11 ++--
 app/views/experiment/create.blade.php          |  7 +++
 app/views/experiment/edit.blade.php            | 29 ++++++++--
 app/views/partials/experiment-info.blade.php   |  2 +-
 app/views/partials/experiment-inputs.blade.php | 12 +---
 public/.htaccess                               |  5 ++
 public/css/bootstrap.min.css                   | 18 ++++++
 public/js/util.js                              | 25 ++++++++-
 11 files changed, 148 insertions(+), 59 deletions(-)
----------------------------------------------------------------------



[03/21] airavata-php-gateway git commit: AIRAVATA-1397 Couple small fixes I noticed

Posted by ma...@apache.org.
AIRAVATA-1397 Couple small fixes I noticed

* fix for updating memory when editing an experiment
* removing unused "selected-queue" form parameter


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

Branch: refs/heads/dreg-gateway
Commit: 6cdc2a1188960b1b82c65df157b3c20f7c8d2342
Parents: d0af4e3
Author: Marcus Christie <ma...@apache.org>
Authored: Fri Jan 13 17:06:15 2017 -0500
Committer: Marcus Christie <ma...@apache.org>
Committed: Fri Jan 13 17:06:15 2017 -0500

----------------------------------------------------------------------
 app/libraries/ExperimentUtilities.php          | 2 +-
 app/views/partials/experiment-inputs.blade.php | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/6cdc2a11/app/libraries/ExperimentUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php
index a4fee3b..0b89df1 100755
--- a/app/libraries/ExperimentUtilities.php
+++ b/app/libraries/ExperimentUtilities.php
@@ -1282,7 +1282,7 @@ class ExperimentUtilities
         $schedulingUpdated->totalCPUCount = $input['cpu-count'];
         //$schedulingUpdated->numberOfThreads = $input['threads'];
         $schedulingUpdated->wallTimeLimit = $input['wall-time'];
-        //$schedulingUpdated->totalPhysicalMemory = $input['memory'];
+        $schedulingUpdated->totalPhysicalMemory = $input['total-physical-memory'];
 
         /*
         switch ($_POST['compute-resource'])

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/6cdc2a11/app/views/partials/experiment-inputs.blade.php
----------------------------------------------------------------------
diff --git a/app/views/partials/experiment-inputs.blade.php b/app/views/partials/experiment-inputs.blade.php
index dfe9d6c..bd3ef79 100644
--- a/app/views/partials/experiment-inputs.blade.php
+++ b/app/views/partials/experiment-inputs.blade.php
@@ -81,8 +81,6 @@
             <div class="loading-img text-center hide">
                 <img src="../assets/ajax-loader.gif"/>
             </div>
-            <input type="hidden" name="selected-queue"
-                   value="@if(isset($expInputs['expVal']) ){{ $expInputs['expVal']['scheduling']->queueName }} @endif"/>
 
             <div class="queue-view">
                 @if(isset($expInputs['expVal']) )


[21/21] airavata-php-gateway git commit: appending the last commit

Posted by ma...@apache.org.
appending the last commit


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

Branch: refs/heads/dreg-gateway
Commit: dae6cd756b888fc3576e86a738d66e7da5bf355e
Parents: 3c94537
Author: scnakandala <su...@gmail.com>
Authored: Fri Jan 27 12:03:28 2017 -0500
Committer: scnakandala <su...@gmail.com>
Committed: Fri Jan 27 12:03:28 2017 -0500

----------------------------------------------------------------------
 app/controllers/AccountController.php | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/dae6cd75/app/controllers/AccountController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php
index baa8e07..1490ee1 100644
--- a/app/controllers/AccountController.php
+++ b/app/controllers/AccountController.php
@@ -116,6 +116,13 @@ class AccountController extends BaseController
             $username = $userProfile['username'];
             $userRoles = $userProfile['roles'];
 
+            //FIXME There is a bug in WSO2 IS which doest not return the admin role for the default admin user.
+            //FIXME Hence as a workaround we manually add it here.
+            if ($username == Config::get('pga_config.wsis')['admin-username']
+                || $username == Config::get('pga_config.wsis')['admin-username'] . '@' . Config::get('pga_config.wsis')['tenant-domain']){
+                $userRoles[] = Config::get('pga_config.wsis')['admin-role-name'];
+            }
+
             $authzToken = new Airavata\Model\Security\AuthzToken();
             $authzToken->accessToken = $accessToken;
             $authzToken->claimsMap['gatewayID'] = Config::get('pga_config.airavata')['gateway-id'];


[17/21] airavata-php-gateway git commit: AIRAVATA-2223 Only load project when owned by user

Posted by ma...@apache.org.
AIRAVATA-2223 Only load project when owned by user


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

Branch: refs/heads/dreg-gateway
Commit: 9b300d66c9e0f3bc27c1cf5cb7e04a1365c3c21c
Parents: dc971cb
Author: Marcus Christie <ma...@iu.edu>
Authored: Thu Jan 26 16:03:15 2017 -0500
Committer: Marcus Christie <ma...@iu.edu>
Committed: Thu Jan 26 16:03:15 2017 -0500

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


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/9b300d66/app/controllers/ExperimentController.php
----------------------------------------------------------------------
diff --git a/app/controllers/ExperimentController.php b/app/controllers/ExperimentController.php
index 29004d1..bd214bf 100755
--- a/app/controllers/ExperimentController.php
+++ b/app/controllers/ExperimentController.php
@@ -144,7 +144,11 @@ class ExperimentController extends BaseController
             if (SharingUtilities::userCanRead(Session::get("username"), $experiment->projectId, ResourceType::PROJECT)) {
                 $project = ProjectUtilities::get_project($experiment->projectId);
             }
-        } else {
+        } elseif ($experiment->userName == Session::get("username")){
+            // When sharing is disabled the backend checks the auth token claims map
+            // to make sure the authenticating user is the same as the project
+            // owner. So the project can only be loaded when the user is the
+            // project owner, which can be inferred from the experiment's owner.
             $project = ProjectUtilities::get_project($experiment->projectId);
         }
         $expVal = ExperimentUtilities::get_experiment_values($experiment);