Return-Path: X-Original-To: apmail-airavata-commits-archive@www.apache.org Delivered-To: apmail-airavata-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 16D6118F28 for ; Thu, 3 Dec 2015 21:10:52 +0000 (UTC) Received: (qmail 10279 invoked by uid 500); 3 Dec 2015 21:10:51 -0000 Delivered-To: apmail-airavata-commits-archive@airavata.apache.org Received: (qmail 10188 invoked by uid 500); 3 Dec 2015 21:10:51 -0000 Mailing-List: contact commits-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airavata.apache.org Delivered-To: mailing list commits@airavata.apache.org Received: (qmail 10151 invoked by uid 99); 3 Dec 2015 21:10:51 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Dec 2015 21:10:51 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 910A5E6836; Thu, 3 Dec 2015 21:10:51 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ndoshi@apache.org To: commits@airavata.apache.org Date: Thu, 03 Dec 2015 21:10:52 -0000 Message-Id: <468a4ac7642e4c448389aa5069819995@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [2/5] airavata-php-gateway git commit: credential store token generation feature addition in progress. credential store token generation feature addition in progress. 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/45f9f9e1 Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/45f9f9e1 Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/45f9f9e1 Branch: refs/heads/develop Commit: 45f9f9e1aa4f35eb123e3f9fde0d70b3f254e339 Parents: c490661 Author: Nipurn Doshi Authored: Wed Nov 25 13:11:07 2015 -0500 Committer: Nipurn Doshi Committed: Wed Nov 25 13:11:07 2015 -0500 ---------------------------------------------------------------------- app/controllers/ExperimentController.php | 2 +- app/controllers/GatewayprofileController.php | 4 ++ app/libraries/CommonUtilities.php | 4 ++ app/libraries/ExperimentUtilities.php | 12 +++-- app/routes.php | 2 + app/views/admin/manage-credentials.blade.php | 56 ++++++++++------------- app/views/partials/dashboard-block.blade.php | 12 ++--- app/views/partials/experiment-info.blade.php | 18 +++++--- 8 files changed, 61 insertions(+), 49 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/45f9f9e1/app/controllers/ExperimentController.php ---------------------------------------------------------------------- diff --git a/app/controllers/ExperimentController.php b/app/controllers/ExperimentController.php index ebe870b..54bcf67 100755 --- a/app/controllers/ExperimentController.php +++ b/app/controllers/ExperimentController.php @@ -105,7 +105,7 @@ class ExperimentController extends BaseController } */ // User should not clone or edit a failed experiment. Only create clones of it. - if ($expVal["experimentStatusString"] == "FAILED") + if ( $expVal["experimentStates"][$experiment->experimentStatus->state] == "FAILED") $expVal["editable"] = false; $expVal["cancelable"] = false; http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/45f9f9e1/app/controllers/GatewayprofileController.php ---------------------------------------------------------------------- diff --git a/app/controllers/GatewayprofileController.php b/app/controllers/GatewayprofileController.php index f6bff16..e27c2bf 100644 --- a/app/controllers/GatewayprofileController.php +++ b/app/controllers/GatewayprofileController.php @@ -85,6 +85,10 @@ class GatewayprofileController extends BaseController { return "An error has occurred. Please try again later or report a bug using the link in the Help menu"; } + public function createSSH(){ + return CommonUtilities::create_ssh_token(); + } + } ?> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/45f9f9e1/app/libraries/CommonUtilities.php ---------------------------------------------------------------------- diff --git a/app/libraries/CommonUtilities.php b/app/libraries/CommonUtilities.php index 4c55d7b..682aa42 100644 --- a/app/libraries/CommonUtilities.php +++ b/app/libraries/CommonUtilities.php @@ -256,5 +256,9 @@ class CommonUtilities throw new Exception('Error: Cannot open tokens database!'); } } + + public static function create_ssh_token(){ + return Airavata::generateAndRegisterSSHKeys( Session::get('authz-token'), Session::get("gateway_id"), Session::get("username")); + } } http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/45f9f9e1/app/libraries/ExperimentUtilities.php ---------------------------------------------------------------------- diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php index 77d9011..6971abf 100644 --- a/app/libraries/ExperimentUtilities.php +++ b/app/libraries/ExperimentUtilities.php @@ -650,8 +650,8 @@ class ExperimentUtilities if( $process) { $processStatusVal = array_search($status, ProcessState::$__names); - if ($processStatusVal != ProcessState::COMPLETED) - echo "Process hasn't completed. Process Status is : " . $status . '
'; + if ($status != ProcessState::COMPLETED) + echo "Process hasn't completed. Process Status is : " . $status . '
'; } else { @@ -754,15 +754,21 @@ class ExperimentUtilities public static function get_experiment_values($experiment, $project, $forSearch = false) { $expVal = array(); - $expVal["experimentStatusString"] = ""; + //$expVal["experimentStatusString"] = ""; $expVal["experimentTimeOfStateChange"] = ""; $expVal["experimentCreationTime"] = ""; + $expVal["experimentStates"] = ExperimentState::$__names; + $expVal["processStates"] = ProcessState::$__names; + $expVal["jobStates"] = JobState::$__names; + if ($experiment->experimentStatus != null) { $experimentStatus = $experiment->experimentStatus; + /* $experimentState = $experimentStatus->state; $experimentStatusString = ExperimentState::$__names[$experimentState]; $expVal["experimentStatusString"] = $experimentStatusString; + */ $expVal["experimentTimeOfStateChange"] = $experimentStatus->timeOfStateChange / 1000; // divide by 1000 since timeOfStateChange is in ms $expVal["experimentCreationTime"] = $experiment->creationTime / 1000; // divide by 1000 since creationTime is in ms } http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/45f9f9e1/app/routes.php ---------------------------------------------------------------------- diff --git a/app/routes.php b/app/routes.php index 502604a..8175b08 100755 --- a/app/routes.php +++ b/app/routes.php @@ -188,6 +188,8 @@ Route::post("gp/add-crp", "GatewayprofileController@modifyCRP"); Route::post("gp/update-crp", "GatewayprofileController@modifyCRP"); +Route::post("gp/create-ssh-token", "GatewayprofileController@createSSH"); + Route::post("gp/credential-store-token-change", "GatewayprofileController@cstChange"); //Management Dashboard http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/45f9f9e1/app/views/admin/manage-credentials.blade.php ---------------------------------------------------------------------- diff --git a/app/views/admin/manage-credentials.blade.php b/app/views/admin/manage-credentials.blade.php index 040d1a8..556ef0f 100644 --- a/app/views/admin/manage-credentials.blade.php +++ b/app/views/admin/manage-credentials.blade.php @@ -26,7 +26,15 @@ @endif

SSH Keys

- + @if(Session::has("admin")) + + + + +
+ +
+ @endif
@@ -54,16 +62,9 @@
- @if(Session::has("admin")) - - - - -
- -
- @endif + +

Amazon Credentials

@@ -147,28 +149,16 @@ @section('scripts') @parent @stop \ No newline at end of file http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/45f9f9e1/app/views/partials/dashboard-block.blade.php ---------------------------------------------------------------------- diff --git a/app/views/partials/dashboard-block.blade.php b/app/views/partials/dashboard-block.blade.php index c0db0a2..ad4ebea 100644 --- a/app/views/partials/dashboard-block.blade.php +++ b/app/views/partials/dashboard-block.blade.php @@ -17,12 +17,6 @@ @if( Session::has("admin-nav") && Session::get("admin-nav") == "manage-roles") class="active" @endif>   Roles - - - - - -
  •   Compute Resources
      @@ -87,6 +81,12 @@   @if( Session::has("scigap_admin"))Gateways @else Gateway Preferences @endif + +
    • +  Credential + Store +
    • http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/45f9f9e1/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 18ddd99..9fc39e5 100644 --- a/app/views/partials/experiment-info.blade.php +++ b/app/views/partials/experiment-info.blade.php @@ -126,9 +126,11 @@ Errors - @foreach( (array)$experiment->errors as $error) + @if( $detailedExperiment->errors != null) + @foreach( (array)$detailedExperiment->errors as $error) {{ $error->actualErrorMessage }} @endforeach + @endif @endif @@ -226,11 +228,15 @@ @endforeach
    • - Errors
      - @foreach( $detailedExperiment->errors as $error) - Error Id : {{ $error->errorId}}
      - Error Message : {{ $error->actualErrorMessage}} - @endforeach + Errors :
      + @if( $detailedExperiment->errors != null) + @foreach( $detailedExperiment->errors as $error) + Error Id : {{ $error->errorId}}
      + Error Message : {{ $error->actualErrorMessage}} + @endforeach + @else + No errors + @endif