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:49 UTC

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

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);
         }        
     }