Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C59C6200BAE for ; Fri, 28 Oct 2016 22:04:50 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C451D160ACA; Fri, 28 Oct 2016 20:04:50 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4425C160B12 for ; Fri, 28 Oct 2016 22:04:49 +0200 (CEST) Received: (qmail 27954 invoked by uid 500); 28 Oct 2016 20:04:48 -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 27474 invoked by uid 99); 28 Oct 2016 20:04:48 -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; Fri, 28 Oct 2016 20:04:48 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B111AF1718; Fri, 28 Oct 2016 20:04:47 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: smarru@apache.org To: commits@airavata.apache.org Date: Fri, 28 Oct 2016 20:05:03 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [17/18] airavata-php-gateway git commit: AIRAVATA-2152 Allow user to pick resource specific SSH key archived-at: Fri, 28 Oct 2016 20:04:51 -0000 AIRAVATA-2152 Allow user to pick resource specific SSH key 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/480021cf Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/480021cf Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/480021cf Branch: refs/heads/develop Commit: 480021cf807d410ad6cea71dfe78a576679c4693 Parents: 2d6bf7f Author: Marcus Christie Authored: Fri Oct 28 13:09:20 2016 -0400 Committer: Marcus Christie Committed: Fri Oct 28 15:05:16 2016 -0400 ---------------------------------------------------------------------- app/controllers/AccountController.php | 20 +++++++---------- .../account/user-compute-resources.blade.php | 7 ++++-- .../account/user-storage-resources.blade.php | 7 ++++-- .../user-compute-resource-preferences.blade.php | 23 +++++++++++--------- .../user-storage-resource-preferences.blade.php | 19 +++++++++++----- 5 files changed, 44 insertions(+), 32 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/480021cf/app/controllers/AccountController.php ---------------------------------------------------------------------- diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php index 7b5e4cb..6037dda 100644 --- a/app/controllers/AccountController.php +++ b/app/controllers/AccountController.php @@ -553,17 +553,15 @@ class AccountController extends BaseController } $unselectedCRs = array_values($allCRsById); - // TODO: actually get all of the user's credential store tokens, including description - URPUtilities::get_all_ssh_pub_keys_summary_for_user(); - $tokens = array( - $userResourceProfile->credentialStoreToken => "Default SSH Key" - ); + $credentialSummaries = URPUtilities::get_all_ssh_pub_keys_summary_for_user(); + $defaultCredentialSummary = $credentialSummaries[$userResourceProfile->credentialStoreToken]; return View::make("account/user-compute-resources", array( "userResourceProfile" => $userResourceProfile, "computeResources" => $allCRs, "unselectedCRs" => $unselectedCRs, - "tokens" => $tokens + "credentialSummaries" => $credentialSummaries, + "defaultCredentialSummary" => $defaultCredentialSummary )); } @@ -609,17 +607,15 @@ class AccountController extends BaseController } $unselectedSRs = array_values($allSRsById); - // TODO: actually get all of the user's credential store tokens, including description - URPUtilities::get_all_ssh_pub_keys_summary_for_user(); - $tokens = array( - $userResourceProfile->credentialStoreToken => "Default SSH Key" - ); + $credentialSummaries = URPUtilities::get_all_ssh_pub_keys_summary_for_user(); + $defaultCredentialSummary = $credentialSummaries[$userResourceProfile->credentialStoreToken]; return View::make("account/user-storage-resources", array( "userResourceProfile" => $userResourceProfile, "storageResources" => $allSRs, "unselectedSRs" => $unselectedSRs, - "tokens" => $tokens + "credentialSummaries" => $credentialSummaries, + "defaultCredentialSummary" => $defaultCredentialSummary )); } http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/480021cf/app/views/account/user-compute-resources.blade.php ---------------------------------------------------------------------- diff --git a/app/views/account/user-compute-resources.blade.php b/app/views/account/user-compute-resources.blade.php index d3cd844..2756a91 100644 --- a/app/views/account/user-compute-resources.blade.php +++ b/app/views/account/user-compute-resources.blade.php @@ -16,7 +16,9 @@ button.add-user-cr { @section('content') @foreach( (array)$computeResources as $index => $cr) -@include('partials/user-compute-resource-preferences', array('computeResource' => $cr)) +@include('partials/user-compute-resource-preferences', + array('computeResource' => $cr, 'credentialSummaries' => $credentialSummaries, + 'defaultCredentialSummary' => $defaultCredentialSummary)) @endforeach
@if( Session::has("message")) @@ -60,7 +62,8 @@ button.add-user-cr { @include('partials/user-compute-resource-preferences', array('computeResource' => $user_crp->crDetails, 'preferences'=>$user_crp, 'show'=>true, - 'allowDelete'=>true)) + 'allowDelete'=>true, 'credentialSummaries' => $credentialSummaries, + 'defaultCredentialSummary' => $defaultCredentialSummary))
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/480021cf/app/views/account/user-storage-resources.blade.php ---------------------------------------------------------------------- diff --git a/app/views/account/user-storage-resources.blade.php b/app/views/account/user-storage-resources.blade.php index e38ef96..b87660e 100644 --- a/app/views/account/user-storage-resources.blade.php +++ b/app/views/account/user-storage-resources.blade.php @@ -15,7 +15,9 @@ button.add-user-sr { @section('content') @foreach( (array)$storageResources as $index => $sr) -@include('partials/user-storage-resource-preferences', array('storageResource' => $sr)) +@include('partials/user-storage-resource-preferences', + array('storageResource' => $sr, 'credentialSummaries' => $credentialSummaries, + 'defaultCredentialSummary' => $defaultCredentialSummary)) @endforeach
@if( Session::has("message")) @@ -59,7 +61,8 @@ button.add-user-sr { @include('partials/user-storage-resource-preferences', array('storageResource' => $user_srp->srDetails, 'preferences'=>$user_srp, 'show'=>true, - 'allowDelete'=>true)) + 'allowDelete'=>true, 'credentialSummaries' => $credentialSummaries, + 'defaultCredentialSummary' => $defaultCredentialSummary))
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/480021cf/app/views/partials/user-compute-resource-preferences.blade.php ---------------------------------------------------------------------- diff --git a/app/views/partials/user-compute-resource-preferences.blade.php b/app/views/partials/user-compute-resource-preferences.blade.php index 8753f6c..49c3f85 100644 --- a/app/views/partials/user-compute-resource-preferences.blade.php +++ b/app/views/partials/user-compute-resource-preferences.blade.php @@ -1,5 +1,7 @@ http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/480021cf/app/views/partials/user-storage-resource-preferences.blade.php ---------------------------------------------------------------------- diff --git a/app/views/partials/user-storage-resource-preferences.blade.php b/app/views/partials/user-storage-resource-preferences.blade.php index 16946d6..a5bc771 100644 --- a/app/views/partials/user-storage-resource-preferences.blade.php +++ b/app/views/partials/user-storage-resource-preferences.blade.php @@ -1,5 +1,7 @@