Repository: airavata-php-gateway Updated Branches: refs/heads/master f2a1a741c -> b78f5a75b
fixing compatibility issues with airavata master 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/b78f5a75 Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/b78f5a75 Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/b78f5a75 Branch: refs/heads/master Commit: b78f5a75b0aba641b4cb58cb8b60396954996e1f Parents: f2a1a74 Author: Supun Nakandala <[email protected]> Authored: Sun Aug 30 18:56:06 2015 +0530 Committer: Supun Nakandala <[email protected]> Committed: Sun Aug 30 18:56:06 2015 +0530 ---------------------------------------------------------------------- app/controllers/AccountController.php | 7 +++++++ app/controllers/ExperimentController.php | 4 ++-- app/libraries/AppUtilities.php | 9 +++++---- app/libraries/ExperimentUtilities.php | 6 ++---- app/views/partials/experiment-queue-block.blade.php | 10 +++++----- 5 files changed, 21 insertions(+), 15 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/b78f5a75/app/controllers/AccountController.php ---------------------------------------------------------------------- diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php index 4d2755e..64a0b09 100755 --- a/app/controllers/AccountController.php +++ b/app/controllers/AccountController.php @@ -99,6 +99,13 @@ class AccountController extends BaseController Session::put("gateway_id", Config::get('pga_config.airavata')['gateway-id']); Session::put("password", $_POST["password"]); + //creating a default project for user + $projects = ProjectUtilities::get_all_user_projects(Config::get('pga_config.airavata')['gateway-id'], $username); + if($projects == null || count($projects) == 0){ + //creating a default project for user + ProjectUtilities::create_default_project($username); + } + return Redirect::to("home"); } else { http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/b78f5a75/app/controllers/ExperimentController.php ---------------------------------------------------------------------- diff --git a/app/controllers/ExperimentController.php b/app/controllers/ExperimentController.php index 7d1c3ed..a85f6e5 100755 --- a/app/controllers/ExperimentController.php +++ b/app/controllers/ExperimentController.php @@ -140,8 +140,8 @@ class ExperimentController extends BaseController CommonUtilities::update_experiment($experiment->experimentId, $updatedExperiment); }*/ if (isset($_POST['launch'])) { - ExperimentUtilities::launch_experiment($experiment->experimentID); - return Redirect::to('experiment/summary?expId=' . $experiment->experimentID); + ExperimentUtilities::launch_experiment($experiment->experimentId); + return Redirect::to('experiment/summary?expId=' . $experiment->experimentId); } elseif (isset($_POST['cancel'])) { ExperimentUtilities::cancel_experiment($experiment->experimentId); return Redirect::to('experiment/summary?expId=' . $experiment->experimentId); http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/b78f5a75/app/libraries/AppUtilities.php ---------------------------------------------------------------------- diff --git a/app/libraries/AppUtilities.php b/app/libraries/AppUtilities.php index ea9926f..0af06ec 100644 --- a/app/libraries/AppUtilities.php +++ b/app/libraries/AppUtilities.php @@ -6,9 +6,9 @@ use Airavata\Model\AppCatalog\AppDeployment\ApplicationModule; use Airavata\Model\AppCatalog\AppDeployment\ApplicationParallelismType; use Airavata\Model\AppCatalog\AppDeployment\SetEnvPaths; use Airavata\Model\AppCatalog\AppInterface\ApplicationInterfaceDescription; -use Airavata\Model\AppCatalog\AppInterface\DataType; -use Airavata\Model\AppCatalog\AppInterface\InputDataObjectType; -use Airavata\Model\AppCatalog\AppInterface\OutputDataObjectType; +use Airavata\Model\Application\Io\DataType; +use Airavata\Model\Application\Io\InputDataObjectType; +use Airavata\Model\Application\Io\OutputDataObjectType; class AppUtilities @@ -104,7 +104,8 @@ class AppUtilities } Airavata::updateApplicationInterface(Session::get('authz-token'), $appInterfaceValues["app-interface-id"], $appInterface); } else { - Airavata::getApplicationInterface(Session::get('authz-token'), Airavata::registerApplicationInterface(Session::get("gateway_id"), $appInterface)); + Airavata::getApplicationInterface(Session::get('authz-token'), + Airavata::registerApplicationInterface(Session::get('authz-token'), Session::get("gateway_id"), $appInterface)); } //print_r( "App interface has been created."); } http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/b78f5a75/app/libraries/ExperimentUtilities.php ---------------------------------------------------------------------- diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php index ab04bb9..a8cc9b2 100644 --- a/app/libraries/ExperimentUtilities.php +++ b/app/libraries/ExperimentUtilities.php @@ -702,7 +702,7 @@ class ExperimentUtilities $expVal["applicationInterface"] = AppUtilities::get_application_interface($experiment->executionId); - switch ($experiment->experimentStatus) { + switch (ExperimentState::$__names[$experiment->experimentStatus->state]) { case 'CREATED': case 'VALIDATED': case 'SCHEDULED': @@ -714,7 +714,7 @@ class ExperimentUtilities break; } - switch ($experiment->experimentStatus) { + switch (ExperimentState::$__names[$experiment->experimentStatus->state]) { case 'CREATED': case 'VALIDATED': case 'SCHEDULED': @@ -811,8 +811,6 @@ class ExperimentUtilities break; case '': } - }else{ - $filters[\Airavata\Model\Experiment\ExperimentSearchFields::EXPERIMENT_NAME] = "*"; } $experiments = Airavata::searchExperiments(Session::get('authz-token'), http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/b78f5a75/app/views/partials/experiment-queue-block.blade.php ---------------------------------------------------------------------- diff --git a/app/views/partials/experiment-queue-block.blade.php b/app/views/partials/experiment-queue-block.blade.php index 44daf57..8ef48dc 100644 --- a/app/views/partials/experiment-queue-block.blade.php +++ b/app/views/partials/experiment-queue-block.blade.php @@ -3,7 +3,7 @@ @if( count( $queues) > 0 ) <label class="control-label" for="node-count">Select a Queue</label> <select name="queue-name" class="form-control" id="select-queue" @if(isset($expVal) ) @if(!$expVal['editable']){{ - disabled }} @endif @endif required> + "disabled" }} @endif @endif required> @foreach( $queues as $queue) <option value="{{$queue->queueName}}" @if(isset($expVal) ) @if( $expVal['scheduling']->queueName == $queue->queueName ) selected @endif @endif @@ -26,7 +26,7 @@ <input type="number" class="form-control" name="node-count" id="node-count" min="1" value="@if(isset($expVal) ){{ $expVal['scheduling']->nodeCount }}@else{{$queueDefaults['nodeCount']}}@endif" required - @if(isset($expVal) ) @if(!$expVal['editable']){{disabled}} @endif @endif> + @if(isset($expVal) ) @if(!$expVal['editable']){{"disabled"}} @endif @endif> </div> <div class="form-group"> <label for="cpu-count">Total Core Count <span>( Max Allowed Cores - <span @@ -34,7 +34,7 @@ <input type="number" class="form-control" name="cpu-count" id="cpu-count" min="1" value="@if(isset($expVal) ){{ $expVal['scheduling']->totalCPUCount }}@else{{$queueDefaults['cpuCount']}}@endif" required - @if(isset($expVal)) @if(!$expVal['editable']){{disabled}} @endif @endif> + @if(isset($expVal)) @if(!$expVal['editable']){{"disabled"}} @endif @endif> </div> <div class="form-group"> <label for="wall-time">Wall Time Limit <span>( Max Allowed Wall Time - <span @@ -44,7 +44,7 @@ <input type="number" class="form-control" name="wall-time" id="wall-time" min="1" value="@if(isset($expVal)){{$expVal['scheduling']->wallTimeLimit}}@else{{$queueDefaults['wallTimeLimit']}}@endif" required - @if(isset($expVal)) @if(!$expVal['editable']){{disabled}} @endif @endif> + @if(isset($expVal)) @if(!$expVal['editable']){{"disabled"}} @endif @endif> <span class="input-group-addon">minutes</span> </div> </div> @@ -55,7 +55,7 @@ <div class="input-group"> <input type="number" class="form-control" name="total-physical-memory" id="memory-count" min="0" value="@if(isset($expVal) ){{ $expVal['scheduling']->totalPhysicalMemory }}@endif" - @if(isset($expVal)) @if(!$expVal['editable']){{disabled}} @endif @endif> + @if(isset($expVal)) @if(!$expVal['editable']){{"disabled"}} @endif @endif> <span class="input-group-addon">MB</span> </div> </div>
