You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sm...@apache.org on 2015/04/09 17:41:43 UTC

[01/12] airavata-php-gateway git commit: Multi tenancy roles and users progress

Repository: airavata-php-gateway
Updated Branches:
  refs/heads/master fcdbe4ccf -> c644bc8ec


Multi tenancy roles and users 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/861e7779
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/861e7779
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/861e7779

Branch: refs/heads/master
Commit: 861e777946fe45e096e6b524ae0f809e383ba2cd
Parents: fcdbe4c
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Thu Mar 12 11:16:57 2015 -0400
Committer: Suresh Marru <sm...@apache.org>
Committed: Thu Apr 9 11:33:23 2015 -0400

----------------------------------------------------------------------
 app/config/app_config.ini                       |   3 +-
 app/controllers/AdminController.php             |  45 +++-
 app/filters.php                                 |   2 +
 app/libraries/AppUtilities.php                  |   2 +-
 .../UserStoreManager/UserStoreManager.php       |   6 +-
 app/libraries/WSISClient.php                    |  20 +-
 app/libraries/wsis_utilities.php                |  24 ++-
 app/routes.php                                  |   2 +
 app/views/admin/manage-admin1.blade.php         | 109 ----------
 app/views/admin/manage-gateway.blade.php        | 213 +++++++++++++++++++
 app/views/admin/manage-roles.blade.php          |  93 +++++++-
 app/views/admin/manage-users.blade.php          |  51 ++++-
 app/views/application/interface.blade.php       |  36 ++--
 app/views/partials/dashboard-block.blade.php    |   2 +-
 public/css/admin.css                            |   3 +-
 public/css/bootstrap.min.css                    |   4 +
 16 files changed, 462 insertions(+), 153 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/861e7779/app/config/app_config.ini
----------------------------------------------------------------------
diff --git a/app/config/app_config.ini b/app/config/app_config.ini
index b6144d6..194938a 100644
--- a/app/config/app_config.ini
+++ b/app/config/app_config.ini
@@ -12,7 +12,8 @@ admin-username = "test@testphprg.scigap.org"
 
 ;Tenant admin's password
 admin-password = "testadmin@scigap.org"
-;Super admin-password = "sci9067@min"
+;Super Admin's password
+;admin-password = "sci9067@min"
 
 ;Identity server domain
 server = "idp.scigap.org"

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/861e7779/app/controllers/AdminController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AdminController.php b/app/controllers/AdminController.php
index bdf539a..425d0a2 100644
--- a/app/controllers/AdminController.php
+++ b/app/controllers/AdminController.php
@@ -28,6 +28,8 @@ class AdminController extends BaseController {
 	}
 
 	public function dashboard(){
+
+		//Session::put("scigap_admin", true);
 		$idStore = $this->idStore;
 		//$ti = $idStore->createTenant( Input::all() );
 		//print_r( $ti); exit;
@@ -35,11 +37,15 @@ class AdminController extends BaseController {
 		foreach ($roles as $key => $role) {
 			//$gatewayAdmins = $idStore->getUserListOfRole
 		}
+		$crData = CRUtilities::getEditCRData();
 		$gateways = CRUtilities::getAllGatewayProfilesData();
 		//var_dump( $gatewayProfiles[0]); exit;
    		//return View::make("admin/manage-admin", array( "roles" => $roles, "gatewayProfiles" => $gatewayProfiles));
 		
-		return View::make("admin/manage-admin1", array( "gateways" => $gateways));
+		return View::make("admin/manage-gateway", array( 
+														"gateways" => $gateways, 
+														"computeResources" => CRUtilities::getAllCRObjects(),
+														"crData" => $crData));
 	}
 
 	public function addAdminSubmit(){
@@ -51,17 +57,21 @@ class AdminController extends BaseController {
 
 	public function usersView(){
 		$idStore = $this->idStore;
-	    $users = $idStore->listUsers();
-
-	    return View::make("admin/manage-users", array("users" => $users));
-
-	}
+		if( Input::has("role"))
+		{
+			$users = $idStore->getUserListOfRole( Input::get("role"));
+			if( isset( $users->return))
+		    	$users = $users->return;
+		    else
+		    	$users = array();
+		}
+		else
+	    	$users = $idStore->listUsers();
+	    
+	    $roles = $idStore->getRoleNames();
 
-	public function addRole(){
-		$idStore = $this->idStore;
+	    return View::make("admin/manage-users", array("users" => $users, "roles" => $roles));
 
-		$idStore->addRole( Input::get("role") );
-		return Redirect::to("manage/admins")->with("Admin has been added.");
 	}
 
 	public function addGatewayAdminSubmit(){
@@ -98,4 +108,19 @@ class AdminController extends BaseController {
 
 		return View::make("admin/manage-roles", array("roles" => $roles));
 	}
+
+	public function addRole(){
+		$idStore = $this->idStore;
+
+		$idStore->addRole( Input::get("role") );
+		return Redirect::to("admin/dashboard/roles")->with( "message", "Role has been added.");
+	}
+
+	public function deleteRole(){
+		$idStore = $this->idStore;
+
+		$idStore->deleteRole( Input::get("role") );
+		return Redirect::to("admin/dashboard/roles")->with( "message", "Role has been deleted.");
+
+	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/861e7779/app/filters.php
----------------------------------------------------------------------
diff --git a/app/filters.php b/app/filters.php
index b5d641e..93b988b 100755
--- a/app/filters.php
+++ b/app/filters.php
@@ -106,7 +106,9 @@ Route::filter('verifyadmin', function()
 	if( Utilities::verify_login() )
 	{
 		if( !Session::has("admin"))
+		{
 			return Redirect::to("home")->with("admin-alert", true);
+		}
 	} 
 	else
 		return Redirect::to("home")->with("login-alert", true);

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/861e7779/app/libraries/AppUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/AppUtilities.php b/app/libraries/AppUtilities.php
index 6e034c4..af85485 100644
--- a/app/libraries/AppUtilities.php
+++ b/app/libraries/AppUtilities.php
@@ -114,7 +114,7 @@ class AppUtilities{
 		if( $update)
 			$airavataclient->updateApplicationInterface( $appInterfaceValues["app-interface-id"], $appInterface);
 		else
-			$airavataclient->getApplicationInterface($airavataclient->registerApplicationInterface( $appInterface) );
+			$airavataclient->getApplicationInterface($airavataclient->registerApplicationInterface( Session::get("gateway_id", $appInterface) );
 
 		//print_r( "App interface has been created.");
 	}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/861e7779/app/libraries/UserStoreManager/UserStoreManager.php
----------------------------------------------------------------------
diff --git a/app/libraries/UserStoreManager/UserStoreManager.php b/app/libraries/UserStoreManager/UserStoreManager.php
index 9b8f9d8..6732a9b 100755
--- a/app/libraries/UserStoreManager/UserStoreManager.php
+++ b/app/libraries/UserStoreManager/UserStoreManager.php
@@ -168,10 +168,10 @@ class UserStoreManager {
      * @param GetUserListOfRole $parameters
      * @return GetUserListOfRoleResponse
      */
-    public function getUserListOfRole( $role){
+    public function getUserListOfRole( $roleName){
         $parameters = new GetUserListOfRole();
-        $paramerters->roleName = $role;
-        return $this->serviceStub->getUserListOfRole( $paramerters)->return;
+        $parameters->roleName = $roleName;
+        return $this->serviceStub->getUserListOfRole( $parameters);
     }
     
     /**

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/861e7779/app/libraries/WSISClient.php
----------------------------------------------------------------------
diff --git a/app/libraries/WSISClient.php b/app/libraries/WSISClient.php
index 93a9262..47e242d 100755
--- a/app/libraries/WSISClient.php
+++ b/app/libraries/WSISClient.php
@@ -162,6 +162,23 @@ class WSISClient {
             throw new Exception("Unable to add this role", 0, $ex);
         }
     }
+
+    /**
+     * Function to delete existing role
+     * 
+     * @param string $roleName
+     * @return void
+     * @throws Exception
+     */
+    public function delete_role($roleName) {
+        try {
+            $this->userStoreManager->deleteRole($roleName);
+        } catch (Exception $ex) {
+                        var_dump( $ex); exit;
+
+            throw new Exception("Unable to delete role", 0, $ex);
+        }
+    }
     
     /**
     * Function to get the list of all existing roles
@@ -197,8 +214,9 @@ class WSISClient {
      */
     public function get_userlist_of_role( $role){
         try {
-            return $this->userStoreManager->getRoleListOfUser( $role);
+            return $this->userStoreManager->getUserListOfRole( $role);
         } catch (Exception $ex) {
+            var_dump( $ex); exit;
             throw new Exception("Unable to get user list of roles.", 0, $ex);
         }   
     }

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/861e7779/app/libraries/wsis_utilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/wsis_utilities.php b/app/libraries/wsis_utilities.php
index 0757984..311ce56 100755
--- a/app/libraries/wsis_utilities.php
+++ b/app/libraries/wsis_utilities.php
@@ -211,10 +211,25 @@ class WSISUtilities implements IdUtilities{
         try{
             return $this->wsis_client->add_role( $roleName);
         } catch (Exception $ex) {
-            var_dump($ex); exit;
             throw new Exception("Unable to add role.", 0, $ex);
         }        
     }
+
+    /**
+     * Function to delete existing role
+     * 
+     * @param string $roleName
+     * @return void
+     * @throws Exception
+     */
+    public function deleteRole($roleName) {
+        try {
+            $this->wsis_client->delete_role($roleName);
+        } catch (Exception $ex) {
+            throw new Exception("Unable to delete role", 0, $ex);
+        }
+    }
+
     /**
      * Function to get the entire list of roles in the application
      *
@@ -254,7 +269,12 @@ class WSISUtilities implements IdUtilities{
      */
     public function getUserListOfRole($role)
     {
-        // TODO: Implement getUserListOfRole() method.
+        try{
+            return $this->wsis_client->get_userlist_of_role( $role);
+        } catch (Exception $ex) {
+            var_dump( $ex); exit;
+            throw new Exception("Unable to get users.", 0, NULL);
+        }
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/861e7779/app/routes.php
----------------------------------------------------------------------
diff --git a/app/routes.php b/app/routes.php
index a9f6754..7c55a33 100755
--- a/app/routes.php
+++ b/app/routes.php
@@ -157,6 +157,8 @@ Route::post("admin/addgatewayadmin", "AdminController@addGatewayAdminSubmit");
 
 Route::post("admin/addrole", "AdminController@addRole");
 
+Route::post("admin/deleterole", "AdminController@deleteRole");
+
 //Airavata Server Check
 Route::get("airavata/down", function(){
 	return View::make("server-down");

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/861e7779/app/views/admin/manage-admin1.blade.php
----------------------------------------------------------------------
diff --git a/app/views/admin/manage-admin1.blade.php b/app/views/admin/manage-admin1.blade.php
deleted file mode 100644
index 8667cf2..0000000
--- a/app/views/admin/manage-admin1.blade.php
+++ /dev/null
@@ -1,109 +0,0 @@
-@extends('layout.basic')
-
-@section('page-header')
-    @parent
-    {{ HTML::style('css/admin.css')}}
-@stop
-
-@section('content')
-
-    <div id="wrapper">
-            <!-- Sidebar Menu Items - These collapse to the responsive navigation menu on small screens -->
-            @include( 'partials/dashboard-block')
-        <div id="page-wrapper">
-
-            <div class="container-fluid">
-
-                    <div class="row">
-
-                        <div class="col-md-6">
-                            <h3>Existing Gateway Resource Profiles :</h3>
-                        </div>
-                        <div class="col-md-6" style="margin-top:3.5%">
-                            <input type="text" class="col-md-12 filterinput" placeholder="Search by Gateway Name" />
-                        </div>
-                    </div>
-                    <div class="panel-group" id="accordion2">
-                    @foreach( $gateways as $indexGP => $gp )
-                        <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="#accordion2" href="#collapse-gateway-{{$indexGP}}">
-                                    {{ $gp->gatewayName }}
-                                    </a>
-                                    <div class="pull-right col-md-2 gateway-options fade">
-                                        <span class="glyphicon glyphicon-pencil edit-gateway" style="cursor:pointer;" data-toggle="modal" data-target="#edit-gateway-block" data-gp-id="{{ $gp->gatewayId }}" data-gp-name="{{ $gp->gatewayName }}"></span>
-                                        <span class="glyphicon glyphicon-trash delete-gateway" style="cursor:pointer;" data-toggle="modal" data-target="#delete-gateway-block" data-gp-name="{{$gp->gatewayName}}" data-gp-id="{{ $gp->gatewayId }}"></span>
-                                    </div>
-                                </h4>
-                            </div>
-                            <div id="collapse-gateway-{{$indexGP}}" class="panel-collapse collapse">
-                                <div class="panel-body">
-                                    <div class="app-interface-block">
-                                        <div class="row">
-                                            <div class="col-md-10">
-                                                <h4><span class="glyphicon glyphicon-plus"></span> Add a user as Admin to this Gateway</h4>
-                                                <form action="{{URL::to('/')}}/admin/addgatewayadmin" method="POST" role="form" enctype="multipart/form-data">
-                                                    <div class="form-group required">
-                                                        <label for="experiment-name" class="control-label">Enter Username</label>
-                                                        <input type="text" class="form-control" name="username" id="experiment-name" placeholder="username" autofocus required="required">
-                                                        <input type="hidden" name="gateway_name" value="{{ $gp->gatewayName }}"/>
-                                                    </div>
-                                                    <div class="btn-toolbar">
-                                                        <input name="add" type="submit" class="btn btn-primary" value="Add Admin"/>
-                                                    </div>   
-                                                </form>
-                                            </div>
-                                        </div>
-                                    </div>
-                                </div>
-                            </div>
-                        </div>
-                    @endforeach
-                    </div>
-                <div class="col-md-12">
-                    <button type="button" class="btn btn-default toggle-add-tenant"><span class="glyphicon glyphicon-plus"></span>Add a new gateway</button>
-                </div>
-                <div class="add-tenant col-md-6">
-                    <div class="form-group">
-                        <label>Enter Domain Name</label>
-                        <input type="text" class="form-control"/>
-                    </div>
-                    <div class="form-group">
-                        <label>Enter Admin Username</label>
-                        <input type="text" class="form-control"/>
-                    </div>
-                    <div class="form-group">
-                        <label>Enter Admin Password</label>
-                        <input type="text" class="form-control"/>
-                    </div>
-                    <div class="form-group">
-                        <label>Re-enter Admin Password</label>
-                        <input type="text" class="form-control"/>
-                    </div>
-                    <div class="form-group">
-                        <input type="submit" class="form-control btn btn-primary" value="Register" />
-                    </div>
-                </div>
-
-            </div>
-            <!-- /.container-fluid -->
-
-        </div>
-        <!-- /#page-wrapper -->
-
-    </div>
-
-@stop
-
-
-@section('scripts')
-    @parent
-    <script>
-        $(".add-tenant").slideUp();
-        
-        $(".toggle-add-tenant").click( function(){
-            $(".add-tenant").slideDown();
-        });
-    </script>
-@stop
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/861e7779/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
new file mode 100644
index 0000000..d96af00
--- /dev/null
+++ b/app/views/admin/manage-gateway.blade.php
@@ -0,0 +1,213 @@
+@extends('layout.basic')
+
+@section('page-header')
+    @parent
+    {{ HTML::style('css/admin.css')}}
+@stop
+
+@section('content')
+
+    <div id="wrapper">
+            <!-- Sidebar Menu Items - These collapse to the responsive navigation menu on small screens -->
+            @include( 'partials/dashboard-block')
+        <div id="page-wrapper">
+
+            <div class="container-fluid">
+
+                    <div class="row">
+
+                        <div class="col-md-6">
+                            @if( Session::has("scigap_admin") )
+                                <h3>Existing Gateways :</h3>
+                            @else
+                                <h3>Gateway Settings</h3>
+                            @endif
+                        </div>
+                        @if( Session::has("scigap_admin"))
+                        <div class="col-md-6" style="margin-top:3.5%">
+                            <input type="text" class="col-md-12 filterinput" placeholder="Search by Gateway Name" />
+                        </div>
+                        @endif
+                    </div>
+                    <div class="panel-group" id="accordion2">
+                    @foreach( $gateways as $indexGP => $gp )
+                        <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="#accordion2" href="#collapse-gateway-{{$indexGP}}">
+                                    {{ $gp->gatewayName }}
+                                    </a>
+                                    <div class="pull-right col-md-2 gateway-options fade">
+                                        <span class="glyphicon glyphicon-pencil edit-gateway" style="cursor:pointer;" data-toggle="modal" data-target="#edit-gateway-block" data-gp-id="{{ $gp->gatewayId }}" data-gp-name="{{ $gp->gatewayName }}"></span>
+                                        <span class="glyphicon glyphicon-trash delete-gateway" style="cursor:pointer;" data-toggle="modal" data-target="#delete-gateway-block" data-gp-name="{{$gp->gatewayName}}" data-gp-id="{{ $gp->gatewayId }}"></span>
+                                    </div>
+                                </h4>
+                            </div>
+                            <div id="collapse-gateway-{{$indexGP}}" class="panel-collapse collapse">
+                                <div class="panel-body">
+                                    <div class="app-interface-block">
+                                        <div class="row">
+                                            <div class="col-md-10">
+                                                @if( count( $gp->profile->computeResourcePreferences) )
+                                                    <div class="col-md-12">
+                                                        <h3>Existing Compute Resources :</h3>
+                                                    </div>
+                                                @endif
+                                                <div class="accordion-inner">
+                                                    <div class="panel-group" id="accordion-{{$indexGP}}">
+                                                    @foreach( (array)$gp->profile->computeResourcePreferences as $indexCRP => $crp )
+                                                        <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-crp-{{$indexGP}}-{{$indexCRP}}">
+                                                                    {{ $crp->crDetails->hostName }}
+                                                                    </a>
+                                                                    <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-cr-name="{{$crp->crDetails->hostName}}" data-cr-id="{{$crp->computeResourceId}}" data-gp-id="{{ $gp->gatewayId }}"></span>
+                                                                    </div>
+                                                                </h4>
+                                                            </div>
+                                                            <div id="collapse-crp-{{$indexGP}}-{{$indexCRP}}" class="panel-collapse collapse">
+                                                                <div class="panel-body">
+                                                                    <div class="app-compute-resource-preferences-block">
+                                                                        <form action="{{URL::to('/')}}/gp/update-crp" method="POST">
+                                                                            <input type="hidden" name="gatewayId" id="gatewayId" value="{{$gp->gatewayId}}">
+                                                                            <input type="hidden" name="computeResourceId" id="gatewayId" value="{{$crp->computeResourceId}}">
+                                                                            <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>
+
+                                                <h4><span class="glyphicon glyphicon-plus"></span> Add a user as Admin to this Gateway</h4>
+                                                <form action="{{URL::to('/')}}/admin/addgatewayadmin" method="POST" role="form" enctype="multipart/form-data">
+                                                    <div class="form-group required">
+                                                        <label for="experiment-name" class="control-label">Enter Username</label>
+                                                        <input type="text" class="form-control" name="username" id="experiment-name" placeholder="username" autofocus required="required">
+                                                        <input type="hidden" name="gateway_name" value="{{ $gp->gatewayName }}"/>
+                                                    </div>
+                                                    <div class="btn-toolbar">
+                                                        <input name="add" type="submit" class="btn btn-primary" value="Add Admin"/>
+                                                    </div>   
+                                                </form>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                    @endforeach
+                    </div>
+                @if( Session::has("scigap_admin"))
+                <div class="col-md-12">
+                    <button type="button" class="btn btn-default toggle-add-tenant"><span class="glyphicon glyphicon-plus"></span>Add a new gateway</button>
+                </div>
+                <div class="add-tenant col-md-6">
+                    <div class="form-group">
+                        <label>Enter Domain Name</label>
+                        <input type="text" class="form-control"/>
+                    </div>
+                    <div class="form-group">
+                        <label>Enter Admin Username</label>
+                        <input type="text" class="form-control"/>
+                    </div>
+                    <div class="form-group">
+                        <label>Enter Admin Password</label>
+                        <input type="text" class="form-control"/>
+                    </div>
+                    <div class="form-group">
+                        <label>Re-enter Admin Password</label>
+                        <input type="text" class="form-control"/>
+                    </div>
+                    <div class="form-group">
+                        <input type="submit" class="form-control btn btn-primary" value="Register" />
+                    </div>
+                </div>
+                @endif
+
+            </div>
+            <!-- /.container-fluid -->
+
+        </div>
+        <!-- /#page-wrapper -->
+
+    </div>
+
+
+<div class="add-compute-resource-block hide">
+    <div class="well">
+        <form action="{{URL::to('/')}}/gp/add-crp" method="POST">
+            <input type="hidden" name="gatewayId" id="gatewayId" value="">
+            <div class="input-group">
+                <select name="computeResourceId" class="cr-select form-control">
+                    <option value="">Select a compute Resource and set its preferences</option>
+                    @foreach( (array)$computeResources as $index => $cr)
+                    <option value="{{ $cr->computeResourceId}}">{{ $cr->hostName }}</option>
+                    @endforeach
+                </select>
+                <span class="input-group-addon remove-cr" style="cursor:pointer;">x</span>
+            </div>
+            <div class="pref-space form-horizontal"></div>
+        </form> 
+    </div>
+</div>
+
+
+<!-- Remove a Compute Resource from a Gateway -->
+<div class="modal fade" id="remove-resource-block" tabindex="-1" role="dialog" aria-labelledby="add-modal" aria-hidden="true">
+    <div class="modal-dialog">
+
+        <form action="{{URL::to('/')}}/gp/remove-cr" method="POST">
+            <div class="modal-content">
+                <div class="modal-header">
+                    <h3 class="text-center">Remove Compute Resource Confirmation</h3>
+                </div>
+                <div class="modal-body">
+                    <input type="hidden" class="form-control remove-crId" name="rem-crId"/>
+                    <input type="hidden" class="form-control cr-gpId" name="gpId"/>
+
+                    Do you really want to remove the Compute Resource, <span class="remove-cr-name"> </span>from the selected Gateway?
+                </div>
+                <div class="modal-footer">
+                    <div class="form-group">
+                        <input type="submit" class="btn btn-danger" value="Remove"/>
+                        <input type="button" class="btn btn-default" data-dismiss="modal" value ="Cancel"/>
+                    </div>
+                </div>
+            </div>
+
+        </form>
+    </div>
+</div>
+
+<!-- contains all compute resource choices that might get selected on adding a new one to a gateway -->
+@foreach( (array)$computeResources as $index => $cr)
+    @include('partials/gateway-preferences', array('computeResource' => $cr, 'crData' => $crData))
+@endforeach
+
+
+
+@stop
+
+
+@section('scripts')
+    @parent
+    {{ HTML::script('js/gateway.js') }}
+    <script>
+
+        //make first tab of accordion open by default.
+        //temporary fix
+        $("#accordion2").children(".panel").children(".collapse").addClass("in");
+        $(".add-tenant").slideUp();
+        
+        $(".toggle-add-tenant").click( function(){
+            $(".add-tenant").slideDown();
+        });
+    </script>
+@stop
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/861e7779/app/views/admin/manage-roles.blade.php
----------------------------------------------------------------------
diff --git a/app/views/admin/manage-roles.blade.php b/app/views/admin/manage-roles.blade.php
index 8104bd7..6d8a6b8 100644
--- a/app/views/admin/manage-roles.blade.php
+++ b/app/views/admin/manage-roles.blade.php
@@ -33,18 +33,105 @@
                         </tr>
                         @foreach( $roles as $role)
                         <tr>
-                            <td>{{ $role }}</td>
+                            <td class="role-name">{{ $role }}</td>
                             <td>
-                                <span class="glyphicon glyphicon-pencil"></span>
-                                <span class="glyphicon glyphicon-remove"></span>
+                                <span class="glyphicon glyphicon-pencil edit-role-name"></span>&nbsp;&nbsp;
+                                <a href="{{URL::to('/')}}/admin/dashboard/users?role={{$role}}">
+                                    <span class="glyphicon glyphicon-user role-users"></span>&nbsp;&nbsp;
+                                </a>
+                                <span class="glyphicon glyphicon-trash delete-role"></span>&nbsp;&nbsp;
                             </td>
                         </tr>
                         @endforeach
                     </table>
+                    <div class="col-md-12">
+                        <button type="button" class="btn btn-default toggle-add-role"><span class="glyphicon glyphicon-plus"></span>Add a new Role</button>
+                    </div>
+                    <div class="add-role col-md-6">
+                        <form role="form" action="{{URL::to('/')}}/admin/addrole" method="POST" class="add-role-form">
+                            <div class="form-group">
+                                <label>Enter Role Name</label>
+                                <input type="text" name="role" class="form-control"/>
+                            </div>
+                            <div class="form-group">
+                                <input type="submit" class="form-control btn btn-primary" value="Add" />
+                            </div>
+                        </form>
+                    </div>
+
+                    <div class="edit-role hide">
+                        <form class="edit-role-form">
+                            <div class="form-group col-md-4">
+                                <input type="text" name="new-role-name" class="new-role-name form-control"/>
+                                <input type="hidden" name="original-role-name" class="original-role-name" value=""/>
+                            </div>
+                            <div class="form-group col-md-4">
+                                <input type="submit" class="form-control btn btn-primary" value="Edit" />
+                            </div>
+                        </form>
+                    </div>
 
                 </div>
             </div>
         </div>
     </div>
 
+    <div class="modal fade" id="delete-role-block" tabindex="-1" role="dialog" aria-labelledby="add-modal" aria-hidden="true">
+        <div class="modal-dialog">
+
+            <form action="{{URL::to('/')}}/admin/deleterole" method="POST">
+                <div class="modal-content">
+                    <div class="modal-header">
+                        <h3 class="text-center">Delete Role Confirmation</h3>
+                    </div>
+                    <div class="modal-body">
+                        <input type="hidden" class="form-control delete-roleName" name="role"/>
+                        Do you really want to delete the role - <span class="delete-role-name"></span>
+                    </div>
+                    <div class="modal-footer">
+                        <div class="form-group">
+                            <input type="submit" class="btn btn-danger" value="Delete"/>
+                            <input type="button" class="btn btn-default" data-dismiss="modal" value ="Cancel"/>
+                        </div>
+                    </div>
+                </div>
+
+            </form>
+
+
+        </div>
+    </div>
+
+
+@stop
+
+@section('scripts')
+    @parent
+    <script>
+        $(".toggle-add-role").click( function(){
+            $(".add-role").slideDown();
+        });
+
+        $(".edit-role-name").click( function(){
+            var roleNameSpace = $(this).parent().parent().find(".role-name");
+            if( roleNameSpace.find(".edit-role-form").length )
+            {
+                roleNameSpace.html( roleNameSpace.find(".original-role-name").val() );
+            }
+            else
+            {
+                var role = roleNameSpace.html();
+                roleNameSpace.html( $(".edit-role").html() );
+                roleNameSpace.find(".original-role-name").val( role );
+                roleNameSpace.find(".new-role-name").val( role );
+            }
+        });
+
+        $(".delete-role").click( function(){
+            $("#delete-role-block").modal("show");
+            var roleName = $(this).parent().parent().find(".role-name").html();
+            $(".delete-role-name").html(roleName);
+            $(".delete-roleName").val(roleName);
+        })
+    </script>
 @stop
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/861e7779/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 2132281..8d098f7 100644
--- a/app/views/admin/manage-users.blade.php
+++ b/app/views/admin/manage-users.blade.php
@@ -29,12 +29,24 @@
                     <table class="table table-striped table-condensed">
                         <tr>
                             <th>Username</th>
-                            <th>Role</th>
+                            <th>
+                                Role : 
+                                <select onchange="location = this.options[this.selectedIndex].value;">
+                                    <option>Select a role</option>
+                                    <option value="{{URL::to('/')}}/admin/dashboard/users">All</option>
+                                    @foreach( (array)$roles as $role)
+                                    <option value="{{URL::to('/')}}/admin/dashboard/users?role={{$role}}">{{$role}}</option>
+                                    @endforeach
+                                </select>
+                            </th>
                         </tr>
-                        @foreach( $users as $user)
+                        @foreach( (array)$users as $user)
                         <tr>
                             <td>{{ $user }}</td>
-                            <td><button class="button btn btn-default" type="button">Check Role</button></td>
+                            <td>
+                                <button class="button btn btn-default check-role" type="button">Check Role</button>
+                                <div class="user-roles"></div>
+                            </td>
                         </tr>
                         @endforeach
                     </table>
@@ -44,4 +56,37 @@
         </div>
     </div>
 
+    <div class="modal fade" id="check-role-block" tabindex="-1" role="dialog" aria-labelledby="add-modal" aria-hidden="true">
+        <div class="modal-dialog">
+                <div class="modal-content">
+                    <div class="modal-header">
+                        <h3 class="text-center">User Roles</h3>
+                    </div>
+                    <div class="modal-body">
+                        User roles will be displayed and modified here.    
+                    </div>
+                    <div class="modal-footer">
+                        <div class="form-group">
+                            <input type="submit" class="btn btn-primary" data-dismiss="modal"  value="Ok"/>
+                        </div>
+                    </div>
+                </div>
+
+            </form>
+
+
+        </div>
+    </div>
+
+@stop
+
+@section('scripts')
+    @parent
+    <script>
+    $(".check-role").click( function(){
+        $("#check-role-block").modal("show");
+    });
+
+
+    </script>
 @stop
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/861e7779/app/views/application/interface.blade.php
----------------------------------------------------------------------
diff --git a/app/views/application/interface.blade.php b/app/views/application/interface.blade.php
index 1057099..140a951 100644
--- a/app/views/application/interface.blade.php
+++ b/app/views/application/interface.blade.php
@@ -132,30 +132,30 @@
 </div>
 
 <div class="modal fade" id="delete-app-interface-block" tabindex="-1" role="dialog" aria-labelledby="add-modal" aria-hidden="true">
-	    <div class="modal-dialog">
-
-			<form action="{{URL::to('/')}}/app/interface-delete" method="POST">
-		        <div class="modal-content">
-		            <div class="modal-header">
-		              	<h3 class="text-center">Delete Confirmation Application Interface</h3>
-		            </div>
-		            <div class="modal-body">
-						<input type="hidden" class="form-control delete-interfaceid" name="appInterfaceId"/>
-				 		Do you really want to delete the Application Interface - <span class="delete-interface-name"></span>
-					</div>
-					<div class="modal-footer">
-						<div class="form-group">
-							<input type="submit" class="btn btn-danger" value="Delete"/>
-							<input type="button" class="btn btn-default" data-dismiss="modal" value ="Cancel"/>
-						</div>
+    <div class="modal-dialog">
+
+		<form action="{{URL::to('/')}}/app/interface-delete" method="POST">
+	        <div class="modal-content">
+	            <div class="modal-header">
+	              	<h3 class="text-center">Delete Confirmation Application Interface</h3>
+	            </div>
+	            <div class="modal-body">
+					<input type="hidden" class="form-control delete-interfaceid" name="appInterfaceId"/>
+			 		Do you really want to delete the Application Interface - <span class="delete-interface-name"></span>
+				</div>
+				<div class="modal-footer">
+					<div class="form-group">
+						<input type="submit" class="btn btn-danger" value="Delete"/>
+						<input type="button" class="btn btn-default" data-dismiss="modal" value ="Cancel"/>
 					</div>
 				</div>
+			</div>
 
-			</form>
+		</form>
 
 
-		</div>
 	</div>
+</div>
 
 @stop
 

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/861e7779/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 b4f405b..2db3712 100644
--- a/app/views/partials/dashboard-block.blade.php
+++ b/app/views/partials/dashboard-block.blade.php
@@ -1,7 +1,7 @@
 <div class="collapse navbar-collapse navbar-ex1-collapse">
                 <ul class="nav navbar-nav side-nav">
                     <li @if( Session::has("manage"))  class="active" @endif>
-                        <a href="{{ URL::to('/')}}/admin/dashboard/gateway"><i class="fa fa-fw fa-dashboard"></i> Gateways</a>
+                        <a href="{{ URL::to('/')}}/admin/dashboard/gateway"><i class="fa fa-fw fa-dashboard"></i> Gateway @if( Session::has("scigap_admin"))s @endif</a>
                     </li>
                     <li>
                         <a href="{{ URL::to('/')}}/admin/dashboard/users"><i class="fa fa-fw fa-bar-chart-o"></i> Users</a>

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/861e7779/public/css/admin.css
----------------------------------------------------------------------
diff --git a/public/css/admin.css b/public/css/admin.css
index 49dd40c..58739c5 100644
--- a/public/css/admin.css
+++ b/public/css/admin.css
@@ -235,4 +235,5 @@ ul.alert-dropdown {
 .navbar-ex1-collapse .active a{
     background-color: #000;
     color: #fff;
-}
\ No newline at end of file
+}
+.add-role, .add-tenant{ display: none;}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/861e7779/public/css/bootstrap.min.css
----------------------------------------------------------------------
diff --git a/public/css/bootstrap.min.css b/public/css/bootstrap.min.css
index 2ed4b11..55d56ab 100644
--- a/public/css/bootstrap.min.css
+++ b/public/css/bootstrap.min.css
@@ -50,4 +50,8 @@ body{
 
 .navbar-inverse{
 	background: #2c3e50;
+}
+
+.glyphicon{
+	cursor: pointer;
 }
\ No newline at end of file


[08/12] airavata-php-gateway git commit: changing ui when compute resources do not exist

Posted by sm...@apache.org.
changing ui when compute resources do not exist


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

Branch: refs/heads/master
Commit: 20cf13c90be1022c005c4df9a57110e647445d9e
Parents: 667d49a
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Thu Mar 19 13:05:23 2015 -0400
Committer: Suresh Marru <sm...@apache.org>
Committed: Thu Apr 9 11:41:12 2015 -0400

----------------------------------------------------------------------
 app/config/app_config.ini                |  4 ++--
 app/controllers/AdminController.php      |  1 -
 app/views/admin/manage-gateway.blade.php | 10 +++++++---
 3 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/20cf13c9/app/config/app_config.ini
----------------------------------------------------------------------
diff --git a/app/config/app_config.ini b/app/config/app_config.ini
index 267a280..a990f12 100644
--- a/app/config/app_config.ini
+++ b/app/config/app_config.ini
@@ -7,12 +7,12 @@
 
 ;Tenant admin's username
 ;admin-username = "test@testphprg.scigap.org"
-admin-username = "spadimig@paramchem.org"
+admin-username = "spamidig@paramchem.org"
 ;Super Tenant Admin's username
 ;admin-username = "scigap_admin"
 
 ;Tenant admin's password
-admin-password = "testadmin@scigap.org"
+admin-password = "sp@m!d!g2015"
 ;Super Admin's password
 ;admin-password = "sci9067@min"
 

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/20cf13c9/app/controllers/AdminController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AdminController.php b/app/controllers/AdminController.php
index 6182e05..d0426f8 100644
--- a/app/controllers/AdminController.php
+++ b/app/controllers/AdminController.php
@@ -34,7 +34,6 @@ class AdminController extends BaseController {
 
 		$crData = CRUtilities::getEditCRData();
 		$gateways = CRUtilities::getAllGatewayProfilesData();
-		
 		return View::make("admin/manage-gateway", array( 
 														"gateways" => $gateways, 
 														"computeResources" => CRUtilities::getAllCRObjects(),

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/20cf13c9/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 d96af00..3dd2661 100644
--- a/app/views/admin/manage-gateway.blade.php
+++ b/app/views/admin/manage-gateway.blade.php
@@ -48,11 +48,13 @@
                                     <div class="app-interface-block">
                                         <div class="row">
                                             <div class="col-md-10">
-                                                @if( count( $gp->profile->computeResourcePreferences) )
+                                                <button class="btn btn-default add-cr" data-gpid="{{$gp->gatewayId}}"><span class="glyphicon glyphicon-plus"></span> Add a Compute Resource</button>
+                                            </div>
+                                            <div class="col-md-10">
+                                                @if( isset( $gp->profile->computeResourcePreferences) )
                                                     <div class="col-md-12">
                                                         <h3>Existing Compute Resources :</h3>
                                                     </div>
-                                                @endif
                                                 <div class="accordion-inner">
                                                     <div class="panel-group" id="accordion-{{$indexGP}}">
                                                     @foreach( (array)$gp->profile->computeResourcePreferences as $indexCRP => $crp )
@@ -84,7 +86,9 @@
                                                     @endforeach
                                                     </div>
                                                 </div>
-
+                                                @endif
+                                                <!-- 
+                                                Adding a user as admin will shift to roles. Removing from here. 
                                                 <h4><span class="glyphicon glyphicon-plus"></span> Add a user as Admin to this Gateway</h4>
                                                 <form action="{{URL::to('/')}}/admin/addgatewayadmin" method="POST" role="form" enctype="multipart/form-data">
                                                     <div class="form-group required">


[12/12] airavata-php-gateway git commit: Path changes for experiment outputs

Posted by sm...@apache.org.
Path changes for experiment outputs


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

Branch: refs/heads/master
Commit: f1b3474d7a1c0cba1749f49156e6d18dbe56a1ab
Parents: 20cf13c
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Tue Mar 24 14:38:16 2015 -0400
Committer: Suresh Marru <sm...@apache.org>
Committed: Thu Apr 9 11:41:34 2015 -0400

----------------------------------------------------------------------
 app/controllers/ExperimentController.php | 43 +++++++++--------
 app/libraries/utilities.php              | 67 +++++++++++----------------
 app/views/experiment/summary.blade.php   | 20 ++++++--
 3 files changed, 67 insertions(+), 63 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/f1b3474d/app/controllers/ExperimentController.php
----------------------------------------------------------------------
diff --git a/app/controllers/ExperimentController.php b/app/controllers/ExperimentController.php
index 0743113..95caf97 100755
--- a/app/controllers/ExperimentController.php
+++ b/app/controllers/ExperimentController.php
@@ -67,28 +67,33 @@ class ExperimentController extends BaseController {
 	public function summary()
 	{
 		$experiment = Utilities::get_experiment($_GET['expId']);
-		$project = Utilities::get_project($experiment->projectID);
-		$expVal = Utilities::get_experiment_values( $experiment, $project);
-		// User should not clone or edit a failed experiment. Only create clones of it.
-		if( $expVal["experimentStatusString"] == "FAILED")
-			$expVal["editable"] = false;
-
-		if( Request::ajax() )
+		if( $experiment != null)
 		{
-			return json_encode( $experiment);
+			$project = Utilities::get_project($experiment->projectID);
+			$expVal = Utilities::get_experiment_values( $experiment, $project);
+			// User should not clone or edit a failed experiment. Only create clones of it.
+			if( $expVal["experimentStatusString"] == "FAILED")
+				$expVal["editable"] = false;
+
+			if( Request::ajax() )
+			{
+				return json_encode( $experiment);
+			}
+			else
+			{
+				return View::make( "experiment/summary", 
+									array(
+										"expId" => Input::get("expId"),
+										"experiment" => $experiment,
+										"project" => $project,
+										"expVal" => $expVal
+
+									)
+								);
+			}
 		}
 		else
-		{
-			return View::make( "experiment/summary", 
-								array(
-									"expId" => Input::get("expId"),
-									"experiment" => $experiment,
-									"project" => $project,
-									"expVal" => $expVal
-
-								)
-							);
-		}
+			return View::make( "experiment/summary", array("invalidExperimentId" => 1));
 	}
 
 	public function expChange()

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/f1b3474d/app/libraries/utilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/utilities.php b/app/libraries/utilities.php
index 1631bb5..e32da17 100644
--- a/app/libraries/utilities.php
+++ b/app/libraries/utilities.php
@@ -746,6 +746,7 @@ public static function assemble_experiment()
 {
     $utility = new Utilities();
     $experimentInputs = array();
+    $app_config = Utilities::read_config();
 
     $scheduling = new ComputationalResourceScheduling();
     $scheduling->totalCPUCount = $_POST['cpu-count'];
@@ -763,31 +764,14 @@ public static function assemble_experiment()
     $experimentInputs = Utilities::process_inputs($applicationInputs, $experimentInputs);
     //var_dump($experimentInputs);
 
-    if( Utilities::$experimentPath != null){
-        $advHandling = new AdvancedOutputDataHandling();
-
-        $advHandling->outputDataDir = str_replace( base_path() . Constant::EXPERIMENT_DATA_ROOT, Utilities::$pathConstant , Utilities::$experimentPath);
-        $userConfigData->advanceOutputDataHandling = $advHandling;
+    if( Utilities::$experimentPath == null){
+        Utilities::create_experiment_folder_path();
     }
 
+    $advHandling = new AdvancedOutputDataHandling();
 
-
-
-
-    /*
-    $applicationOutputs = get_application_outputs($_POST['application']);
-    $experimentOutputs = array();
-
-    foreach ($applicationOutputs as $applicationOutput)
-    {
-        $experimentOutput = new DataObjectType();
-        $experimentOutput->key = $applicationOutput->name;
-        $experimentOutput->type = $applicationOutput->type;
-        $experimentOutput->value = '';
-
-        $experimentOutputs[] = $experimentOutput;
-    }
-    */
+    $advHandling->outputDataDir = str_replace( base_path() . Constant::EXPERIMENT_DATA_ROOT, Utilities::$pathConstant , Utilities::$experimentPath);
+    $userConfigData->advanceOutputDataHandling = $advHandling;
 
     //TODO: replace constructor with a call to airvata to get a prepopulated experiment template
     $experiment = new Experiment();
@@ -836,20 +820,7 @@ public static function process_inputs($applicationInputs, $experimentInputs)
         if (Utilities::file_upload_successful())
         {
             // construct unique path
-            do
-            {
-                Utilities::$experimentPath = base_path() . Constant::EXPERIMENT_DATA_ROOT . str_replace(' ', '', Session::get('username') ) . md5(rand() * time()) . '/';
-            }
-            while (is_dir( Utilities::$experimentPath)); // if dir already exists, try again
-
-            //var_dump( Utilities::$experimentPath ); exit;
-            // create upload directory
-            if (!mkdir( Utilities::$experimentPath))
-            {
-                Utilities::print_error_message('<p>Error creating upload directory!
-                    Please try again later or report a bug using the link in the Help menu.</p>');
-                $experimentAssemblySuccessful = false;
-            }
+            Utilities::create_experiment_folder_path();
         }
         else
         {
@@ -1015,6 +986,22 @@ public static function process_inputs($applicationInputs, $experimentInputs)
 }
 
 
+public static function create_experiment_folder_path()
+{
+    do
+    {
+        Utilities::$experimentPath = base_path() . Constant::EXPERIMENT_DATA_ROOT . str_replace(' ', '', Session::get('username') ) . md5(rand() * time()) . '/';
+    }
+    while (is_dir( Utilities::$experimentPath)); // if dir already exists, try again
+    // create upload directory
+    if (!mkdir( Utilities::$experimentPath))
+    {
+        Utilities::print_error_message('<p>Error creating upload directory!
+            Please try again later or report a bug using the link in the Help menu.</p>');
+        $experimentAssemblySuccessful = false;
+    }
+}
+
 /**
  * Check the uploaded files for errors
  */
@@ -1830,17 +1817,19 @@ public static function list_output_files($experiment, $expStatus)
     {
         $utility = new Utilities();
         $experimentOutputs = $experiment->experimentOutputs;
+
         foreach ((array)$experimentOutputs as $output)
-        {
+        {   
             if ($output->type == DataType::URI || $output->type == DataType::STDOUT || $output->type == DataType::STDERR )
             {
+                $explode = explode('/', $output->value);
                 //echo '<p>' . $output->key .  ': <a href="' . $output->value . '">' . $output->value . '</a></p>';
                 $outputPath = str_replace(Utilities::$experimentDataPathAbsolute, Constant::EXPERIMENT_DATA_ROOT, $output->value);
                 $outputPathArray = explode("/", $outputPath);
 
                 echo '<p>' . $output->name  . ' : ' . '<a target="_blank"
-                            href="' . str_replace(Utilities::$experimentDataPathAbsolute, Constant::EXPERIMENT_DATA_ROOT, $output->value) . '">' . 
-                            $outputPathArray[ sizeof( $outputPathArray) - 1] . ' <span class="glyphicon glyphicon-new-window"></span></a></p>';
+                            href="' . URL::to("/") . "/.." . Constant::EXPERIMENT_DATA_ROOT . $explode[sizeof($explode)-2] . '/' . $explode[sizeof($explode)-1] . '">' .
+                $explode[sizeof($explode)-1] . ' <span class="glyphicon glyphicon-new-window"></span></a></p>';
             }
             elseif ($output->type == DataType::STRING)
             {

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/f1b3474d/app/views/experiment/summary.blade.php
----------------------------------------------------------------------
diff --git a/app/views/experiment/summary.blade.php b/app/views/experiment/summary.blade.php
index 4692f40..e94cf9c 100755
--- a/app/views/experiment/summary.blade.php
+++ b/app/views/experiment/summary.blade.php
@@ -7,12 +7,19 @@
 @section('content')
 
 <div class="container" style="max-width: 750px;">
-<h1>
-    Experiment Summary
-    <small><a href="{{ URL::to('/') }}/experiment/summary?expId={{ $experiment->experimentID }}"
-              title="Refresh"><span class="glyphicon glyphicon-refresh refresh-exp"></span></a></small>
-</h1>
 
+    @if(isset( $invalidExperimentId ) )
+        <div class="alert alert-danger">
+            The Experiment ID does not exist. Please go to correct experiment.
+        </div>
+    @else
+    <h1>
+        Experiment Summary
+        <small><a href="{{ URL::to('/') }}/experiment/summary?expId={{ $experiment->experimentID }}"
+                  title="Refresh"><span class="glyphicon glyphicon-refresh refresh-exp"></span></a></small>
+    </h1>
+    
+    
     <table class="table">
         <tr>
             <td><strong>Name</strong></td>
@@ -100,6 +107,9 @@
         </div>
     </form>
     <input type="hidden" id="expObj" value="{{ htmlentities( json_encode( $experiment)) }}"/>
+
+    <!-- check of correct experiment Id ends here -->
+    @endif
 </div>
 
 @stop


[05/12] airavata-php-gateway git commit: Merge branch 'master' of https://github.com/SciGaP/laravel-pga

Posted by sm...@apache.org.
Merge branch 'master' of https://github.com/SciGaP/laravel-pga

Conflicts:
	app/libraries/utilities.php


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

Branch: refs/heads/master
Commit: 76ed3c09fbf37b6565f6c08868ef9efad334efb3
Parents: 843af28
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Thu Mar 12 17:03:40 2015 -0400
Committer: Suresh Marru <sm...@apache.org>
Committed: Thu Apr 9 11:36:17 2015 -0400

----------------------------------------------------------------------
 app/libraries/utilities.php | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/76ed3c09/app/libraries/utilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/utilities.php b/app/libraries/utilities.php
old mode 100755
new mode 100644
index 1631bb5..1424f7c
--- a/app/libraries/utilities.php
+++ b/app/libraries/utilities.php
@@ -1841,7 +1841,6 @@ public static function list_output_files($experiment, $expStatus)
                 echo '<p>' . $output->name  . ' : ' . '<a target="_blank"
                             href="' . str_replace(Utilities::$experimentDataPathAbsolute, Constant::EXPERIMENT_DATA_ROOT, $output->value) . '">' . 
                             $outputPathArray[ sizeof( $outputPathArray) - 1] . ' <span class="glyphicon glyphicon-new-window"></span></a></p>';
-            }
             elseif ($output->type == DataType::STRING)
             {
                 echo '<p>' . $output->value . '</p>';


[07/12] airavata-php-gateway git commit: merging with laravel github pga

Posted by sm...@apache.org.
merging with laravel github pga


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

Branch: refs/heads/master
Commit: 667d49aa5fc3663ffed19c282c2fbd0a2aefa047
Parents: 06b8cae
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Thu Mar 19 12:53:50 2015 -0400
Committer: Suresh Marru <sm...@apache.org>
Committed: Thu Apr 9 11:39:54 2015 -0400

----------------------------------------------------------------------
 .gitignore                          |  9 +++++++++
 app/config/app_config.ini           |  5 +++--
 app/controllers/AdminController.php |  9 +--------
 app/libraries/CRUtilities.php       | 10 +++++++++-
 app/libraries/wsis_utilities.php    |  7 ++++---
 5 files changed, 26 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/667d49aa/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
new file mode 100755
index 0000000..afd7435
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,9 @@
+/bootstrap/compiled.php
+/vendor
+/app/config/app_config.ini
+composer.phar
+composer.lock
+.env.*.php
+.env.php
+.DS_Store
+Thumbs.db

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/667d49aa/app/config/app_config.ini
----------------------------------------------------------------------
diff --git a/app/config/app_config.ini b/app/config/app_config.ini
index 194938a..267a280 100644
--- a/app/config/app_config.ini
+++ b/app/config/app_config.ini
@@ -6,7 +6,8 @@
 
 
 ;Tenant admin's username
-admin-username = "test@testphprg.scigap.org"
+;admin-username = "test@testphprg.scigap.org"
+admin-username = "spadimig@paramchem.org"
 ;Super Tenant Admin's username
 ;admin-username = "scigap_admin"
 
@@ -23,7 +24,7 @@ service-url = "https://idp.scigap.org:7443/services/"
 
 ;Gateway Domain Name 
 ;gateway-id = "testphprg.scigap.org"
-gateway-id = "default"
+gateway-id = "paramchem"
 
 ;Path the to server certificate file
 cafile-path = "/resources/security/idp_scigap_org.pem"

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/667d49aa/app/controllers/AdminController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AdminController.php b/app/controllers/AdminController.php
index 1097da5..6182e05 100644
--- a/app/controllers/AdminController.php
+++ b/app/controllers/AdminController.php
@@ -31,16 +31,9 @@ class AdminController extends BaseController {
 		//only for super admin
 		//Session::put("scigap_admin", true);
 		$idStore = $this->idStore;
-		//$ti = $idStore->createTenant( Input::all() );
-		//print_r( $ti); exit;
-		$roles = $idStore->getRoleNames();
-		foreach ($roles as $key => $role) {
-			//$gatewayAdmins = $idStore->getUserListOfRole
-		}
+
 		$crData = CRUtilities::getEditCRData();
 		$gateways = CRUtilities::getAllGatewayProfilesData();
-		//var_dump( $gatewayProfiles[0]); exit;
-   		//return View::make("admin/manage-admin", array( "roles" => $roles, "gatewayProfiles" => $gatewayProfiles));
 		
 		return View::make("admin/manage-gateway", array( 
 														"gateways" => $gateways, 

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/667d49aa/app/libraries/CRUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/CRUtilities.php b/app/libraries/CRUtilities.php
index c24ce25..f380eba 100644
--- a/app/libraries/CRUtilities.php
+++ b/app/libraries/CRUtilities.php
@@ -396,11 +396,19 @@ public static function create_or_update_gateway_profile( $inputs, $update = fals
 public static function getAllGatewayProfilesData(){
     $airavataclient = Session::get("airavataClient");
 
-    $gateways = $airavataclient->getAllGateways();
+    if( Session::has("scigap_admin") )
+        $gateways = $airavataclient->getAllGateways();
+    else
+    {
+        $app_config = Utilities::read_config();
+        $gateways[0] = $airavataclient->getGateway( $app_config["gateway-id"]);
+    }
+
     $gatewayProfiles = $airavataclient->getAllGatewayComputeResources();
     //$gatewayProfileIds = array("GatewayTest3_57726e98-313f-4e7c-87a5-18e69928afb5", "GatewayTest4_4fd9fb28-4ced-4149-bdbd-1f276077dad8");
     foreach( $gateways as $key => $gw)
     {
+        $gateways[$key]->profile = array();
         foreach( (array)$gatewayProfiles as $index => $gp)
         {
 

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/667d49aa/app/libraries/wsis_utilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/wsis_utilities.php b/app/libraries/wsis_utilities.php
index 311ce56..fbf90f8 100755
--- a/app/libraries/wsis_utilities.php
+++ b/app/libraries/wsis_utilities.php
@@ -71,7 +71,7 @@ class WSISUtilities implements IdUtilities{
             //$this->wsis_client = new WSISClient( $username);
             return $this->wsis_client->username_exists($username);
         } catch (Exception $ex) {
-            print_r( $ex); exit;
+            print_r( $ex);
             throw new Exception("Unable to check whether username exists", 0, NULL);
         }
         
@@ -87,7 +87,7 @@ class WSISUtilities implements IdUtilities{
         try{
             return $this->wsis_client->authenticate($username, $password);
         } catch (Exception $ex) {
-            var_dump( $ex); exit;
+            var_dump( $ex);
             throw new Exception("Unable to authenticate user", 0, NULL);
         }        
     }
@@ -197,7 +197,7 @@ class WSISUtilities implements IdUtilities{
         try{
             return $this->wsis_client->is_existing_role( $roleName);
         } catch (Exception $ex) {
-            var_dump($ex); exit;
+            var_dump($ex);
             throw new Exception("Unable to check if role exists.", 0, $ex);
         }    
     }
@@ -211,6 +211,7 @@ class WSISUtilities implements IdUtilities{
         try{
             return $this->wsis_client->add_role( $roleName);
         } catch (Exception $ex) {
+            var_dump( $ex);
             throw new Exception("Unable to add role.", 0, $ex);
         }        
     }


[09/12] airavata-php-gateway git commit: Path Changes for Exp Data Folder

Posted by sm...@apache.org.
Path Changes for Exp Data Folder


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

Branch: refs/heads/master
Commit: b356ffa4b77a4ed2cbf365f0cfd437f63dfe287b
Parents: f1b3474
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Tue Mar 24 14:50:59 2015 -0400
Committer: Suresh Marru <sm...@apache.org>
Committed: Thu Apr 9 11:41:34 2015 -0400

----------------------------------------------------------------------
 app/libraries/utilities.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/b356ffa4/app/libraries/utilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/utilities.php b/app/libraries/utilities.php
index e32da17..556f0e9 100644
--- a/app/libraries/utilities.php
+++ b/app/libraries/utilities.php
@@ -1828,8 +1828,8 @@ public static function list_output_files($experiment, $expStatus)
                 $outputPathArray = explode("/", $outputPath);
 
                 echo '<p>' . $output->name  . ' : ' . '<a target="_blank"
-                            href="' . URL::to("/") . "/.." . Constant::EXPERIMENT_DATA_ROOT . $explode[sizeof($explode)-2] . '/' . $explode[sizeof($explode)-1] . '">' .
-                $explode[sizeof($explode)-1] . ' <span class="glyphicon glyphicon-new-window"></span></a></p>';
+                            href="' . str_replace(Utilities::$experimentDataPathAbsolute, Constant::EXPERIMENT_DATA_ROOT, $output->value) . '">' . 
+                        $outputPathArray[ sizeof( $outputPathArray) - 1] . ' <span class="glyphicon glyphicon-new-window"></span></a></p>';
             }
             elseif ($output->type == DataType::STRING)
             {


[03/12] airavata-php-gateway git commit: Adding prompt for incompleted experiments.

Posted by sm...@apache.org.
Adding prompt for incompleted experiments.


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

Branch: refs/heads/master
Commit: 141374eec9126e61046a863eed89b1e8079f60de
Parents: 956ac76
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Thu Mar 12 14:59:57 2015 -0400
Committer: Suresh Marru <sm...@apache.org>
Committed: Thu Apr 9 11:34:13 2015 -0400

----------------------------------------------------------------------
 app/controllers/AdminController.php    |  2 +-
 app/libraries/utilities.php            | 43 +++++++++++++++++------------
 app/views/admin/manage-roles.blade.php |  3 +-
 app/views/experiment/summary.blade.php |  2 +-
 4 files changed, 29 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/141374ee/app/controllers/AdminController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AdminController.php b/app/controllers/AdminController.php
index 425d0a2..1097da5 100644
--- a/app/controllers/AdminController.php
+++ b/app/controllers/AdminController.php
@@ -28,7 +28,7 @@ class AdminController extends BaseController {
 	}
 
 	public function dashboard(){
-
+		//only for super admin
 		//Session::put("scigap_admin", true);
 		$idStore = $this->idStore;
 		//$ti = $idStore->createTenant( Input::all() );

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/141374ee/app/libraries/utilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/utilities.php b/app/libraries/utilities.php
index 50f9193..9dede7d 100755
--- a/app/libraries/utilities.php
+++ b/app/libraries/utilities.php
@@ -19,9 +19,9 @@ use Airavata\Model\AppCatalog\AppInterface\InputDataObjectType;
 use Airavata\Model\Workspace\Experiment\UserConfigurationData;
 use Airavata\Model\Workspace\Experiment\AdvancedOutputDataHandling;
 use Airavata\Model\Workspace\Experiment\Experiment;
+use Airavata\Model\Workspace\Experiment\ExperimentState;
 use Airavata\Model\AppCatalog\AppInterface\DataType;
 use Airavata\Model\Workspace\Project;
-use Airavata\Model\Workspace\Experiment\ExperimentState;
 use Airavata\Model\Workspace\Experiment\JobState;
 use Airavata\Model\AppCatalog\ComputeResource\JobSubmissionInterface;
 use Airavata\Model\AppCatalog\ComputeResource\JobSubmissionProtocol;
@@ -841,6 +841,8 @@ public static function process_inputs($applicationInputs, $experimentInputs)
                 Utilities::$experimentPath = base_path() . Constant::EXPERIMENT_DATA_ROOT . str_replace(' ', '', Session::get('username') ) . md5(rand() * time()) . '/';
             }
             while (is_dir( Utilities::$experimentPath)); // if dir already exists, try again
+
+            //var_dump( Utilities::$experimentPath ); exit;
             // create upload directory
             if (!mkdir( Utilities::$experimentPath))
             {
@@ -1822,27 +1824,32 @@ public static function create_experiment()
  *
 */
 
-public static function list_output_files($experiment)
+public static function list_output_files($experiment, $expStatus)
 {
-    $utility = new Utilities();
-    $experimentOutputs = $experiment->experimentOutputs;
-    foreach ($experimentOutputs as $output)
+    if($expStatus == ExperimentState::COMPLETED )
     {
-        if ($output->type == DataType::URI || $output->type == DataType::STDOUT || $output->type == DataType::STDERR )
+        $utility = new Utilities();
+        $experimentOutputs = $experiment->experimentOutputs;
+        foreach ((array)$experimentOutputs as $output)
         {
-            //echo '<p>' . $output->key .  ': <a href="' . $output->value . '">' . $output->value . '</a></p>';
-            $outputPath = str_replace(Utilities::$experimentDataPathAbsolute, Constant::EXPERIMENT_DATA_ROOT, $output->value);
-            $outputPathArray = explode("/", $outputPath);
+            if ($output->type == DataType::URI || $output->type == DataType::STDOUT || $output->type == DataType::STDERR )
+            {
+                //echo '<p>' . $output->key .  ': <a href="' . $output->value . '">' . $output->value . '</a></p>';
+                $outputPath = str_replace(Utilities::$experimentDataPathAbsolute, Constant::EXPERIMENT_DATA_ROOT, $output->value);
+                $outputPathArray = explode("/", $outputPath);
 
-            echo '<p>' . $output->name  . ' : ' . '<a target="_blank"
-                        href="' . str_replace(Utilities::$experimentDataPathAbsolute, Constant::EXPERIMENT_DATA_ROOT, $output->value) . '">' . 
-                        $outputPathArray[ sizeof( $outputPathArray) - 1] . ' <span class="glyphicon glyphicon-new-window"></span></a></p>';
-        }
-        elseif ($output->type == DataType::STRING)
-        {
-            echo '<p>' . $output->value . '</p>';
+                echo '<p>' . $output->name  . ' : ' . '<a target="_blank"
+                            href="' . str_replace(Utilities::$experimentDataPathAbsolute, Constant::EXPERIMENT_DATA_ROOT, $output->value) . '">' . 
+                            $outputPathArray[ sizeof( $outputPathArray) - 1] . ' <span class="glyphicon glyphicon-new-window"></span></a></p>';
+            }
+            elseif ($output->type == DataType::STRING)
+            {
+                echo '<p>' . $output->value . '</p>';
+            }
         }
     }
+    else
+        echo "Experiment hasn't completed. Experiment Status is : " . $expStatus;
 }
 
 public static function get_experiment_values( $experiment, $project, $forSearch = false)
@@ -1930,10 +1937,10 @@ public static function get_projsearch_results( $searchKey, $searchValue)
         switch ( $searchKey)
         {
             case 'project-name':
-                $projects = $airavataclient->searchProjectsByProjectName( Session::get("username"), $searchValue);
+                $projects = $airavataclient->searchProjectsByProjectName( Session::get("gateway_id"), Session::get("username"), $searchValue);
                 break;
             case 'project-description':
-                $projects = $airavataclient->searchProjectsByProjectDesc(Session::get("username"), $searchValue);
+                $projects = $airavataclient->searchProjectsByProjectDesc( Session::get("gateway_id"), Session::get("username"), $searchValue);
                 break;
         }
     }

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/141374ee/app/views/admin/manage-roles.blade.php
----------------------------------------------------------------------
diff --git a/app/views/admin/manage-roles.blade.php b/app/views/admin/manage-roles.blade.php
index 6d8a6b8..a7a3813 100644
--- a/app/views/admin/manage-roles.blade.php
+++ b/app/views/admin/manage-roles.blade.php
@@ -28,7 +28,8 @@
 
                     <table class="table table-striped table-condensed">
                         <tr>
-                            <th>Role</th>
+                            <th>
+                                Role</th>
                             <th>Actions</th>
                         </tr>
                         @foreach( $roles as $role)

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/141374ee/app/views/experiment/summary.blade.php
----------------------------------------------------------------------
diff --git a/app/views/experiment/summary.blade.php b/app/views/experiment/summary.blade.php
index 1ca71de..4692f40 100755
--- a/app/views/experiment/summary.blade.php
+++ b/app/views/experiment/summary.blade.php
@@ -60,7 +60,7 @@
         </tr>
         <tr>
             <td><strong>Outputs</strong></td>
-            <td><?php if ($expVal["experimentStatusString"] == 'COMPLETED') Utilities::list_output_files($experiment); ?></td>
+            <td><?php Utilities::list_output_files($experiment, $expVal["experimentStatusString"]); ?></td>
         </tr>
         @if( $expVal["experimentStatusString"] == "FAILED")
         <tr>


[11/12] airavata-php-gateway git commit: Bug Fix

Posted by sm...@apache.org.
Bug Fix


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

Branch: refs/heads/master
Commit: b59796680f63eff3663f747ac47cc567ce843a12
Parents: b356ffa
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Tue Mar 24 15:04:31 2015 -0400
Committer: Suresh Marru <sm...@apache.org>
Committed: Thu Apr 9 11:41:34 2015 -0400

----------------------------------------------------------------------
 app/libraries/utilities.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/b5979668/app/libraries/utilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/utilities.php b/app/libraries/utilities.php
index 556f0e9..8368575 100644
--- a/app/libraries/utilities.php
+++ b/app/libraries/utilities.php
@@ -1828,7 +1828,7 @@ public static function list_output_files($experiment, $expStatus)
                 $outputPathArray = explode("/", $outputPath);
 
                 echo '<p>' . $output->name  . ' : ' . '<a target="_blank"
-                            href="' . str_replace(Utilities::$experimentDataPathAbsolute, Constant::EXPERIMENT_DATA_ROOT, $output->value) . '">' . 
+                            href="' . URL::to("/") . "/.." . str_replace(Utilities::$experimentDataPathAbsolute, Constant::EXPERIMENT_DATA_ROOT, $output->value) . '">' . 
                         $outputPathArray[ sizeof( $outputPathArray) - 1] . ' <span class="glyphicon glyphicon-new-window"></span></a></p>';
             }
             elseif ($output->type == DataType::STRING)


[06/12] airavata-php-gateway git commit: bug fix

Posted by sm...@apache.org.
bug fix


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

Branch: refs/heads/master
Commit: 06b8caebc82fc06e18f8ecd65aaf44a77105afb6
Parents: 76ed3c0
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Thu Mar 12 17:05:26 2015 -0400
Committer: Suresh Marru <sm...@apache.org>
Committed: Thu Apr 9 11:36:36 2015 -0400

----------------------------------------------------------------------
 app/libraries/utilities.php | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/06b8caeb/app/libraries/utilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/utilities.php b/app/libraries/utilities.php
index 1424f7c..1631bb5 100644
--- a/app/libraries/utilities.php
+++ b/app/libraries/utilities.php
@@ -1841,6 +1841,7 @@ public static function list_output_files($experiment, $expStatus)
                 echo '<p>' . $output->name  . ' : ' . '<a target="_blank"
                             href="' . str_replace(Utilities::$experimentDataPathAbsolute, Constant::EXPERIMENT_DATA_ROOT, $output->value) . '">' . 
                             $outputPathArray[ sizeof( $outputPathArray) - 1] . ' <span class="glyphicon glyphicon-new-window"></span></a></p>';
+            }
             elseif ($output->type == DataType::STRING)
             {
                 echo '<p>' . $output->value . '</p>';


[02/12] airavata-php-gateway git commit: bug fix

Posted by sm...@apache.org.
bug fix


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

Branch: refs/heads/master
Commit: 956ac7616c2fbe5b4cac65660ce4175299df3927
Parents: 861e777
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Thu Mar 12 11:22:53 2015 -0400
Committer: Suresh Marru <sm...@apache.org>
Committed: Thu Apr 9 11:33:47 2015 -0400

----------------------------------------------------------------------
 app/libraries/AppUtilities.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/956ac761/app/libraries/AppUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/AppUtilities.php b/app/libraries/AppUtilities.php
index af85485..2f9b32e 100644
--- a/app/libraries/AppUtilities.php
+++ b/app/libraries/AppUtilities.php
@@ -114,7 +114,7 @@ class AppUtilities{
 		if( $update)
 			$airavataclient->updateApplicationInterface( $appInterfaceValues["app-interface-id"], $appInterface);
 		else
-			$airavataclient->getApplicationInterface($airavataclient->registerApplicationInterface( Session::get("gateway_id", $appInterface) );
+			$airavataclient->getApplicationInterface($airavataclient->registerApplicationInterface( Session::get("gateway_id"), $appInterface) );
 
 		//print_r( "App interface has been created.");
 	}


[10/12] airavata-php-gateway git commit: adding a template config file

Posted by sm...@apache.org.
adding a template config file


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

Branch: refs/heads/master
Commit: c644bc8ec744e5e572115906bae1d9b0a8ea5e38
Parents: b597966
Author: Suresh Marru <sm...@apache.org>
Authored: Wed Apr 1 15:29:56 2015 -0400
Committer: Suresh Marru <sm...@apache.org>
Committed: Thu Apr 9 11:41:34 2015 -0400

----------------------------------------------------------------------
 app/config/app_config.ini.template | 74 +++++++++++++++++++++++++++++++++
 1 file changed, 74 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/c644bc8e/app/config/app_config.ini.template
----------------------------------------------------------------------
diff --git a/app/config/app_config.ini.template b/app/config/app_config.ini.template
new file mode 100644
index 0000000..3ec74f0
--- /dev/null
+++ b/app/config/app_config.ini.template
@@ -0,0 +1,74 @@
+;--------------------------------------- Identity Server Constants ----------------------
+
+;Admin Role Name
+admin-role-name = "admin"
+;Gateway User Role
+gateway-admin = "Internal/everyone"
+
+;Tenant admin's username
+admin-username = “$username”
+
+;Tenant admin's password
+admin-password = “$password”
+
+;Identity server domain
+server = "idp.scigap.org"
+
+;Identity server web services endpoint
+service-url = "https://idp.scigap.org:7443/services/"
+
+;Gateway Domain Name 
+gateway-id = “$gatewayname”
+
+;Path the to server certificate file
+cafile-path = "/resources/security/idp_scigap_org.pem"
+
+;Enable HTTPS server verification
+verify-peer = true
+
+;Allow self signed server certificates
+allow-self-signed = false
+
+;--------------------------------------- Airavata Constants ----------------------
+
+
+;development
+airavata-port = 9930;
+airavata-server = 'gw111.iu.xsede.org'
+
+;production
+;airavata-server = 'gw127.iu.xsede.org'
+;airavata-port = 8930; 
+
+airavata-timeout = 100000;
+experiment-data-root = '/../experimentData/'
+ssh-user = 'root'
+data-path = 'file://home/pga/production/experimentData/'
+experiment-data-root-absolute = '/var/www/experimentData/'
+;USER_STORE = 'WSO2','XML','USER_API'
+user-store = "WSO2"
+admin-role = "admin"
+gateway-admin-role = "gateway_admin"
+user-role = "Internal/everyone"
+;identity server roles assigned for Gateway
+gateway-role-prepend = "gateway_"
+gateway-role-admin-append = "_admin"
+req-url = 'https://gw111.iu.xsede.org:8443/credential-store/acs-start-servlet'
+gateway-name = 'PHP-Reference-Gateway'
+email = 'admin@gw120.iu.xsede.org'
+;file size in MB
+server-allowed-file-size = 64
+
+;Credential Store Token
+credential-store-token="811351f3-7484-4931-b354-24881e7963e9"
+
+;----------------------------------------- Experiment Defaults --------------------
+
+;default Queue name 
+queue-name = 'long'
+;default Node Count
+node-count = '1'
+;default Total Core Count
+total-cpu-count = '4'
+;default Wall Time Limit
+wall-time-limit = '30'


[04/12] airavata-php-gateway git commit: New token

Posted by sm...@apache.org.
New token


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

Branch: refs/heads/master
Commit: 843af282c52e0b4e2b8c1805db8c79da0344a634
Parents: 141374e
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Thu Mar 12 15:04:36 2015 -0400
Committer: Suresh Marru <sm...@apache.org>
Committed: Thu Apr 9 11:34:48 2015 -0400

----------------------------------------------------------------------
 app/libraries/utilities.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/843af282/app/libraries/utilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/utilities.php b/app/libraries/utilities.php
index 9dede7d..1631bb5 100755
--- a/app/libraries/utilities.php
+++ b/app/libraries/utilities.php
@@ -284,7 +284,7 @@ public static function launch_experiment($expId)
         Utilities::print_success_message('Experiment launched using ' . $tokenString . ' allocation!');
         */
 
-        $hardCodedToken = '2c308fa9-99f8-4baa-92e4-d062e311483c';
+        $hardCodedToken = 'bdc612fe-401e-4684-88e9-317f99409c45';
         $airavataclient->launchExperiment($expId, $hardCodedToken);
 
         /*