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/12/13 20:45:23 UTC

[airavata-php-gateway] branch develop updated: AIRAVATA-2279 Credential store fixes

This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-php-gateway.git


The following commit(s) were added to refs/heads/develop by this push:
     new efa2735  AIRAVATA-2279 Credential store fixes
efa2735 is described below

commit efa2735bf194d3215dec4ba30ad6a778be3362cc
Author: Marcus Christie <ma...@iu.edu>
AuthorDate: Wed Dec 13 15:44:40 2017 -0500

    AIRAVATA-2279 Credential store fixes
    
    1. Don't create two SSH keys
    2. Show token id if no description
---
 app/controllers/AdminController.php                      |  1 -
 app/views/admin/manage-credentials.blade.php             |  2 +-
 .../partials/compute-resource-preferences.blade.php      |  8 +++++++-
 app/views/partials/gateway-preferences-block.blade.php   | 16 ++++++++++++++--
 .../partials/storage-resource-preferences.blade.php      |  8 +++++++-
 5 files changed, 29 insertions(+), 6 deletions(-)

diff --git a/app/controllers/AdminController.php b/app/controllers/AdminController.php
index 2755a8c..66c5acc 100644
--- a/app/controllers/AdminController.php
+++ b/app/controllers/AdminController.php
@@ -421,7 +421,6 @@ class AdminController extends BaseController {
     }
 
 	public function createSSH(){
-		$newToken = AdminUtilities::create_ssh_token_for_gateway(null);
         $description = Input::get("description");
         $newToken = AdminUtilities::create_ssh_token_for_gateway($description);
         $pubkey = AdminUtilities::get_pubkey_from_token( $newToken);
diff --git a/app/views/admin/manage-credentials.blade.php b/app/views/admin/manage-credentials.blade.php
index 0dbaab7..ada8041 100644
--- a/app/views/admin/manage-credentials.blade.php
+++ b/app/views/admin/manage-credentials.blade.php
@@ -60,7 +60,7 @@
                                 @if($val->description!=null)
                                 <p><strong>{{{ $val->description }}}</strong></p>
                                 @else
-                                <p style="color:red"><strong>NO DESCRIPTION!</strong></p>
+                                <p style="color:red"><strong>NO DESCRIPTION! ({{{ $val->token }}})</strong></p>
                                 @endif
                             </div>
                         </div><!-- .row -->
diff --git a/app/views/partials/compute-resource-preferences.blade.php b/app/views/partials/compute-resource-preferences.blade.php
index 3c485f3..77204b4 100644
--- a/app/views/partials/compute-resource-preferences.blade.php
+++ b/app/views/partials/compute-resource-preferences.blade.php
@@ -90,7 +90,13 @@
         <select class="form-control gateway-credential-store-token" name="resourceSpecificCredentialStoreToken" >
             <option value="">Select a Credential Token from Store</option>
             @foreach( $tokens as $val)
-                <option value="{{$val->token}}" @if( isset( $preferences) ) @if( $val->token == $preferences->resourceSpecificCredentialStoreToken) selected @endif @endif>{{$val->description}}</option>
+                <option value="{{$val->token}}" @if( isset( $preferences) ) @if( $val->token == $preferences->resourceSpecificCredentialStoreToken) selected @endif @endif>
+                    @if($val->description)
+                        {{{$val->description}}}
+                    @else
+                        NO DESCRIPTION: ({{{$val->token}}})
+                    @endif
+                </option>
             @endforeach
             <option value="">DO-NO-SET</option>
         </select>
diff --git a/app/views/partials/gateway-preferences-block.blade.php b/app/views/partials/gateway-preferences-block.blade.php
index 2f2c089..50ff4b9 100644
--- a/app/views/partials/gateway-preferences-block.blade.php
+++ b/app/views/partials/gateway-preferences-block.blade.php
@@ -30,11 +30,23 @@
                                         <option value="">Select a Credential Token from Store</option>
                                         @if( isset( $gp->profile->credentialStoreToken) )
                                         @foreach( $tokens as $val)
-                                            <option value="{{$val->token}}" @if( $val->token == $gp->profile->credentialStoreToken) selected @endif>{{$val->description}}</option>
+                                            <option value="{{$val->token}}" @if( $val->token == $gp->profile->credentialStoreToken) selected @endif>
+                                                @if($val->description)
+                                                    {{{$val->description}}}
+                                                @else
+                                                    NO DESCRIPTION: ({{{$val->token}}})
+                                                @endif
+                                            </option>
                                         @endforeach
                                         @else
                                         @foreach( $tokens as $val)
-                                            <option value="{{$val->token}}">{{$val->description}}</option>
+                                            <option value="{{$val->token}}">
+                                                @if($val->description)
+                                                    {{{$val->description}}}
+                                                @else
+                                                    NO DESCRIPTION: ({{{$val->token}}})
+                                                @endif
+                                            </option>
                                         @endforeach
                                         @endif
                                         <option value="">DO-NO-SET</option>
diff --git a/app/views/partials/storage-resource-preferences.blade.php b/app/views/partials/storage-resource-preferences.blade.php
index 22fd314..ed6c88b 100644
--- a/app/views/partials/storage-resource-preferences.blade.php
+++ b/app/views/partials/storage-resource-preferences.blade.php
@@ -41,7 +41,13 @@ dmi preference might be needed in the future
         <select class="form-control gateway-credential-store-token" name="resourceSpecificCredentialStoreToken" >
             <option value="">Select a Credential Token from Store</option>
             @foreach( $tokens as $val)
-                <option value="{{$val->token}}" @if( isset( $preferences) ) @if( $val->token == $preferences->resourceSpecificCredentialStoreToken) selected @endif @endif>{{$val->description}}</option>
+                <option value="{{$val->token}}" @if( isset( $preferences) ) @if( $val->token == $preferences->resourceSpecificCredentialStoreToken) selected @endif @endif>
+                    @if($val->description)
+                        {{{$val->description}}}
+                    @else
+                        NO DESCRIPTION: ({{{$val->token}}})
+                    @endif
+                </option>
             @endforeach
             <option value="">DO-NO-SET</option>
         </select>

-- 
To stop receiving notification emails like this one, please contact
['"commits@airavata.apache.org" <co...@airavata.apache.org>'].