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/07/29 05:24:09 UTC

airavata-php-gateway git commit: option added to deactivate gateway

Repository: airavata-php-gateway
Updated Branches:
  refs/heads/develop a0327d644 -> 5146d9bf1


option added to deactivate gateway


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

Branch: refs/heads/develop
Commit: 5146d9bf1045b4a3fe60f1cee3ebc018620492b0
Parents: a0327d6
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Thu Jul 28 22:23:33 2016 -0700
Committer: Nipurn Doshi <ni...@gmail.com>
Committed: Thu Jul 28 22:23:33 2016 -0700

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


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/5146d9bf/app/views/account/dashboard.blade.php
----------------------------------------------------------------------
diff --git a/app/views/account/dashboard.blade.php b/app/views/account/dashboard.blade.php
index bdc9742..42294e0 100644
--- a/app/views/account/dashboard.blade.php
+++ b/app/views/account/dashboard.blade.php
@@ -41,7 +41,7 @@
                                     <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"><a href="{{URL::to('/')}}/admin/dashboard?gatewayId={{$gatewayId}}">Manage Gateway</a></button>
-                                        <button type="button" class="btn btn-default">Remove Gateway</button>
+                                        <button type="button" class="btn btn-danger deactivateGateway-button" data-toggle="modal" data-target="#deactivateGateway" data-gatewayid="{{$gatewayId}}">Deactivate Gateway</button>
                                     </div>
                                 @elseif( $gateway["approvalStatus"] == "Requested")
                                     <button type="button" class="btn btn-danger">Cancel Request</button>
@@ -125,6 +125,27 @@
             </div>
             <hr/>
             </div>
+        <!-- Deactivate Modal -->
+        <div class="modal fade" id="deactivateGateway" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
+          <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" id="myModalLabel">Deactivate Confirmation</h4>
+              </div>
+              <div class="modal-body">
+                Are you sure, you want to deactivate this Gateway? This action cannot be undone.
+              </div>
+              <div class="modal-footer">
+                <form action="{{URL::to('/')}}/admin/update-gateway-request?status=3" method="GET">
+                    <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+                    <input type="hidden" id="deactivateGatewayId" name="gateway_id" value=""/>
+                    <button type="submit" class="btn btn-danger">Deactivate</button>
+                </form>
+              </div>
+            </div>
+          </div>
+        </div>
         @endif
         @if( Session::has('authorized-user') || Session::has('admin') || Session::has('admin-read-only') )
         <div class="row text-center breathing-space">
@@ -360,5 +381,9 @@
         'trigger':'focus'
     });
 
+    $(".deactivateGateway-button").click( function(){
+        var gatewayId = $(this).data("gatewayid");
+        $("#deactivateGatewayId").val( gatewayId);
+    });
 </script>
 @stop
\ No newline at end of file