You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sm...@apache.org on 2015/04/09 17:41:45 UTC
[03/12] airavata-php-gateway git commit: Adding prompt for
incompleted experiments.
Adding prompt for incompleted experiments.
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/141374ee
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/141374ee
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/141374ee
Branch: refs/heads/master
Commit: 141374eec9126e61046a863eed89b1e8079f60de
Parents: 956ac76
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Thu Mar 12 14:59:57 2015 -0400
Committer: Suresh Marru <sm...@apache.org>
Committed: Thu Apr 9 11:34:13 2015 -0400
----------------------------------------------------------------------
app/controllers/AdminController.php | 2 +-
app/libraries/utilities.php | 43 +++++++++++++++++------------
app/views/admin/manage-roles.blade.php | 3 +-
app/views/experiment/summary.blade.php | 2 +-
4 files changed, 29 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/141374ee/app/controllers/AdminController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AdminController.php b/app/controllers/AdminController.php
index 425d0a2..1097da5 100644
--- a/app/controllers/AdminController.php
+++ b/app/controllers/AdminController.php
@@ -28,7 +28,7 @@ class AdminController extends BaseController {
}
public function dashboard(){
-
+ //only for super admin
//Session::put("scigap_admin", true);
$idStore = $this->idStore;
//$ti = $idStore->createTenant( Input::all() );
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/141374ee/app/libraries/utilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/utilities.php b/app/libraries/utilities.php
index 50f9193..9dede7d 100755
--- a/app/libraries/utilities.php
+++ b/app/libraries/utilities.php
@@ -19,9 +19,9 @@ use Airavata\Model\AppCatalog\AppInterface\InputDataObjectType;
use Airavata\Model\Workspace\Experiment\UserConfigurationData;
use Airavata\Model\Workspace\Experiment\AdvancedOutputDataHandling;
use Airavata\Model\Workspace\Experiment\Experiment;
+use Airavata\Model\Workspace\Experiment\ExperimentState;
use Airavata\Model\AppCatalog\AppInterface\DataType;
use Airavata\Model\Workspace\Project;
-use Airavata\Model\Workspace\Experiment\ExperimentState;
use Airavata\Model\Workspace\Experiment\JobState;
use Airavata\Model\AppCatalog\ComputeResource\JobSubmissionInterface;
use Airavata\Model\AppCatalog\ComputeResource\JobSubmissionProtocol;
@@ -841,6 +841,8 @@ public static function process_inputs($applicationInputs, $experimentInputs)
Utilities::$experimentPath = base_path() . Constant::EXPERIMENT_DATA_ROOT . str_replace(' ', '', Session::get('username') ) . md5(rand() * time()) . '/';
}
while (is_dir( Utilities::$experimentPath)); // if dir already exists, try again
+
+ //var_dump( Utilities::$experimentPath ); exit;
// create upload directory
if (!mkdir( Utilities::$experimentPath))
{
@@ -1822,27 +1824,32 @@ public static function create_experiment()
*
*/
-public static function list_output_files($experiment)
+public static function list_output_files($experiment, $expStatus)
{
- $utility = new Utilities();
- $experimentOutputs = $experiment->experimentOutputs;
- foreach ($experimentOutputs as $output)
+ if($expStatus == ExperimentState::COMPLETED )
{
- if ($output->type == DataType::URI || $output->type == DataType::STDOUT || $output->type == DataType::STDERR )
+ $utility = new Utilities();
+ $experimentOutputs = $experiment->experimentOutputs;
+ foreach ((array)$experimentOutputs as $output)
{
- //echo '<p>' . $output->key . ': <a href="' . $output->value . '">' . $output->value . '</a></p>';
- $outputPath = str_replace(Utilities::$experimentDataPathAbsolute, Constant::EXPERIMENT_DATA_ROOT, $output->value);
- $outputPathArray = explode("/", $outputPath);
+ if ($output->type == DataType::URI || $output->type == DataType::STDOUT || $output->type == DataType::STDERR )
+ {
+ //echo '<p>' . $output->key . ': <a href="' . $output->value . '">' . $output->value . '</a></p>';
+ $outputPath = str_replace(Utilities::$experimentDataPathAbsolute, Constant::EXPERIMENT_DATA_ROOT, $output->value);
+ $outputPathArray = explode("/", $outputPath);
- echo '<p>' . $output->name . ' : ' . '<a target="_blank"
- href="' . str_replace(Utilities::$experimentDataPathAbsolute, Constant::EXPERIMENT_DATA_ROOT, $output->value) . '">' .
- $outputPathArray[ sizeof( $outputPathArray) - 1] . ' <span class="glyphicon glyphicon-new-window"></span></a></p>';
- }
- elseif ($output->type == DataType::STRING)
- {
- echo '<p>' . $output->value . '</p>';
+ echo '<p>' . $output->name . ' : ' . '<a target="_blank"
+ href="' . str_replace(Utilities::$experimentDataPathAbsolute, Constant::EXPERIMENT_DATA_ROOT, $output->value) . '">' .
+ $outputPathArray[ sizeof( $outputPathArray) - 1] . ' <span class="glyphicon glyphicon-new-window"></span></a></p>';
+ }
+ elseif ($output->type == DataType::STRING)
+ {
+ echo '<p>' . $output->value . '</p>';
+ }
}
}
+ else
+ echo "Experiment hasn't completed. Experiment Status is : " . $expStatus;
}
public static function get_experiment_values( $experiment, $project, $forSearch = false)
@@ -1930,10 +1937,10 @@ public static function get_projsearch_results( $searchKey, $searchValue)
switch ( $searchKey)
{
case 'project-name':
- $projects = $airavataclient->searchProjectsByProjectName( Session::get("username"), $searchValue);
+ $projects = $airavataclient->searchProjectsByProjectName( Session::get("gateway_id"), Session::get("username"), $searchValue);
break;
case 'project-description':
- $projects = $airavataclient->searchProjectsByProjectDesc(Session::get("username"), $searchValue);
+ $projects = $airavataclient->searchProjectsByProjectDesc( Session::get("gateway_id"), Session::get("username"), $searchValue);
break;
}
}
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/141374ee/app/views/admin/manage-roles.blade.php
----------------------------------------------------------------------
diff --git a/app/views/admin/manage-roles.blade.php b/app/views/admin/manage-roles.blade.php
index 6d8a6b8..a7a3813 100644
--- a/app/views/admin/manage-roles.blade.php
+++ b/app/views/admin/manage-roles.blade.php
@@ -28,7 +28,8 @@
<table class="table table-striped table-condensed">
<tr>
- <th>Role</th>
+ <th>
+ Role</th>
<th>Actions</th>
</tr>
@foreach( $roles as $role)
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/141374ee/app/views/experiment/summary.blade.php
----------------------------------------------------------------------
diff --git a/app/views/experiment/summary.blade.php b/app/views/experiment/summary.blade.php
index 1ca71de..4692f40 100755
--- a/app/views/experiment/summary.blade.php
+++ b/app/views/experiment/summary.blade.php
@@ -60,7 +60,7 @@
</tr>
<tr>
<td><strong>Outputs</strong></td>
- <td><?php if ($expVal["experimentStatusString"] == 'COMPLETED') Utilities::list_output_files($experiment); ?></td>
+ <td><?php Utilities::list_output_files($experiment, $expVal["experimentStatusString"]); ?></td>
</tr>
@if( $expVal["experimentStatusString"] == "FAILED")
<tr>