airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndo...@apache.org
Subject airavata-php-gateway git commit: Credential Store Token can now be selected from list
Date Thu, 03 Dec 2015 21:36:09 GMT
Repository: airavata-php-gateway
Updated Branches:
  refs/heads/develop 9c1803e15 -> caf1d4c6d


Credential Store Token can now be selected from list


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/caf1d4c6
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/caf1d4c6
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/caf1d4c6

Branch: refs/heads/develop
Commit: caf1d4c6da3da29a7173fc58bb96178ab772db11
Parents: 9c1803e
Author: Nipurn Doshi <nipunhere@gmail.com>
Authored: Thu Dec 3 16:35:31 2015 -0500
Committer: Nipurn Doshi <nipunhere@gmail.com>
Committed: Thu Dec 3 16:35:31 2015 -0500

----------------------------------------------------------------------
 app/controllers/AdminController.php              |  5 ++++-
 app/controllers/GatewayprofileController.php     |  4 +---
 app/views/admin/manage-credentials.blade.php     |  6 +++---
 app/views/admin/manage-gateway.blade.php         | 14 +++++++++++++-
 app/views/partials/gateway-preferences.blade.php | 12 ++++++++++++
 5 files changed, 33 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/caf1d4c6/app/controllers/AdminController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AdminController.php b/app/controllers/AdminController.php
index 09f239f..8d3cad3 100644
--- a/app/controllers/AdminController.php
+++ b/app/controllers/AdminController.php
@@ -77,11 +77,14 @@ class AdminController extends BaseController {
 		//Session::put("scigap_admin", true);
 		$crData = CRUtilities::getEditCRData();
 		$gateways = CRUtilities::getAllGatewayProfilesData();
+		$tokens = AdminUtilities::get_ssh_tokens();
+
 		//$dsData = CRUtilities::getAllDataStoragePreferences( $gateways);
 		$gatewayData = array( 
 								"gateways" => $gateways, 
 								"computeResources" => CRUtilities::getAllCRObjects(),
-								"crData" => $crData
+								"crData" => $crData,
+								"tokens" => $tokens
 							);
 		//var_dump( $gateways); exit;
 		if( Session::has("scigap_admin"))

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/caf1d4c6/app/controllers/GatewayprofileController.php
----------------------------------------------------------------------
diff --git a/app/controllers/GatewayprofileController.php b/app/controllers/GatewayprofileController.php
index 323b10d..f39e59f 100644
--- a/app/controllers/GatewayprofileController.php
+++ b/app/controllers/GatewayprofileController.php
@@ -29,13 +29,11 @@ class GatewayprofileController extends BaseController {
 
 	public function browseView()
 	{
-		$crObjects = CRUtilities::getAllCRObjects();
-		$crData = CRUtilities::getEditCRData();
 		//var_dump( $crObjects[0]); exit;
 		return View::make("gateway/browse", array(	"gatewayProfiles" => CRUtilities::getAllGatewayProfilesData(),
 													"computeResources" => CRUtilities::getAllCRObjects(),
 													"crData" => CRUtilities::getEditCRData()
-												));
+ 												));
 	}
 
 	public function modifyCRP()

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/caf1d4c6/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 be48fdc..4f456e1 100644
--- a/app/views/admin/manage-credentials.blade.php
+++ b/app/views/admin/manage-credentials.blade.php
@@ -42,13 +42,13 @@
                         </th>
                         <th class="text-center">Public Key</th>
                     </tr>
-                    @foreach( $tokens as $user => $token)
+                    @foreach( $tokens as $token => $publicKey)
                     <tr>
                         <td class="">
-                            <button class="btn btn-default">Copy Key</button>
+                            {{ $token }}
                         </td>
                         <td class="public-key">
-                            {{ $token }}
+                            {{ $publicKey }}
                         </td>
                     </tr>
                     @endforeach

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/caf1d4c6/app/views/admin/manage-gateway.blade.php
----------------------------------------------------------------------
diff --git a/app/views/admin/manage-gateway.blade.php b/app/views/admin/manage-gateway.blade.php
index 96fb926..4db7980 100644
--- a/app/views/admin/manage-gateway.blade.php
+++ b/app/views/admin/manage-gateway.blade.php
@@ -64,8 +64,20 @@
                                             <div class="form-group">
                                                 <label class="control-label col-md-12">{{
Session::get('theme') }} Credential Store Token</label>
                                                 <div class="col-md-9">
+                                                    <select class="form-control gateway-credential-store-token"
name="resourceSpecificCredentialStoreToken"  data-gpid="{{$gp->gatewayId}}" >
+                                                        @if( isset( $gp->profile->credentialStoreToken)
)
+                                                        <option value="{{$gp->profile->credentialStoreToken}}">{{$gp->profile->credentialStoreToken}}</option>
+                                                        @else
+                                                        <option value="">Select a Credential
Token from Store</option>
+                                                        @endif
+                                                        @foreach( $tokens as $token =>
$publicKey)
+                                                        <option value="{{$token}}">{{$token}}</option>
+                                                        @endforeach
+                                                    </select>
+                                                    <!--
                                                     <input type="text" name="resourceSpecificCredentialStoreToken"
 data-gpid="{{$gp->gatewayId}}" class="form-control credential-store-token"
                                                            value="@if( isset( $gp->profile->credentialStoreToken)
){{$gp->profile->credentialStoreToken}}@endif"/>
+                                                    -->
                                                 </div>
                                                 <div class="col-md-3">
                                                         <input type="submit" class="form-control
btn btn-primary" value="Set"/>
@@ -302,7 +314,7 @@
     $(".credential-store-token-change > form").submit( function(e){
         $(this).prepend( "<img id='loading-gif' src='{{URL::to('/')}}/assets/ajax-loader.gif'/>");
         e.preventDefault();
-        cstField = $(".credential-store-token");
+        cstField = $(".gateway-credential-store-token");
         if( $.trim( cstField.val()) != ""){
             $.ajax({
                 url: "{{URL::to('/')}}/gp/credential-store-token-change",

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/caf1d4c6/app/views/partials/gateway-preferences.blade.php
----------------------------------------------------------------------
diff --git a/app/views/partials/gateway-preferences.blade.php b/app/views/partials/gateway-preferences.blade.php
index d84d463..c5802d4 100644
--- a/app/views/partials/gateway-preferences.blade.php
+++ b/app/views/partials/gateway-preferences.blade.php
@@ -86,8 +86,20 @@
     <label class="control-label col-md-3">Resource Specific Credential Store Token</label>
 
     <div class="col-md-9">
+        <select class="form-control gateway-credential-store-token" name="resourceSpecificCredentialStoreToken"
>
+            @if( isset( $preferences) )
+            <option value="{{$preferences->resourceSpecificCredentialStoreToken}}">{{$preferences->resourceSpecificCredentialStoreToken}}</option>
+            @else
+            <option value="">Select a Credential Token from Store</option>
+            @endif
+            @foreach( $tokens as $token => $publicKey)
+            <option value="{{$token}}">{{$token}}</option>
+            @endforeach
+        </select>
+        <!--
         <input type="text" name="resourceSpecificCredentialStoreToken" class="form-control"
                value="@if( isset( $preferences) ){{$preferences->resourceSpecificCredentialStoreToken}}@endif"/>
+        -->
     </div>
 </div>
 @if(Session::has("admin"))


Mime
View raw message