You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by nd...@apache.org on 2016/08/05 06:34:21 UTC

airavata-php-gateway git commit: View Credentials UI in Gateways Request

Repository: airavata-php-gateway
Updated Branches:
  refs/heads/develop 9140942fa -> a38ded02b


View Credentials UI in Gateways Request


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

Branch: refs/heads/develop
Commit: a38ded02b91868a5272d6cb596afc0c1b3e216e3
Parents: 9140942
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Thu Aug 4 23:33:43 2016 -0700
Committer: Nipurn Doshi <ni...@gmail.com>
Committed: Thu Aug 4 23:33:43 2016 -0700

----------------------------------------------------------------------
 app/views/account/dashboard.blade.php | 59 +++++++++++++++++++++++++++++-
 1 file changed, 58 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a38ded02/app/views/account/dashboard.blade.php
----------------------------------------------------------------------
diff --git a/app/views/account/dashboard.blade.php b/app/views/account/dashboard.blade.php
index 7453e06..e062449 100644
--- a/app/views/account/dashboard.blade.php
+++ b/app/views/account/dashboard.blade.php
@@ -40,7 +40,7 @@
                             <td>
                                 @if( $gateway["approvalStatus"] == "Approved")
                                     <div class="btn-group" role="group" aria-label="...">
-                                        <button type="button" class="btn btn-default">Download Credentials</button>
+                                        <button type="button" class="btn btn-default view-credentials" data-gatewayobject="{{ htmlentities( json_encode( $gateway['gatewayInfo'])) }}">View Credentials</button>
                                         <!--
                                         <button type="button" class="btn btn-default"><a href="{{URL::to('/')}}/admin/dashboard?gatewayId={{$gatewayId}}">Manage Gateway</a></button>
                                         
@@ -135,6 +135,54 @@
             </div>
             <hr/>
             </div>
+        <!-- View Credentials -->
+        <div class="modal fade" id="viewCredentials" tabindex="-1" role="dialog" aria-labelledby="vc">
+          <div class="modal-dialog" role="document">
+            <div class="modal-content">
+              <div class="modal-header">
+                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+                <h4 class="modal-title">Gateway Credentials</h4>
+              </div>
+              <div class="modal-body">
+                <table class="table table-bordered">
+                    <thead>
+                        <tr>
+                            <th>Property</th>
+                            <th>Value</th>
+                        </tr>
+                    </thead>
+                    <tbody>
+                        <tr>
+                            <td>Gateway Id</td>
+                            <td class="gateway-id"></td>
+                        </tr>
+                        <tr>
+                            <td>Admin Username</td>
+                            <td class="admin-username"></td>
+                        </tr>
+                        <tr>
+                            <td>Admin Password</td>
+                            <td class="admin-password"></td>
+                        </tr>
+                        <tr>
+                            <td>Oauth Client Key</td>
+                            <td class="oauth-client-key"></td>
+                        </tr>
+                        <tr>
+                            <td>Oauth Client Secret</td>
+                            <td class="oauth-client-secret"></td>
+                        </tr>
+                    </tbody>
+                </table>
+              </div>
+              <!--
+              <div class="modal-footer">
+              </div>
+              -->
+            </div>
+          </div>
+        </div>
+
         <!-- Deactivate Modal -->
         <div class="modal fade" id="deactivateGateway" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
           <div class="modal-dialog" role="document">
@@ -405,5 +453,14 @@
         var gatewayId = $(this).data("gatewayid");
         $("#deactivateGatewayId").val( gatewayId);
     });
+
+    $(".view-credentials").click( function(){
+        var gatewayObject = $(this).data("gatewayobject");
+        console.log( gatewayObject);
+        $(".admin-username").html( gatewayObject["identityServerUserName"]);
+        $(".admin-password").html( gatewayObject["identityServerPasswordToken"]);
+        $(".gateway-id").html( gatewayObject["gatewayId"]);
+        $("#viewCredentials").modal("show");
+    });
 </script>
 @stop
\ No newline at end of file