You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sm...@apache.org on 2016/10/28 16:46:07 UTC

[18/20] airavata-php-gateway git commit: AIRAVATA-2156 UI refinements

AIRAVATA-2156 UI refinements


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

Branch: refs/heads/develop
Commit: 8a22f77d789ce79a470257a140e63df94e96f07b
Parents: a666557
Author: Marcus Christie <ma...@iu.edu>
Authored: Fri Oct 28 11:47:45 2016 -0400
Committer: Marcus Christie <ma...@iu.edu>
Committed: Fri Oct 28 11:47:45 2016 -0400

----------------------------------------------------------------------
 app/views/account/credential-store.blade.php | 100 ++++++++++------------
 app/views/account/dashboard.blade.php        |   2 +
 2 files changed, 45 insertions(+), 57 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/8a22f77d/app/views/account/credential-store.blade.php
----------------------------------------------------------------------
diff --git a/app/views/account/credential-store.blade.php b/app/views/account/credential-store.blade.php
index a1c382e..1cf2bec 100644
--- a/app/views/account/credential-store.blade.php
+++ b/app/views/account/credential-store.blade.php
@@ -2,20 +2,6 @@
 
 @section('page-header')
 @parent
-<style>
-.credential-item {
-    padding-right: 220px;
-    position: relative;
-}
-.credential-item .credential-buttons {
-    height: 34px;
-    width: 220px;
-    position: absolute;
-    top: 50%;
-    margin-top: -17px;
-    right: 0px;
-}
-</style>
 @stop
 
 @section('content')
@@ -40,28 +26,49 @@
 
     <h1>SSH Keys</h1>
 
-    <div class="panel panel-default">
-        <div class="panel-heading">
-            <h3 class="panel-title">Default SSH Key</h3>
-        </div>
-        <div class="panel-body">
-            <form class="form-inline" action="{{ URL::to('/') }}/account/set-default-credential" method="post">
-                <div class="form-group">
-                    <label for="defaultToken" class="sr-only">Select default SSH key</label>
-                    <select class="form-control" id="defaultToken" name="defaultToken">
-                        @foreach ($credentialSummaries as $credentialSummary)
-                        <option
-                        @if ($credentialSummary->token == $defaultCredentialSummary->token)
-                        selected
-                        @endif
-                        value="{{ $credentialSummary->token }}">{{ $credentialSummary->description }}</option>
-                        @endforeach
-                    </select>
+    <ul class="list-group">
+        @foreach ($credentialSummaries as $credentialSummary)
+        <li class="list-group-item credential-item">
+            <div class="row">
+                <div class="col-md-12">
+                    <p><strong>{{{ $credentialSummary->description }}}</strong></p>
                 </div>
-                <button type="submit" class="btn btn-default">Update default</button>
-            </form>
-        </div>
-    </div>
+            </div><!-- .row -->
+            <div class="row">
+                <div class="col-md-6">
+                    <div class="input-group">
+                        <input type="text" class="form-control" readonly
+                            id="credential-publickey-{{$credentialSummary->token}}"
+                            value="{{$credentialSummary->publicKey}}">
+                        <span class="input-group-btn">
+                            <button type="button" class="btn btn-default copy-credential"
+                                data-clipboard-target="#credential-publickey-{{$credentialSummary->token}}"
+                                data-toggle="tooltip" data-placement="bottom"
+                                data-title="Copied!" data-trigger="manual">
+                                Copy
+                            </button>
+                        </span>
+                    </div>
+                </div>
+                <div class="col-md-6">
+                    @if ($credentialSummary->token != $defaultCredentialSummary->token)
+                    <form style="display: inline" action="{{ URL::to('/') }}/account/set-default-credential" method="post">
+                        <input type="hidden" name="defaultToken" value="{{$credentialSummary->token}}"/>
+                        <button type="submit" class="btn btn-default">Make Default</button>
+                    </form>
+                    @else
+                    <small>This is the default SSH public key that the gateway will use to authenticate to your compute and storage accounts.</small>
+                    @endif
+                    @if ($credentialSummary->canDelete)
+                    <button data-token="{{$credentialSummary->token}}"
+                        data-description="{{$credentialSummary->description}}"
+                        class="btn btn-danger delete-credential">Delete</button>
+                    @endif
+                </div>
+            </div><!-- .row -->
+        </li>
+        @endforeach
+    </ul>
 
     <div class="panel panel-default">
         <div class="panel-heading">
@@ -83,27 +90,6 @@
             </form>
         </div>
     </div>
-
-    <div class="panel panel-default">
-      <div class="panel-heading">SSH Keys</div>
-      <ul class="list-group">
-        @foreach ($credentialSummaries as $credentialSummary)
-        <li class="list-group-item credential-item">
-            {{ $credentialSummary->description }}
-            <div class="credential-buttons">
-                <button type="button" class="btn btn-default copy-credential"
-                    data-clipboard-text="{{$credentialSummary->publicKey}}"
-                    data-toggle="tooltip" data-placement="bottom" data-title="Copied!" data-trigger="manual">Copy to clipboard</button>
-                @if ($credentialSummary->canDelete)
-                <button data-token="{{$credentialSummary->token}}"
-                    data-description="{{$credentialSummary->description}}"
-                    class="btn btn-default delete-credential">Delete</button>
-                @endif
-            </div>
-        </li>
-        @endforeach
-      </ul>
-    </div>
 </div>
 
 <div class="modal fade" id="delete-credential-modal" tabindex="-1" role="dialog" aria-labelledby="delete-credential-modal-title"
@@ -137,7 +123,7 @@
 @parent
 {{ HTML::script('js/clipboard.min.js') }}
 <script>
-$('.delete-credential').on('click', function(){
+$('.delete-credential').on('click', function(e){
 
     var credentialStoreToken = $(this).data('token');
     var credentialDescription = $(this).data('description');

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/8a22f77d/app/views/account/dashboard.blade.php
----------------------------------------------------------------------
diff --git a/app/views/account/dashboard.blade.php b/app/views/account/dashboard.blade.php
index c7d0e93..740dded 100644
--- a/app/views/account/dashboard.blade.php
+++ b/app/views/account/dashboard.blade.php
@@ -388,6 +388,8 @@
             <div class="row well">
 
                 <h3>Manage Personal Computing and Storage Resources</h3>
+                <p>Use these settings if you have your own compute and/or
+                storage resource accounts that you would like to use.</p>
 
                 <a href="{{URL::to('/')}}/account/computeResources">
                     <div class=" col-md-4 well">