airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndo...@apache.org
Subject [1/4] airavata-php-gateway git commit: Dashboard Experiments Overview Page in Progress
Date Thu, 14 May 2015 18:12:40 GMT
Repository: airavata-php-gateway
Updated Branches:
  refs/heads/master fa1b1c123 -> 0e68bf27b


Dashboard Experiments Overview Page in Progress


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

Branch: refs/heads/master
Commit: bc3634fdc93d207d8a0ef649293225263eaa215e
Parents: 0677c08
Author: Nipurn Doshi <nipunhere@gmail.com>
Authored: Thu May 14 11:04:06 2015 -0400
Committer: Nipurn Doshi <nipunhere@gmail.com>
Committed: Thu May 14 11:04:06 2015 -0400

----------------------------------------------------------------------
 app/controllers/AdminController.php             |   8 +-
 app/libraries/AdminUtilities.php                |   9 +-
 app/libraries/Utilities.php                     |   2 +-
 app/routes.php                                  |   1 +
 app/views/admin/manage-experiments.blade.php    | 224 ++++++++++++++++++-
 app/views/admin/manage-users.blade.php          |  24 +-
 .../partials/experiment-queue-block.blade.php   |   2 +-
 app/views/resource/browse.blade.php             |  77 ++++---
 app/views/scigap-admin/manage-gateway.blade.php |   2 +-
 9 files changed, 292 insertions(+), 57 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/bc3634fd/app/controllers/AdminController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AdminController.php b/app/controllers/AdminController.php
index fc0c244..b3c9ac4 100755
--- a/app/controllers/AdminController.php
+++ b/app/controllers/AdminController.php
@@ -94,7 +94,7 @@ class AdminController extends BaseController {
 	public function rolesView(){
 		$idStore = $this->idStore;
 		$roles = $idStore->getRoleNames();
-
+		var_dump( $roles); exit;
 		return View::make("admin/manage-roles", array("roles" => $roles));
 	}
 
@@ -141,9 +141,11 @@ class AdminController extends BaseController {
 
 		$idStore = $this->idStore;
 
+		$gateway = AdminUtilities::addGateway(Input::all() );
+
 		$tm = $idStore->createTenant(1, $inputs["admin-username"], $inputs["admin-password"],
$inputs["admin-email"],
                                   $inputs["admin-firstname"], $inputs["admin-lastname"],
$inputs["domain"]);
-		print_r( $tm); exit;
-		$gateway = AdminUtilities::addGateway(Input::all() );
+		
+		return $gateway;
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/bc3634fd/app/libraries/AdminUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/AdminUtilities.php b/app/libraries/AdminUtilities.php
index 5775991..c768874 100644
--- a/app/libraries/AdminUtilities.php
+++ b/app/libraries/AdminUtilities.php
@@ -2,10 +2,15 @@
 
 use Airavata\Model\Workspace\Gateway;
 
-public function addGateway( $input){
+class AdminUtilities{
+
+public static function addGateway( $input){
 	$gateway = new Gateway();
-	$gateway->domain = $input["domainName"];
+	$gateway->gatewayId = $input["gatewayName"];
+	$gateway->domain = $input["domain"];
 	$gateway->gatewayName = $input["gatewayName"];
 	$gateway->emailAddress = $input["admin-email"];
 	return Airavata::addGateway( $gateway);
+}
+
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/bc3634fd/app/libraries/Utilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/Utilities.php b/app/libraries/Utilities.php
index 722f326..0cf23e6 100644
--- a/app/libraries/Utilities.php
+++ b/app/libraries/Utilities.php
@@ -1035,7 +1035,7 @@ public static function clone_experiment($expId)
         //create new experiment to receive the clone
         $experiment = Airavata::getExperiment($expId);
 
-        $cloneId = $airavataclient->cloneExperiment($expId, 'Clone of ' . $experiment->name);
+        $cloneId = Airavata::cloneExperiment($expId, 'Clone of ' . $experiment->name);
 
         Utilities::print_success_message("<p>Experiment cloned!</p>" .
             '<p>You will be redirected to the edit page shortly, or you can

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/bc3634fd/app/routes.php
----------------------------------------------------------------------
diff --git a/app/routes.php b/app/routes.php
index 0bceb1a..2f98343 100755
--- a/app/routes.php
+++ b/app/routes.php
@@ -187,6 +187,7 @@ Route::post("admin/delete-role", "AdminController@deleteRole");
 //Super Admin Specific calls
 
 Route::post("admin/add-gateway", "AdminController@addGateway");
+Route::get("admin/add-gateway", "AdminController@addGateway");
 
 //Airavata Server Check
 Route::get("airavata/down", function(){

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/bc3634fd/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 0aaddc5..ebb693d 100644
--- a/app/views/admin/manage-experiments.blade.php
+++ b/app/views/admin/manage-experiments.blade.php
@@ -2,7 +2,8 @@
 
 @section('page-header')
     @parent
-    {{ HTML::style('css/admin.css')}}
+    {{ HTML::style('css/admin.css')}}    
+    {{ HTML::style('css/datetimepicker.css')}}            
 @stop
 
 @section('content')
@@ -36,6 +37,190 @@
                     </div>
                 </div>
 
+                <div class="dates row">
+                    <div class="col-md-12">
+                    Select dates between which you want to review experiments.
+                    </div>
+                    <div class="col-sm-8" style="height:75px;">
+                       <div class='col-md-6'>
+                            <div class="form-group">
+                                <div class='input-group date' id='datetimepicker9'>
+                                    <input type='text' class="form-control" placeholder="From
Date" name="from-date" value="<?php if (isset($_POST['from-date'])) echo $_POST['from-date']
?>"/>
+                                    <span class="input-group-addon"><span class="glyphicon
glyphicon-calendar"></span>
+                                    </span>
+                                </div>
+                            </div>
+                        </div>
+                        <div class='col-md-6'>
+                            <div class="form-group">
+                                <div class='input-group date' id='datetimepicker10'>
+                                    <input type='text' class="form-control"  placeholder="To
Date" name="to-date" value="<?php if (isset($_POST['to-date'])) echo $_POST['to-date']
?>"/>
+                                    <span class="input-group-addon"><span class="glyphicon
glyphicon-calendar"></span>
+                                    </span>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <!-- high level statistics -->
+                <div class="high-level-values row tex-center">
+                    <div class="col-lg-3 col-md-6">
+                        <div class="panel panel-primary">
+                            <div class="panel-heading">
+                                <div class="row">
+                                    <div class="col-xs-3">
+                                        <i class="fa fa-comments fa-5x"></i>
+                                    </div>
+                                    <div class="col-xs-9 text-right">
+                                        <div class="huge">26</div>
+                                        <div>Total Experiments</div>
+                                    </div>
+                                </div>
+                            </div>
+                            <a href="#">
+                                <div class="panel-footer">
+                                    <span class="pull-left">View Details</span>
+                                    <span class="pull-right"><span class="glyphicon
glyphicon-arrow-right"></span></span>
+                                    <div class="clearfix"></div>
+                                </div>
+                            </a>
+                        </div>
+                    </div>
+
+                    <div class="col-lg-3 col-md-6">
+                        <div class="panel panel-green">
+                            <div class="panel-heading">
+                                <div class="row">
+                                    <div class="col-xs-3">
+                                        <i class="fa fa-comments fa-5x"></i>
+                                    </div>
+                                    <div class="col-xs-9 text-right">
+                                        <div class="huge">16</div>
+                                        <div>Successful Experiments</div>
+                                    </div>
+                                </div>
+                            </div>
+                            <a href="#">
+                                <div class="panel-footer">
+                                    <span class="pull-left">View Details</span>
+                                    <span class="pull-right"><span class="glyphicon
glyphicon-arrow-right"></span></i></span>
+                                    <div class="clearfix"></div>
+                                </div>
+                            </a>
+                        </div>
+                    </div>
+
+                    <div class="col-lg-3 col-md-6">
+                        <div class="panel panel-yellow">
+                            <div class="panel-heading">
+                                <div class="row">
+                                    <div class="col-xs-3">
+                                        <i class="fa fa-comments fa-5x"></i>
+                                    </div>
+                                    <div class="col-xs-9 text-right">
+                                        <div class="huge">10</div>
+                                        <div>Canceled Experiments</div>
+                                    </div>
+                                </div>
+                            </div>
+                            <a href="#">
+                                <div class="panel-footer">
+                                    <span class="pull-left">View Details</span>
+                                    <span class="pull-right"><span class="glyphicon
glyphicon-arrow-right"></span></i></span>
+                                    <div class="clearfix"></div>
+                                </div>
+                            </a>
+                        </div>
+                    </div>
+
+                    <div class="col-lg-3 col-md-6">
+                        <div class="panel panel-red">
+                            <div class="panel-heading">
+                                <div class="row">
+                                    <div class="col-xs-3">
+                                        <i class="fa fa-comments fa-5x"></i>
+                                    </div>
+                                    <div class="col-xs-9 text-right">
+                                        <div class="huge">6</div>
+                                        <div>Failed Experiments</div>
+                                    </div>
+                                </div>
+                            </div>
+                            <a href="#">
+                                <div class="panel-footer">
+                                    <span class="pull-left">View Details</span>
+                                    <span class="pull-right"><span class="glyphicon
glyphicon-arrow-right"></span></span>
+                                    <div class="clearfix"></div>
+                                </div>
+                            </a>
+                        </div>
+                    </div>
+                </div>
+
+                <div class="row">
+                    <div class="col-lg-12">
+                        <div class="panel panel-primary">
+                            <div class="panel-heading">
+                                <h3 class="panel-title"><i class="fa fa-bar-chart-o"></i>
Line Graph Example with Tooltips</h3>
+                            </div>
+                            <div class="panel-body">
+                                <div class="flot-chart">
+                                    <div class="flot-chart-content" id="flot-line-chart"
style="padding: 0px; position: relative;">
+                                        <canvas class="base" width="1596" height="400"></canvas>
+                                        <canvas class="overlay" width="1596" height="400"
style="position: absolute; left: 0px; top: 0px;"></canvas>
+                                        <div class="tickLabels" style="font-size:smaller">
+                                            <div class="xAxis x1Axis" style="color:#545454">
+                                                <div class="tickLabel" style="position:absolute;text-align:center;left:-33px;top:383px;width:122px">0</div>
+                                                <div class="tickLabel" style="position:absolute;text-align:center;left:97px;top:383px;width:122px">1</div>
+                                                <div class="tickLabel" style="position:absolute;text-align:center;left:228px;top:383px;width:122px">2</div>
+                                                <div class="tickLabel" style="position:absolute;text-align:center;left:358px;top:383px;width:122px">3</div>
+                                                <div class="tickLabel" style="position:absolute;text-align:center;left:488px;top:383px;width:122px">4</div>
+                                                <div class="tickLabel" style="position:absolute;text-align:center;left:619px;top:383px;width:122px">5</div>
+                                                <div class="tickLabel" style="position:absolute;text-align:center;left:749px;top:383px;width:122px">6</div>
+                                                <div class="tickLabel" style="position:absolute;text-align:center;left:879px;top:383px;width:122px">7</div>
+                                                <div class="tickLabel" style="position:absolute;text-align:center;left:1010px;top:383px;width:122px">8</div>
+                                                <div class="tickLabel" style="position:absolute;text-align:center;left:1140px;top:383px;width:122px">9</div>
+                                                <div class="tickLabel" style="position:absolute;text-align:center;left:1270px;top:383px;width:122px">10</div>
+                                                <div class="tickLabel" style="position:absolute;text-align:center;left:1401px;top:383px;width:122px">11</div>
+                                            </div>
+                                            <div class="yAxis y1Axis" style="color:#545454">
+                                                <div class="tickLabel" style="position:absolute;text-align:right;top:337px;right:1575px;width:21px">-1.0</div>
+                                                <div class="tickLabel" style="position:absolute;text-align:right;top:259px;right:1575px;width:21px">-0.5</div>
+                                                <div class="tickLabel" style="position:absolute;text-align:right;top:182px;right:1575px;width:21px">0.0</div>
+                                                <div class="tickLabel" style="position:absolute;text-align:right;top:104px;right:1575px;width:21px">0.5</div>
+                                                <div class="tickLabel" style="position:absolute;text-align:right;top:26px;right:1575px;width:21px">1.0</div>
+                                            </div>
+                                        </div>
+                                        <div class="legend">
+                                            <div style="position: absolute; width: 45px;
height: 34px; top: 9px; right: 9px; opacity: 0.85; background-color: rgb(255, 255, 255);">
</div>
+                                            <table style="position:absolute;top:9px;right:9px;;font-size:smaller;color:#545454">
+                                                <tbody>
+                                                    <tr>
+                                                        <td class="legendColorBox">
+                                                            <div style="border:1px solid
#ccc;padding:1px">
+                                                                <div style="width:4px;height:0;border:5px
solid rgb(237,194,64);overflow:hidden"></div>
+                                                            </div>
+                                                        </td>
+                                                        <td class="legendLabel">sin(x)</td>
+                                                    </tr>
+                                                    <tr>
+                                                        <td class="legendColorBox">
+                                                            <div style="border:1px solid
#ccc;padding:1px"><div style="width:4px;height:0;border:5px solid rgb(175,216,248);overflow:hidden"></div></div>
+                                                        </td>
+                                                        <td class="legendLabel">cos(x)</td>
+                                                    </tr>
+                                                </tbody>
+                                            </table>
+                                        </div>
+                                    </div>
+
+                                    
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+
                 <div class="row">
                     <div class="tree">
                         <ul>
@@ -122,7 +307,9 @@
 
 @section('scripts')
     @parent
-    {{ HTML::script('js/gateway.js') }}
+    {{ HTML::script('js/gateway.js') }} 
+    {{ HTML::script('js/moment.js')}}   
+    {{ HTML::script('js/datetimepicker.js')}}            
     <script>
 
         //make first tab of accordion open by default.
@@ -164,6 +351,39 @@
 
             //Experiment stages are under development.
             $(".tree").parent().addClass("hide");
+
+            /* making datetimepicker work for exp search */
+
+            $('#datetimepicker9').datetimepicker({
+                pick12HourFormat: false
+            });
+            $('#datetimepicker10').datetimepicker({
+                pick12HourFormat: false
+            });
+            $("#datetimepicker9").on("dp.change",function (e) {
+               $('#datetimepicker10').data("DateTimePicker").setMinDate(e.date);
+            });
+            $("#datetimepicker10").on("dp.change",function (e) {
+               $('#datetimepicker9').data("DateTimePicker").setMaxDate(e.date);
+            });
+
+            /* selecting creation time */
+            $("#search-key").on("change", function(){
+                if( this.value == "creation-time")
+                {
+                    $(".search-text-block").addClass("hide");
+                    $(".select-dates").removeClass("hide");
+                    $("#search-value").removeAttr("required");
+
+                }
+                else
+                {
+                    $(".search-text-block").removeClass("hide");
+                    $(".select-dates").addClass("hide");
+                    $("#search-value").attr("required");
+                }
+            });
+
         });
     </script>
 @stop
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/bc3634fd/app/views/admin/manage-users.blade.php
----------------------------------------------------------------------
diff --git a/app/views/admin/manage-users.blade.php b/app/views/admin/manage-users.blade.php
index 5cbdb7b..5a500b5 100644
--- a/app/views/admin/manage-users.blade.php
+++ b/app/views/admin/manage-users.blade.php
@@ -75,27 +75,31 @@
                 <div class="modal-body">
                     <h4 class="roles-of-user"></h4>
                     <div class="roles-load">
-                        Getting User Roles. Please Wait...  
+                        Getting User Roles. Please Wait...  <img src="{{URL::to('/')}}ajax-loader.gif"/>
                     </div>
                     <div class="roles-list">
+                        <div class="add-role-area">
+                            <div class="form-group">
+                                <label class="control-label">Add a new role to the
user</label>
+                                <select name="new-role">
+                                    <option>Select a role</option>
+                                    @foreach( (array)$roles as $role)
+                                    <option value="{{role}}">{{$role}}</option>
+                                    @endforeach
+                                </select>
+                            </div>
+                        </div>
                     </div>  
                 </div>
                 <div class="modal-footer">
                     <div class="form-group">
-                        <input type="submit" class="btn btn-primary" data-dismiss="modal"
 value="Ok"/>
+                        <input type="submit" class="btn btn-primary" data-dismiss="modal"
 value="Close"/>
                     </div>
                 </div>
             </div>
             <input type="hidden" class="base-url" value="{{URL::to('/')}}"/>
         </div>
     </div>
-
-    <div class="role-block">
-        <div class="btn-group" role="group">
-            <button type="button" class="btn btn-default role-name" disabled>Role</button>
-            <button type="button" class="btn btn-default"><span class="glyphicon
glyphicon-remove"></span></button>
-        </div>
-    </div>
 @stop
 
 @section('scripts')
@@ -133,7 +137,7 @@
                 $(".role-block").find(".role-name").html( roles[i]);
                 var newRoleBlock = $(".role-block").html();
                 roleBlocks += newRoleBlock;
-                $(".roles-list").html( roleBlocks);
+                $(".roles-list").prepend( roleBlocks);
             }
             $(".roles-load").addClass("hide");
             $(".roles-list").removeClass("hide");

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/bc3634fd/app/views/partials/experiment-queue-block.blade.php
----------------------------------------------------------------------
diff --git a/app/views/partials/experiment-queue-block.blade.php b/app/views/partials/experiment-queue-block.blade.php
index a0453b0..2e2a947 100644
--- a/app/views/partials/experiment-queue-block.blade.php
+++ b/app/views/partials/experiment-queue-block.blade.php
@@ -38,7 +38,7 @@
         <input type="number" class="form-control" name="wall-time" id="wall-time" min="0"
         value="@if(isset($expVal) ){{ $expVal['scheduling']->wallTimeLimit }}@else{{$queueDefaults['wallTimeLimit']}}@endif"
         @if(isset($expVal)) @if(!$expVal['editable']){{disabled}} @endif @endif>
-        <span class="input-group-addon">minutes</span>
+        <span class="input-group-addon">hours</span>
     </div>
 </div>
 <div class="form-group">

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/bc3634fd/app/views/resource/browse.blade.php
----------------------------------------------------------------------
diff --git a/app/views/resource/browse.blade.php b/app/views/resource/browse.blade.php
index 3edcca6..7580200 100644
--- a/app/views/resource/browse.blade.php
+++ b/app/views/resource/browse.blade.php
@@ -19,47 +19,50 @@
             {{ Utilities::print_warning_message('No Compute Resources are registered. Please
use "Register Compute Resource" to register a new resources.') }}
         @else
             <div class="col-md-12">
+            <div class="row">
                 <div class="col-md-6">
                     <h3 style="margin:0;">Existing Compute Resources :</h3>
                 </div>
                 <input type="text" class="pull-right filterinput col-md-6" placeholder="Search
by Compute Resource Name"/>
-            <div class="table-responsive">
-                <table class="table">
-
-                    <tr>
-
-                        <th>Name</th>
-                        <th>Id</th>
-                        <th>Edit</th>
-                        <th>View</th>
-                        <th>Delete</th>
-                    </tr>
-
-            @foreach ($allCRs as $crId => $crName)
-
-	                <tr id="crDetails">
-	                    <td>{{ $crName }}</td>
-	                    <td>{{ $crId }}</td>
-	                    <td><a href="{{URL::to('/')}}/cr/edit?crId={{ $crId }}" title="Edit">
-	                            <span class="glyphicon glyphicon-pencil"></span>
-	                        </a>
-	                    </td>
-	                    <td>
-	                        <a  class="view-cr" href="#" > <!-- {{URL::to('/')}}/cr/summary?crId={{
$crId }}"> -->
-	                            <span class="glyphicon glyphicon-list"></span>
-	                        </a>
-	                    </td>
-	                    <td>
-	                    	<a href="#" title="Delete">
-	                    		<span class="glyphicon glyphicon-trash del-cr"  data-toggle="modal"
data-target="#delete-cr-block"  data-delete-cr-name="{{$crName}}" data-deployment-count="{{$connectedDeployments[$crId]}}"
data-crid="{{$crId}}" ></span>
-	                    	</a>
-	                    </td>
-	                </tr>
-	            @endforeach
-
-	           </table>
-			</div>
-
+            </div>
+            <div class="row">
+                <div class="table-responsive">
+                    <table class="table">
+
+                        <tr>
+
+                            <th>Name</th>
+                            <th>Id</th>
+                            <th>Edit</th>
+                            <th>View</th>
+                            <th>Delete</th>
+                        </tr>
+
+                @foreach ($allCRs as $crId => $crName)
+
+    	                <tr id="crDetails">
+    	                    <td>{{ $crName }}</td>
+    	                    <td>{{ $crId }}</td>
+    	                    <td><a href="{{URL::to('/')}}/cr/edit?crId={{ $crId }}"
title="Edit">
+    	                            <span class="glyphicon glyphicon-pencil"></span>
+    	                        </a>
+    	                    </td>
+    	                    <td>
+    	                        <a  class="view-cr" href="#" > <!-- {{URL::to('/')}}/cr/summary?crId={{
$crId }}"> -->
+    	                            <span class="glyphicon glyphicon-list"></span>
+    	                        </a>
+    	                    </td>
+    	                    <td>
+    	                    	<a href="#" title="Delete">
+    	                    		<span class="glyphicon glyphicon-trash del-cr"  data-toggle="modal"
data-target="#delete-cr-block"  data-delete-cr-name="{{$crName}}" data-deployment-count="{{$connectedDeployments[$crId]}}"
data-crid="{{$crId}}" ></span>
+    	                    	</a>
+    	                    </td>
+    	                </tr>
+    	            @endforeach
+
+    	           </table>
+    			</div>
+            </div>
         @endif
     @endif
 

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/bc3634fd/app/views/scigap-admin/manage-gateway.blade.php
----------------------------------------------------------------------
diff --git a/app/views/scigap-admin/manage-gateway.blade.php b/app/views/scigap-admin/manage-gateway.blade.php
index 2a7a4d8..288e122 100644
--- a/app/views/scigap-admin/manage-gateway.blade.php
+++ b/app/views/scigap-admin/manage-gateway.blade.php
@@ -175,7 +175,7 @@
                     $(".gateway-error").html(data).removeClass("hide");
                 }
             }).complete( function(){
-                $("add-gateway-loading").modal("hide");
+                $("#add-gateway-loading").modal("hide");
             });
         });
     </script>


Mime
View raw message