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

airavata-php-gateway git commit: Changes to tackle UI errors coming due to file size default settings in php.ini

Repository: airavata-php-gateway
Updated Branches:
  refs/heads/develop eca0ea7c6 -> cb39e6e4b


Changes to tackle UI errors coming due to file size default settings in php.ini


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

Branch: refs/heads/develop
Commit: cb39e6e4be5c4d92c2f19fc0a42d2ce96ba2258c
Parents: eca0ea7
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Fri Apr 8 16:43:16 2016 -0400
Committer: Nipurn Doshi <ni...@gmail.com>
Committed: Fri Apr 8 16:43:16 2016 -0400

----------------------------------------------------------------------
 app/controllers/ExperimentController.php       | 10 ++++++++--
 app/views/experiment/create-complete.blade.php |  2 +-
 app/views/partials/experiment-inputs.blade.php |  1 -
 3 files changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/cb39e6e4/app/controllers/ExperimentController.php
----------------------------------------------------------------------
diff --git a/app/controllers/ExperimentController.php b/app/controllers/ExperimentController.php
index 03de1a2..7df7cf7 100755
--- a/app/controllers/ExperimentController.php
+++ b/app/controllers/ExperimentController.php
@@ -45,6 +45,12 @@ class ExperimentController extends BaseController
             if( Input::has("clonedExp"))
                 $clonedExp = 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,
                 "disabled" => ' disabled',
@@ -52,14 +58,14 @@ class ExperimentController extends BaseController
                 "experimentDescription" => $_POST['experiment-description'] . ' ',
                 "project" => $_POST['project'],
                 "application" => $_POST['application'],
-                "allowedFileSize" => Config::get('pga_config.airavata')["server-allowed-file-size"],
                 "echo" => ($_POST['application'] == 'Echo') ? ' selected' : '',
                 "wrf" => ($_POST['application'] == 'WRF') ? ' selected' : '',
                 "queueDefaults" => $queueDefaults,
                 "advancedOptions" => Config::get('pga_config.airavata')["advanced-experiment-options"],
                 "computeResources" => $computeResources,
                 "resourceHostId" => null,
-                "advancedOptions" => Config::get('pga_config.airavata')["advanced-experiment-options"]
+                "advancedOptions" => Config::get('pga_config.airavata')["advanced-experiment-options"],
+                "allowedFileSize" => $allowedFileSize
             );
 
             return View::make("experiment/create-complete", array("expInputs" => $experimentInputs));

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/cb39e6e4/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 137422c..022661f 100644
--- a/app/views/experiment/create-complete.blade.php
+++ b/app/views/experiment/create-complete.blade.php
@@ -32,7 +32,7 @@
 
     </form>
 
-
+<input type="hidden" id="allowedFileSize" value="{{ $expInputs['allowedFileSize'] }}"/>
 </div>
 
 

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/cb39e6e4/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 30cd075..5307938 100644
--- a/app/views/partials/experiment-inputs.blade.php
+++ b/app/views/partials/experiment-inputs.blade.php
@@ -27,7 +27,6 @@
         <label>Application input</label>
 
         <div class="well">
-            <input type="hidden" id="allowedFileSize" value="{{$expInputs['allowedFileSize']}}"/>
             @if( $expInputs["clonedExp"])
             <div class="form-group">
                 <p><strong>Current inputs</strong></p>