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:36 UTC
[07/21] airavata-php-gateway git commit: AIRAVATA-1397 removed
savedExp, clonedExp flags
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) }}