airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndo...@apache.org
Subject [1/3] airavata-php-gateway git commit: 1)Gateway providers dont see Project/Experiment tabs 2)Gateway creation time added.
Date Fri, 23 Sep 2016 06:43:34 GMT
Repository: airavata-php-gateway
Updated Branches:
  refs/heads/develop 4eec7b23c -> 802e5295d


1)Gateway providers dont see Project/Experiment tabs
2)Gateway creation time added.


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

Branch: refs/heads/develop
Commit: 91377e5c1b46585e3965a4cd500c62273e3c9db2
Parents: 8e0f47a
Author: Nipurn Doshi <nipunhere@gmail.com>
Authored: Thu Sep 22 22:50:02 2016 -0700
Committer: Nipurn Doshi <nipunhere@gmail.com>
Committed: Thu Sep 22 22:50:02 2016 -0700

----------------------------------------------------------------------
 app/libraries/CommonUtilities.php        |  6 ++++--
 app/views/account/dashboard.blade.php    | 11 +++++++++++
 app/views/admin/manage-gateway.blade.php | 28 +++++++++++----------------
 3 files changed, 26 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/91377e5c/app/libraries/CommonUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/CommonUtilities.php b/app/libraries/CommonUtilities.php
index 337d973..bc45135 100644
--- a/app/libraries/CommonUtilities.php
+++ b/app/libraries/CommonUtilities.php
@@ -101,8 +101,10 @@ class CommonUtilities
     public static function create_nav_bar()
     {
         $menus = array();
-        if ( Session::has('loggedin') && (Session::has('authorized-user') || Session::has('admin')
-                || Session::has('admin-read-only'))) {
+        if  ( Session::has('loggedin') && 
+            ( Session::has('authorized-user') || Session::has('admin') || Session::has('admin-read-only'))
&&
+              !Session::has("gateway-provider")
+            ) {
             $menus = array
             (
                 'Project' => array

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/91377e5c/app/views/account/dashboard.blade.php
----------------------------------------------------------------------
diff --git a/app/views/account/dashboard.blade.php b/app/views/account/dashboard.blade.php
index 8200219..514a7be 100644
--- a/app/views/account/dashboard.blade.php
+++ b/app/views/account/dashboard.blade.php
@@ -27,6 +27,7 @@
                     <thead>
                         <tr class="text-center">
                             <th>Gateway Name</th>
+                            <th>Creation Time</th>
                             <th>Gateway Request Status</th>
                             <th>Actions</th>
                             <th>Comments</th>
@@ -36,6 +37,16 @@
                     @foreach( $requestedGateways as $gatewayId => $gateway)
                         <tr>
                             <td>{{ $gateway["gatewayInfo"]->gatewayName }}</td>
+                            <?php 
+                                $timeDifference = Session::get("user_timezone");
+                                $addOrSubtract = "-";
+                                if( $timeDifference < 0)
+                                    $addOrSubtract = "+";
+
+                                $creationTime = date('m/d/Y h:i:s A', 
+                                                    intval( strtotime( $addOrSubtract . "
" . Session::get("user_timezone") . " hours", $gateway["gatewayInfo"]->requestCreationTime/1000)
) );
+                            ?>
+                            <td>{{ $creationTime}}</td>
                             <td>{{ $gateway["approvalStatus"] }}</td>
                             <td>
                                 @if( $gateway["approvalStatus"] == "APPROVED")

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/91377e5c/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 2e97abc..f971afa 100644
--- a/app/views/admin/manage-gateway.blade.php
+++ b/app/views/admin/manage-gateway.blade.php
@@ -80,6 +80,7 @@
                                 <thead>
                                     <tr>
                                         <th>Gateway Name</th>
+                                        <th>Creation Time</th>
                                         <th>Admin Name</th>
                                         <th>Gateway URL</th>
                                         <th>Project Details</th>
@@ -100,24 +101,18 @@
                                 </thead>
                                 <tbody>
                                 @foreach( $gateways as $indexGP => $gp )
-                                    @if( $gatewayApprovalStatuses[$gp->gatewayApprovalStatus]
== "REQUESTED")
-                                    <tr class="gatewayRow gatewayStatus-{{$gatewayApprovalStatuses[$gp->gatewayApprovalStatus]}}">
-                                        <td>{{$gp->gatewayName }}</td>
-                                        <td>{{ $gp->gatewayAdminFirstName }} {{
$gp->gatewayAdminLastName }} </td>
-                                        <td>{{ $gp->gatewayURL }}</td>
-                                        <td>{{ $gp->reviewProposalDescription}}</td>
-                                        <td>{{ $gp->gatewayPublicAbstract}}</td>
-                                        <td>{{$gatewayApprovalStatuses[$gp->gatewayApprovalStatus]
}}</td>
-                                        <td>
-                                            <input type="button" class="btn btn-primary
btn-xs start-approval" data-gatewayobject="{{htmlentities(json_encode( $gp))}}" value="View"/>
-                                        </td>
-                                    </tr>
-                                    @endif
-                                @endforeach
-                                @foreach( $gateways as $indexGP => $gp )
-                                    @if( $gatewayApprovalStatuses[$gp->gatewayApprovalStatus]
!= "REQUESTED")
                                     <tr class="gatewayRow gatewayStatus-{{$gatewayApprovalStatuses[$gp->gatewayApprovalStatus]}}">
                                         <td>{{$gp->gatewayName }}</td>
+                                        <?php 
+
+                                            $timeDifference = Session::get("user_timezone");
+                                            $addOrSubtract = "-";
+                                            if( $timeDifference < 0)
+                                                $addOrSubtract = "+";
+
+                                            $creationTime = date('m/d/Y h:i:s A', intval(
strtotime( $addOrSubtract . " " . Session::get("user_timezone") . " hours", $gp->requestCreationTime/1000)
) );
+                                        ?>
+                                        <td>{{ $creationTime}}</td>
                                         <td>{{ $gp->gatewayAdminFirstName }} {{
$gp->gatewayAdminLastName }} </td>
                                         <td>{{ $gp->gatewayURL }}</td>
                                         <td>{{ $gp->reviewProposalDescription}}</td>
@@ -127,7 +122,6 @@
                                             <input type="button" class="btn btn-primary
btn-xs start-approval" data-gatewayobject="{{htmlentities(json_encode( $gp))}}" value="View"/>
                                         </td>
                                     </tr>
-                                    @endif
                                 @endforeach
                                 <!-- foreach code ends -->
                                 </tbody>


Mime
View raw message