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/08/27 19:11:54 UTC

[1/3] airavata-php-gateway git commit: Gateway Management changes

Repository: airavata-php-gateway
Updated Branches:
  refs/heads/develop 16184725c -> 3f22c2ace


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

Branch: refs/heads/develop
Commit: f8cb99027cc879298e62605e1513b13753c93ccc
Parents: f2f22bd
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Thu Aug 25 03:22:57 2016 -0700
Committer: Nipurn Doshi <ni...@gmail.com>
Committed: Thu Aug 25 03:22:57 2016 -0700

----------------------------------------------------------------------
 app/controllers/GatewayprofileController.php    |  2 +-
 app/libraries/CRUtilities.php                   |  8 ++++++
 app/views/account/dashboard.blade.php           | 27 ++++++++++++--------
 app/views/admin/manage-gateway.blade.php        | 27 +++++++++++---------
 .../compute-resource-preferences.blade.php      |  8 +++---
 5 files changed, 44 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/f8cb9902/app/controllers/GatewayprofileController.php
----------------------------------------------------------------------
diff --git a/app/controllers/GatewayprofileController.php b/app/controllers/GatewayprofileController.php
index 35b8b43..c536ef9 100644
--- a/app/controllers/GatewayprofileController.php
+++ b/app/controllers/GatewayprofileController.php
@@ -39,7 +39,7 @@ class GatewayprofileController extends BaseController {
 	public function modifyCRP()
 	{
 		if( CRUtilities::add_or_update_CRP( Input::all()) )
-		{
+		{            
 			if( Request::ajax()){
 				return 1;
 			}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/f8cb9902/app/libraries/CRUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/CRUtilities.php b/app/libraries/CRUtilities.php
index bf36256..e14bcec 100755
--- a/app/libraries/CRUtilities.php
+++ b/app/libraries/CRUtilities.php
@@ -525,6 +525,14 @@ class CRUtilities
 
     public static function add_or_update_CRP($inputs)
     {
+
+        $timeDifference = Session::get("user_timezone");
+        $addOrSubtract = "-";
+        if( $timeDifference > 0)
+            $addOrSubtract = "+";
+        $inputs = Input::all();
+        $inputs["reservationStartTime"] = strtotime( $addOrSubtract . " " . Session::get("user_timezone") . " hours", strtotime( $inputs["reservationStartTime"]) ) * 1000;
+        $inputs["reservationEndTime"] = strtotime( $addOrSubtract . " " . Session::get("user_timezone") . " hours", strtotime($inputs["reservationEndTime"]) ) * 1000;
         $computeResourcePreferences = new computeResourcePreference($inputs);
 
         if (Config::get('pga_config.airavata')['enable-app-catalog-cache']) {

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/f8cb9902/app/views/account/dashboard.blade.php
----------------------------------------------------------------------
diff --git a/app/views/account/dashboard.blade.php b/app/views/account/dashboard.blade.php
index ea520f3..b765f1b 100644
--- a/app/views/account/dashboard.blade.php
+++ b/app/views/account/dashboard.blade.php
@@ -27,7 +27,7 @@
                     <thead>
                         <tr class="text-center">
                             <th>Gateway Name</th>
-                            <th>Request Status</th>
+                            <th>Gateway Request Status</th>
                             <th>Actions</th>
                             <th>Comments</th>
                         </tr>
@@ -81,24 +81,20 @@
                         </div>
                         <div class="form-group required">
                             <label class="control-label">Gateway Name</label>
-                            <input type="text" name="gateway-name" class="form-control" required="required" value="{{Input::old('gateway-name') }}" />
-                        </div>
-                        <div class="form-group">
-                            <label class="control-label">Gateway Acronym <i>(optional)</i></label>
-                            <input type="text" name="gateway-acronym" class="form-control" value="{{Input::old('gateway-acronym') }}"/>
+                            <input type="text" maxlength="50" name="gateway-name" class="form-control" required="required" value="{{Input::old('gateway-name') }}" />
                         </div>
                         <div class="form-group required">
-                            <label class="control-label">Domain</label>
-                            <input type="url" name="domain" id="domain" class="form-control" value="{{Input::old('domain') }}"  data-container="body" data-toggle="popover" data-placement="left" data-content="Domain's main URL. eg:http://domain.org"/>
+                            <label class="control-label">Gateway Acronym </label>
+                            <input type="text" name="gateway-acronym" class="gateway-acronym form-control" required="required" value="{{Input::old('gateway-acronym') }}" maxlength="6" data-toggle="popover" data-placement="left" data-content="Acronym cannot contain digits or special characters."/>
                         </div>
 
                         <div class="form-group required">
                             <label class="control-label">Gateway URL</label>
-                            <input type="url" name="gateway-url" id="gateway-url" class="form-control" value="{{Input::old('gateway-url') }}" data-container="body" data-toggle="popover" data-placement="left" data-content="URL to Portal home page or Download URL (for desktop applications) where gateway has been deployed. eg:http://portal.domain.org"/>
+                            <input type="text" name="gateway-url" id="gateway-url" class="form-control" value="{{Input::old('gateway-url') }}" data-container="body" data-toggle="popover" data-placement="left" data-content="URL to Portal home page or Download URL (for desktop applications) where gateway has been deployed."/>
                         </div>
                         <div class="form-group required">
                             <label class="control-label">Gateway Admin Username</label>
-                            <input type="text" name="admin-username" value="{{ Session::get('username') }}" readonly="true" class="form-control" required="required" />
+                            <input type="text" name="admin-username" value="{{Input::old('admin-username')}}" class="form-control" required="required" />
                         </div>
                         <div class="form-group required">
                             <label class="control-label">Gateway Admin Password</label>
@@ -119,7 +115,7 @@
                             <input type="text" name="admin-lastname" class="form-control" required="required" value="{{Input::old('admin-lastname') }}"/>
                         </div>
                         <div class="form-group required">
-                            <label class="control-label">Gateway Email</label>
+                            <label class="control-label">Gateway Contact Email</label>
                             <input type="text" name="email-address" class="form-control" required="required" value="{{Input::old('email-address') }}"/>
                         </div>
                         <div class="form-group required">
@@ -447,6 +443,10 @@
         'trigger':'focus'
     });
 
+    $(".gateway-acronym").popover({
+        'trigger':'focus'
+    });
+
     $("#project-details").popover({
         'trigger':'focus'
     });
@@ -455,6 +455,11 @@
         'trigger':'focus'
     });
 
+    $("#add-tenant-form").on("submit", function(e){
+        e.preventDefault();
+        console.log( !/[^a-z]/i.test( $(".gateway-acronym").val()));
+    });
+
     $(".deactivateGateway-button").click( function(){
         var gatewayId = $(this).data("gatewayid");
         $("#deactivateGatewayId").val( gatewayId);

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/f8cb9902/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 b01b896..3988328 100644
--- a/app/views/admin/manage-gateway.blade.php
+++ b/app/views/admin/manage-gateway.blade.php
@@ -3,6 +3,7 @@
 @section('page-header')
 @parent
 {{ HTML::style('css/admin.css')}}
+{{ HTML::style('css/datetimepicker.css')}}
 @stop
 
 @section('content')
@@ -505,24 +506,26 @@
 
     /* making datetimepicker work for reservation start and end date */
 
-    $('#datetimepicker1').datetimepicker({
+    $('.datetimepicker1').datetimepicker({
         pick12HourFormat: false
     });
-    $('#datetimepicker2').datetimepicker({
-        pick12HourFormat: false
+    $('.datetimepicker2').datetimepicker({
+        pick12HourFormat: false,
+        useCurrent: false //Important! See issue #1075
     });
-    $("#datetimepicker1").on("dp.change", function (e) {
-        $('#datetimepicker2').data("DateTimePicker").setMinDate(e.date);
 
-        //hack to close calendar on selecting date
-        $(this).find(".glyphicon-calendar").click();
+    $(".datetimepicker1 input").focus( function(){
+        $(this).parent().find(".glyphicon-calendar").click();
+    });
+    $(".datetimepicker2 input").focus( function(){
+        $(this).parent().find(".glyphicon-calendar").click();
     });
-    $("#datetimepicker2").on("dp.change", function (e) {
-        $('#datetimepicker1').data("DateTimePicker").setMaxDate(e.date);
-
-        //hack to close calendar on selecting date
-        $(this).find(".glyphicon-calendar").click();
 
+    $(".datetimepicker1").on("dp.change", function (e) {
+        $('.datetimepicker2').data("DateTimePicker").setMinDate(e.date);
+    });
+    $(".datetimepicker2").on("dp.change", function (e) {
+        $('.datetimepicker1').data("DateTimePicker").setMaxDate(e.date);
     });
 
 </script>

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/f8cb9902/app/views/partials/compute-resource-preferences.blade.php
----------------------------------------------------------------------
diff --git a/app/views/partials/compute-resource-preferences.blade.php b/app/views/partials/compute-resource-preferences.blade.php
index 3b12a3e..9e23fe8 100644
--- a/app/views/partials/compute-resource-preferences.blade.php
+++ b/app/views/partials/compute-resource-preferences.blade.php
@@ -134,9 +134,9 @@
 <div class="form-group col-md-6">
     <label class="control-label col-md-3">Reservation Start Time</label>
 
-    <div class="col-md-9 input-group date" id="datetimepicker1">
+    <div class="input-group date datetimepicker1">
         <input type="text" name="reservationStartTime" class="form-control"
-               value="@if( isset( $preferences) ){{$preferences->qualityOfService}}@endif"/>
+               value="@if( isset( $preferences) ){{$preferences->reservationStartTime}}@endif"/>
         <span class="input-group-addon">
             <span class="glyphicon glyphicon-calendar"></span>
         </span>
@@ -146,9 +146,9 @@
 <div class="form-group col-md-6">
     <label class="control-label col-md-3">Reservation End Time</label>
 
-    <div class="col-md-9 input-group date"  id="datetimepicker2">
+    <div class="input-group date datetimepicker2">
         <input type="text" name="reservationEndTime" class="form-control"
-               value="@if( isset( $preferences) ){{$preferences->reservationEndTime}}@endif"/>
+               value="@if( isset( $preferences) ){{ date('mm/dd/yyyy h:i:s A T",$preferences->reservationEndTime) }}@endif"/>
         <span class="input-group-addon">
             <span class="glyphicon glyphicon-calendar"></span>
         </span>


[3/3] airavata-php-gateway git commit: Domain URL changes for Gateway request

Posted by nd...@apache.org.
Domain URL changes for Gateway request


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

Branch: refs/heads/develop
Commit: 3f22c2ace64f99fd93baf34173e3b0ece33b8ac0
Parents: 3f5ea2f
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Sat Aug 27 12:11:14 2016 -0700
Committer: Nipurn Doshi <ni...@gmail.com>
Committed: Sat Aug 27 12:11:14 2016 -0700

----------------------------------------------------------------------
 app/controllers/AdminController.php   |  2 +-
 app/libraries/AdminUtilities.php      | 19 +++++--------------
 app/views/account/dashboard.blade.php |  6 ++----
 3 files changed, 8 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/3f22c2ac/app/controllers/AdminController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AdminController.php b/app/controllers/AdminController.php
index e5396f9..a151bc3 100644
--- a/app/controllers/AdminController.php
+++ b/app/controllers/AdminController.php
@@ -21,7 +21,7 @@ class AdminController extends BaseController {
             $gatewayApprovalStatuses = AdminUtilities::get_gateway_approval_statuses();
 
             foreach ($gatewaysInfo as $index => $gateway) {
-                if ($gateway->identityServerUserName == $userProfile["username"]) {
+                if ($gateway->requesterUsername == $userProfile["username"]) {
                     $gatewayOfUser = $gateway->gatewayId;
                     Session::forget("super-admin");
                     Session::put("new-gateway-provider", true);

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/3f22c2ac/app/libraries/AdminUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/AdminUtilities.php b/app/libraries/AdminUtilities.php
index b7c5117..f1d1b33 100644
--- a/app/libraries/AdminUtilities.php
+++ b/app/libraries/AdminUtilities.php
@@ -29,14 +29,10 @@ class AdminUtilities
         $gateway = new Gateway( $inputs);
         $gateway->gatewayId = $inputs["gateway-name"];
         $gateway->gatewayApprovalStatus = GatewayApprovalStatus::REQUESTED;
-        if( strpos($inputs["domain"], "//") != false)
-            $inputs["domain"] = substr( $inputs["domain"], 2 + strpos($inputs["domain"], "//"));
-        $gateway->domain = $inputs["domain"];
+        $gateway->domain = 'airavata.' . $inputs["gateway-acronym"];
         $gateway->gatewayName = $inputs["gateway-name"];
         $gateway->emailAddress = $inputs["email-address"];
         $gateway->gatewayAcronym = $inputs["gateway-acronym"];
-        if( strpos($inputs["gateway-url"], "//") != false)
-            $inputs["gateway-url"] = substr( $inputs["gateway-url"], 2 + strpos($inputs["gateway-url"], "//"));
         $gateway->gatewayURL = $inputs["gateway-url"];
         $gateway->gatewayAdminFirstName = $inputs["admin-firstname"];
         $gateway->gatewayAdminLastName = $inputs["admin-lastname"];
@@ -44,6 +40,8 @@ class AdminUtilities
         $gateway->identityServerPasswordToken  = $inputs["admin-password"];
         $gateway->reviewProposalDescription = $inputs["project-details"];
         $gateway->gatewayPublicAbstract = $inputs["public-project-description"];
+        $userProfile = Session::get("user-profile");
+        $gateway->requesterUsername = $userProfile["username"];
 
         return Airavata::addGateway(Session::get('authz-token'), $gateway);
     }
@@ -86,10 +84,7 @@ class AdminUtilities
             $tenants = WSIS::getTenants();
             $tenantExists = false;
             foreach( $tenants as $tenant){
-                $gatewayURL = $gateway->gatewayURL;
-                if( strpos($gateway->gatewayURL, "//") != false)
-                    $gatewayURL = substr( $gateway->gatewayURL, 2 + strpos($gateway->gatewayURL, "//"));
-                if( $tenant->tenantDomain == $gateway->gatewayURL){
+                if( $tenant->tenantDomain == $gateway->domain){
                     $tenantExists = true;
                 }
             }
@@ -97,13 +92,9 @@ class AdminUtilities
                 $gatewayURL = $gateway->gatewayURL;
                 $gatewayDomain = $gateway->domain;
                 if( strpos($gateway->gatewayURL, "//") != false)
-                    $gatewayURL = substr( $gateway->gatewayURL, 2 + strpos($gateway->gatewayURL, "//"));
-
-                if( strpos($gateway->domain, "//") != false)
-                    $gatewayDomain = substr( $gateway->domain, 2 + strpos( $gateway->domain, "//"));
 
                 //finally create tenant
-                return WSIS::createTenant(1, $gateway->identityServerUserName . "@" . $gatewayDomain, $gateway->identityServerPasswordToken, $gateway->emailAddress,$gateway->gatewayAdminFirstName, $gateway->gatewayAdminLastName, $gatewayURL);
+                return WSIS::createTenant(1, $gateway->identityServerUserName, $gateway->identityServerPasswordToken, $gateway->emailAddress, $gateway->gatewayAdminFirstName, $gateway->gatewayAdminLastName, $gatewayDomain);
             }
             else
                 return false;

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/3f22c2ac/app/views/account/dashboard.blade.php
----------------------------------------------------------------------
diff --git a/app/views/account/dashboard.blade.php b/app/views/account/dashboard.blade.php
index b765f1b..ea9220b 100644
--- a/app/views/account/dashboard.blade.php
+++ b/app/views/account/dashboard.blade.php
@@ -435,10 +435,6 @@
         'trigger':'focus'
     });
 
-    $("#domain").popover({
-        'trigger':'focus'
-    });
-
     $("#gateway-url").popover({
         'trigger':'focus'
     });
@@ -455,10 +451,12 @@
         'trigger':'focus'
     });
 
+    /*
     $("#add-tenant-form").on("submit", function(e){
         e.preventDefault();
         console.log( !/[^a-z]/i.test( $(".gateway-acronym").val()));
     });
+    */
 
     $(".deactivateGateway-button").click( function(){
         var gatewayId = $(this).data("gatewayid");


[2/3] airavata-php-gateway git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/airavata-php-gateway into develop

Posted by nd...@apache.org.
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/airavata-php-gateway into develop


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

Branch: refs/heads/develop
Commit: 3f5ea2f2bead25005d6a9669509a6f416700a74e
Parents: f8cb990 1618472
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Thu Aug 25 03:23:17 2016 -0700
Committer: Nipurn Doshi <ni...@gmail.com>
Committed: Thu Aug 25 03:23:17 2016 -0700

----------------------------------------------------------------------
 app/controllers/ExperimentController.php        | 166 +++++++++++------
 app/controllers/ProjectController.php           |  83 +++++++--
 .../Airavata/Model/Messaging/Event/Types.php    | 124 +++++++++++--
 .../Airavata/Model/Workspace/Types.php          |  25 +++
 app/libraries/ExperimentUtilities.php           |  31 ++--
 app/libraries/ProjectUtilities.php              |  23 ++-
 app/libraries/SharingUtilities.php              |  28 ++-
 .../Wsis/Stubs/AuthenticationAdminStub.php      |   3 +
 app/routes.php                                  |   8 +
 app/views/experiment/create-complete.blade.php  |   2 +
 app/views/experiment/edit.blade.php             |   2 +
 .../partials/experiment-container.blade.php     |  16 +-
 app/views/partials/experiment-info.blade.php    |  29 ++-
 app/views/partials/sharing-form-modal.blade.php |   2 +-
 app/views/partials/streaming-data.blade.php     |   4 +
 app/views/project/browse.blade.php              |   4 +-
 app/views/project/edit.blade.php                |   3 +
 app/views/project/summary.blade.php             |  12 +-
 public/js/sharing/share.js                      |  77 +++++---
 public/js/sharing/sharing_utils.js              |   8 +-
 public/js/simstream.js                          | 180 +++++++++++++++++++
 21 files changed, 675 insertions(+), 155 deletions(-)
----------------------------------------------------------------------