airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndo...@apache.org
Subject [4/4] airavata-php-gateway git commit: 1) New Console UI after logging in for Admins 2) Routing changes 3) Addition of Data Storage UI ( In progress ) 4) Experiment Statistics UI changes
Date Thu, 12 Nov 2015 15:21:56 GMT
1) New Console UI after logging in for Admins
2) Routing changes
3) Addition of Data Storage UI ( In progress )
4) Experiment Statistics UI changes


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

Branch: refs/heads/develop
Commit: ec87b34f30845cbf79db36f35793fb906591d045
Parents: ea9e0f1
Author: Nipurn Doshi <Nipurn Doshi>
Authored: Thu Nov 12 10:21:12 2015 -0500
Committer: Nipurn Doshi <Nipurn Doshi>
Committed: Thu Nov 12 10:21:12 2015 -0500

----------------------------------------------------------------------
 app/controllers/AccountController.php           |  2 +-
 app/controllers/AdminController.php             |  5 +-
 app/libraries/CRUtilities.php                   | 14 ++++
 app/libraries/Wsis/Wsis.php                     |  2 +
 app/routes.php                                  |  2 +-
 app/views/admin/dashboard.blade.php             | 47 +++++++++-----
 app/views/admin/manage-experiments.blade.php    | 27 ++++----
 app/views/admin/manage-gateway.blade.php        | 68 +++++++++++++++++++-
 app/views/layout/basic.blade.php                |  7 +-
 app/views/partials/dashboard-block.blade.php    | 12 ++--
 .../partials/experiment-container.blade.php     |  4 +-
 composer.json                                   |  3 +-
 public/css/admin.css                            |  4 ++
 13 files changed, 150 insertions(+), 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/ec87b34f/app/controllers/AccountController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php
index 4785316..59b5133 100755
--- a/app/controllers/AccountController.php
+++ b/app/controllers/AccountController.php
@@ -203,7 +203,7 @@ class AccountController extends BaseController
             return View::make('home');
         }
 
-        return Redirect::to("home");
+        return Redirect::to("admin/console");
     }
 
     public function forgotPassword()

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/ec87b34f/app/controllers/AdminController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AdminController.php b/app/controllers/AdminController.php
index bead073..05a0529 100644
--- a/app/controllers/AdminController.php
+++ b/app/controllers/AdminController.php
@@ -33,9 +33,7 @@ class AdminController extends BaseController {
 			return View::make( $view, $gatewayData);
 		}
 		else{
-        	Session::put("admin-nav", "exp-statistics");
-			$view = "admin/manage-experiments";
-			return View::make( $view);
+        	return View::make("admin/dashboard");
 
         }
 	}
@@ -83,6 +81,7 @@ class AdminController extends BaseController {
 		//Session::put("scigap_admin", true);
 		$crData = CRUtilities::getEditCRData();
 		$gateways = CRUtilities::getAllGatewayProfilesData();
+		//$dsData = CRUtilities::getAllDataStoragePreferences( $gateways);
 		$gatewayData = array( 
 								"gateways" => $gateways, 
 								"computeResources" => CRUtilities::getAllCRObjects(),

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/ec87b34f/app/libraries/CRUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/CRUtilities.php b/app/libraries/CRUtilities.php
index ba89291..087047b 100755
--- a/app/libraries/CRUtilities.php
+++ b/app/libraries/CRUtilities.php
@@ -582,6 +582,20 @@ class CRUtilities
         return $computeResources;
     }
 
+    /**
+    * Get a list of all Data Storages available 
+    * @param null
+    * @return 
+    **/
+
+    public static function getAllDataStoragePreferences( $gateways){
+        $dspArray = array();
+        foreach( $gateways as $gateway){
+            $dspArray[] = Airavata::getAllGatewayDataStoragePreferences( Session::get('authz-token'),
$gateway->gatewayId);
+        }
+        return $dspArray;
+    }
+
 }
 
 ?>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/ec87b34f/app/libraries/Wsis/Wsis.php
----------------------------------------------------------------------
diff --git a/app/libraries/Wsis/Wsis.php b/app/libraries/Wsis/Wsis.php
index 69c0e2f..57693b5 100755
--- a/app/libraries/Wsis/Wsis.php
+++ b/app/libraries/Wsis/Wsis.php
@@ -94,8 +94,10 @@ class Wsis {
         try {
             $this->userStoreManager = new UserStoreManager($service_url, $parameters);
             $this->tenantManager = new TenantManager($service_url, $parameters);
+            /*
             $this->userProfileManager = new UserProfileManager($service_url, $parameters);
             $this->userInfoRecoveryManager = new UserInformationRecoveryManager($service_url,
$parameters);
+            */
             $this->oauthManger = new OAuthManager(Config::get('pga_config.wsis')['service-url'],
$verify_peer, $cafile_path);
         } catch (Exception $ex) {
             throw new Exception("Unable to instantiate WSO2 IS client", 0, $ex);

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/ec87b34f/app/routes.php
----------------------------------------------------------------------
diff --git a/app/routes.php b/app/routes.php
index 0878889..d402c9b 100755
--- a/app/routes.php
+++ b/app/routes.php
@@ -169,7 +169,7 @@ Route::get("admin/console", "AdminController@console");
 
 Route::get("admin/dashboard", "AdminController@dashboard");
 
-Route::get("admin/dashboard/gateway", "AdminController@dashboard");
+Route::get("admin/dashboard/gateway", "AdminController@gatewayView");
 
 Route::get("admin/dashboard/users", "AdminController@usersView");
 

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/ec87b34f/app/views/admin/dashboard.blade.php
----------------------------------------------------------------------
diff --git a/app/views/admin/dashboard.blade.php b/app/views/admin/dashboard.blade.php
index 77b57e0..4c7b931 100644
--- a/app/views/admin/dashboard.blade.php
+++ b/app/views/admin/dashboard.blade.php
@@ -2,6 +2,7 @@
 
 @section('page-header')
 @parent
+{{ HTML::style('css/admin.css')}}
 @stop
 
 @section('content')
@@ -19,49 +20,62 @@
         @endif
 
         <div class="row text-center">
-            <h1>Admin Console</h1>
+            <h1>Let's get started!</h1>
         </div>
         <div class="row text-center admin-options">
 
             <div class="row">
-                <a href="{{URL::to('/')}}/manage/users">
+                <a href="{{URL::to('/')}}/admin/dashboard/experiments">
                     <div class="col-md-3 well">
                         <div class="col-md-12">
-                            <span class="glyphicon glyphicon-user"></span>
+                            <span class="glyphicon glyphicon-off console-icon"></span>
                         </div>
                         <div class="col-md-12">
-                            Users
+                            Experiments
                         </div>
                     </div>
                 </a>
 
-                <a href="{{URL::to('/')}}/admin/dashboard">
+                <a href="{{URL::to('/')}}/admin/dashboard/users">
                     <div class=" col-md-offset-1 col-md-3 well">
                         <div class="col-md-12">
-                            <span class="glyphicon glyphicon-eye-open"></span>
+                            <span class="glyphicon glyphicon-user  console-icon"></span>
                         </div>
                         <div class="col-md-12">
-                            Admins
+                            Users
                         </div>
                     </div>
                 </a>
 
-                <a href="{{URL::to('/')}}/cr/browse">
+                <a href="{{URL::to('/')}}/admin/dashboard/roles">
                     <div class=" col-md-offset-1 col-md-3 well">
                         <div class="col-md-12">
-                            <span class="glyphicon glyphicon-briefcase"></span>
+                            <span class="glyphicon glyphicon-eye-open  console-icon"></span>
                         </div>
                         <div class="col-md-12">
-                            Resources
+                            Roles
                         </div>
                     </div>
                 </a>
+
             </div>
 
             <div class="row">
-                <div class="col-md-3 well">
+
+                <a href="{{URL::to('/')}}/cr/browse">
+                    <div class="col-md-3 well">
+                        <div class="col-md-12">
+                            <span class="glyphicon glyphicon-briefcase  console-icon"></span>
+                        </div>
+                        <div class="col-md-12">
+                            Resources
+                        </div>
+                    </div>
+                </a>
+
+                <div class="col-md-offset-1 col-md-3 well">
                     <div class="col-md-12">
-                        <span class="glyphicon glyphicon-tasks"></span>
+                        <span class="glyphicon glyphicon-tasks  console-icon"></span>
                     </div>
                     <div class="col-md-12">
                         Application Catalog
@@ -76,7 +90,7 @@
 
                 <div class=" col-md-offset-1 col-md-3 well">
                     <div class="col-md-12">
-                        <span class="glyphicon glyphicon-sort"></span>
+                        <span class="glyphicon glyphicon-sort console-icon"></span>
                     </div>
                     <div class="col-md-12">
                         Gateways
@@ -87,10 +101,10 @@
                         <option value="{{URL::to('/')}}/gp/browse">Browse</option>
                     </select>
                 </div>
-
+                <!--
                 <div class=" col-md-offset-1 col-md-3 well">
                     <div class="col-md-12">
-                        <span class="glyphicon glyphicon-list-alt"></span>
+                        <span class="glyphicon glyphicon-list-alt console-icon"></span>
                     </div>
                     <div class="col-md-12">
                         Reports
@@ -101,13 +115,14 @@
             <div class="row">
                 <div class="col-md-3 well">
                     <div class="col-md-12">
-                        <span class="glyphicon glyphicon-question-sign"></span>
+                        <span class="glyphicon glyphicon-question-sign console-icon"></span>
                     </div>
                     <div class="col-md-12">
                         Support
                     </div>
                 </div>
             </div>
+            -->
 
         </div>
     </div>

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/ec87b34f/app/views/admin/manage-experiments.blade.php
----------------------------------------------------------------------
diff --git a/app/views/admin/manage-experiments.blade.php b/app/views/admin/manage-experiments.blade.php
index ad5c0d6..c3f009b 100644
--- a/app/views/admin/manage-experiments.blade.php
+++ b/app/views/admin/manage-experiments.blade.php
@@ -13,17 +13,10 @@
 @include( 'partials/dashboard-block')
 <div id="page-wrapper">
 <div class="col-md-12">
-    <h3>Experiments</h3>
+    <h2>Experiments</h2>
 </div>
 <div class="container-fluid">
 
-<div class="row">
-    <!--
-        <div class="well col-md-2 text-center">
-            Total 500
-        </div>
-    -->
-
     <div class="well form-group form-horizontal col-md-12">
         <label class="col-md-3">Enter Experiment Id to View Summary :</label>
 
@@ -36,9 +29,7 @@
         <div class="experiment-info col-md-12">
         </div>
     </div>
-</div>
 
-<div class="dates row">
     <div class="well col-md-12">
         <div class="col-md-10">
             <div class='col-md-5'>
@@ -83,7 +74,6 @@
     </div>
     <div class="experiment-statistics"></div>
     <div class="loading-img-statistics hide text-center"><img src="{{URL::to('/')}}/assets/ajax-loader.gif"/></div>
-</div>
 
 <!--<div class="row">-->
 <!--    <div class="col-lg-12">-->
@@ -387,7 +377,8 @@ to be uncommented when actually in use.
         $("#datetimepicker10").find("input").val( todayDate);
         todayDate = moment(todayDate).utc().format('MM/DD/YYYY hh:mm a');
         ydayDate = moment(ydayDate).utc().format('MM/DD/YYYY hh:mm a');
-        getExperiments( ydayDate, todayDate);
+        var msg = "Experiments statistics from last 24 hours";
+        getExperiments( ydayDate, todayDate, msg);
     });
 
     $(".oneWeekExp").click( function(){
@@ -397,7 +388,8 @@ to be uncommented when actually in use.
         $("#datetimepicker10").find("input").val( todayDate);
         todayDate = moment(todayDate).utc().format('MM/DD/YYYY hh:mm a');
         ydayDate = moment(ydayDate).utc().format('MM/DD/YYYY hh:mm a');
-        getExperiments( ydayDate, todayDate);
+        var msg = "Experiments statistics from last week";
+        getExperiments( ydayDate, todayDate, msg);
     })
 
     $("#getStatistics").click(function () {
@@ -412,14 +404,19 @@ to be uncommented when actually in use.
         }
     });
 
-    function getExperiments( startTime, endTime){
+    // Load experiments from the last 24 hours on page load.
+    $(".oneDayExp").click();
+
+    function getExperiments( startTime, endTime, msg){
         $(".experiment-statistics").html("");
         $(".loading-img-statistics").removeClass("hide");
             $.ajax({
                 url: 'experimentStatistics?fromTime=' + startTime + '&' + 'toTime=' +
endTime,
                 type: 'get',
                 success: function (data) {
-                    $(".experiment-statistics").html(data);
+                    if( msg == null)
+                        msg = "Experiment Statistics from " + startTime + " to " + endTime;
+                    $(".experiment-statistics").html( "<h2 class='text-center'>" +
msg + "</h2><hr/>" + data);
                 }
             }).complete(function () {
                 $(".loading-img-statistics").addClass("hide");

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/ec87b34f/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 6910543..96fb926 100644
--- a/app/views/admin/manage-gateway.blade.php
+++ b/app/views/admin/manage-gateway.blade.php
@@ -80,10 +80,11 @@
                                     </div>
                                     @endif
                                 </div>
+                                    
                                     <div class="col-md-10">
                                         @if( isset( $gp->profile->computeResourcePreferences)
)
                                         <div>
-                                            <h3>Compute Resources Preferences :</h3>
+                                            <h3>Compute Resource Preferences :</h3>
                                         </div>
                                         <div class="accordion-inner">
                                             <div class="panel-group" id="accordion-{{$indexGP}}">
@@ -151,6 +152,71 @@
                                         </form>
                                         -->
                                     </div>
+
+                                    <div class="col-md-10">
+                                        <button class="btn btn-default add-dsp" data-gpid="{{$gp->gatewayId}}"><span
+                                                class="glyphicon glyphicon-plus"></span>
Add a Data Storage Preference
+                                        </button>
+                                    </div>
+
+                                    <div class="col-md-10">
+                                        @if( isset( $gp->profile->dataStoragePreferences)
)
+                                        <div>
+                                            <h3>Data Storage Preferences :</h3>
+                                        </div>
+
+                                        <div class="accordion-inner">
+                                            <div class="panel-group" id="accordion-{{$indexGP}}">
+                                                @foreach( (array)$gp->profile->dataStoragePreferences
as $indexDSP
+                                                => $dsp )
+                                                <div class="panel panel-default">
+                                                    <div class="panel-heading">
+                                                        <h4 class="panel-title">
+                                                            <a class="accordion-toggle
collapsed gateway-name"
+                                                               data-toggle="collapse" data-parent="#accordion"
+                                                               href="#collapse-dsp-{{$indexGP}}-{{$indexDSP}}">
+                                                                {{ $dsp->dataMovememtResourceId
}}
+                                                            </a>
+                                                            @if(Session::has("admin"))
+                                                            <div class="pull-right col-md-2
gateway-options fade">
+                                                                <span class="glyphicon
glyphicon-remove remove-resource"
+                                                                      style="cursor:pointer;"
data-toggle="modal"
+                                                                      data-target="#remove-resource-block"
+                                                                      data-dsp-id="{{$ds->computeResourceId}}"
+                                                                      data-gp-id="{{ $gp->gatewayId
}}"></span>
+                                                            </div>
+                                                            @endif
+                                                        </h4>
+                                                    </div>
+                                                    <div id="collapse-dsp-{{$indexGP}}-{{$indexDSP}}"
+                                                         class="panel-collapse collapse">
+                                                        <div class="panel-body">
+                                                            <div class="app-data-storage-preferences-block">
+                                                                <form action="{{URL::to('/')}}/gp/update-dsp"
+                                                                      method="POST">
+                                                                    <input type="hidden"
name="gatewayId" id="gatewayId"
+                                                                           value="{{$gp->gatewayId}}">
+                                                                    <input type="hidden"
name="dataStorageId"
+                                                                           id="gatewayId"
+                                                                           value="{{$crp->dataMovememtResourceId}}">
+
+                                                                    <div class="form-horizontal">
+                                                                        @include('partials/gateway-preferences',
+                                                                        array('computeResource'
=> $crp->crDetails,
+                                                                        'crData' => $crData,
'preferences'=>$crp,
+                                                                        'show'=>true))
+                                                                    </div>
+                                                                </form>
+                                                            </div>
+                                                        </div>
+                                                    </div>
+                                                </div>
+                                                @endforeach
+                                            </div>
+                                        </div>
+                                        @endif
+
+                                    </div>
                                 </div>
                             </div>
                         </div>

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/ec87b34f/app/views/layout/basic.blade.php
----------------------------------------------------------------------
diff --git a/app/views/layout/basic.blade.php b/app/views/layout/basic.blade.php
index 475ba6e..ea4c1da 100755
--- a/app/views/layout/basic.blade.php
+++ b/app/views/layout/basic.blade.php
@@ -49,7 +49,12 @@ var fullName = "{{Session::get("user-profile")["firstname"] . " " . Session::get
 @endif
 
 <!--  PGA UI lies here. Do not touch. -->
-<div class="row">
+<style>
+.content-area{
+    margin:0;
+}
+</style>
+<div class="row content-area">
     @yield('content')
 </div>
 

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/ec87b34f/app/views/partials/dashboard-block.blade.php
----------------------------------------------------------------------
diff --git a/app/views/partials/dashboard-block.blade.php b/app/views/partials/dashboard-block.blade.php
index 5ca1088..563e6a7 100644
--- a/app/views/partials/dashboard-block.blade.php
+++ b/app/views/partials/dashboard-block.blade.php
@@ -5,17 +5,17 @@
         <li
             @if( Session::has("admin-nav") && Session::get("admin-nav") == "exp-statistics")
class="active" @endif>
             <a class="dashboard-link"  href="{{ URL::to('/')}}/admin/dashboard/experiments">
-                <i class="fa fa-fw fa-experiments"></i>Experiment Statistics
+                <span class="glyphicon glyphicon-off"></span>&nbsp; Experiment
Statistics
             </a>
         </li>
 
         <li
         @if( Session::has("admin-nav") && Session::get("admin-nav") == "manage-users")
class="active" @endif>
-            <a class="dashboard-link" href="{{ URL::to('/')}}/admin/dashboard/users"><i
class="fa fa-fw fa-bar-chart-o"></i> Users</a>
+            <a class="dashboard-link" href="{{ URL::to('/')}}/admin/dashboard/users"><span
class="glyphicon glyphicon-user"></span>&nbsp; Users</a>
         </li>
         <li
          @if( Session::has("admin-nav") && Session::get("admin-nav") == "manage-roles")
class="active" @endif>
-            <a class="dashboard-link" href="{{ URL::to('/')}}/admin/dashboard/roles"><i
class="fa fa-fw fa-table"></i>Roles</a>
+            <a class="dashboard-link" href="{{ URL::to('/')}}/admin/dashboard/roles"><span
class="glyphicon glyphicon-eye-open"></span>&nbsp; Roles</a>
         </li>
 
 <!--        <li-->
@@ -24,7 +24,7 @@
 <!--                Store</a>-->
 <!--        </li>-->
         <li>
-            <a><i class="fa fa-fw fa-table"></i>Compute Resources</a>
+            <a><span class="glyphicon glyphicon-briefcase"></span>&nbsp;
Compute Resources</a>
             <ul>
                 @if(Session::has("admin"))
                 <li
@@ -42,7 +42,7 @@
 
         </li>
         <li>
-            <a><i class="fa fa-fw fa-table"></i>App Catalog</a>
+            <a><span class="glyphicon glyphicon-tasks"></span>&nbsp;
App Catalog</a>
             <ul>
                 @if(Session::has("admin") || Session::has("admin-read-only"))
                 <li
@@ -64,7 +64,7 @@
 
         <li
             @if( Session::has("admin-nav") && Session::get("admin-nav") == "gateway-prefs")
class="active" @endif>
-            <a class="dashboard-link" href="{{ URL::to('/')}}/admin/dashboard/gateway"><i
class="fa fa-fw fa-dashboard"></i>@if(
+            <a class="dashboard-link" href="{{ URL::to('/')}}/admin/dashboard/gateway"><span
class="glyphicon glyphicon-sort"></span>&nbsp; @if(
                 Session::has("scigap_admin"))Gateways @else Gateway Preferences @endif</a>
         </li>
 <!--        <li>-->

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/ec87b34f/app/views/partials/experiment-container.blade.php
----------------------------------------------------------------------
diff --git a/app/views/partials/experiment-container.blade.php b/app/views/partials/experiment-container.blade.php
index 493bc73..defae90 100644
--- a/app/views/partials/experiment-container.blade.php
+++ b/app/views/partials/experiment-container.blade.php
@@ -1,9 +1,9 @@
 @if ( isset($expContainer))
     @if (sizeof($expContainer) == 0)
         @if (isset($pageNo) && $pageNo == 1) {
-            CommonUtilities::print_warning_message('No results found. Please try again.')
+            {{ CommonUtilities::print_warning_message('No results found. Please try again.')
}}
         @else
-            CommonUtilities::print_warning_message('No more results found.')
+            {{ CommonUtilities::print_warning_message('No more results found.') }}
         @endif
     @else
     <div id="re" class="table-responsive">

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/ec87b34f/composer.json
----------------------------------------------------------------------
diff --git a/composer.json b/composer.json
index e9d4734..4ef0089 100755
--- a/composer.json
+++ b/composer.json
@@ -6,7 +6,8 @@
     "require": {
         "laravel/framework": "4.2.*",
         "teepluss/theme": "1.*@dev",
-        "phpmailer/phpmailer": "v5.2.13"
+        "phpmailer/phpmailer": "v5.2.13",
+        "moon/properties": "0.1"
     },
     "autoload": {
         "classmap": [

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/ec87b34f/public/css/admin.css
----------------------------------------------------------------------
diff --git a/public/css/admin.css b/public/css/admin.css
index 9ab3253..9259ec9 100644
--- a/public/css/admin.css
+++ b/public/css/admin.css
@@ -17,6 +17,10 @@ body {
     }
 }
 
+.console-icon{
+    font-size: 3em;
+}
+
 #wrapper {
     padding-left: 0;
 }


Mime
View raw message