airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndo...@apache.org
Subject [37/57] [partial] airavata-php-gateway git commit: AIRAVATA 1632 + Job Description for Admin Dashboard
Date Fri, 01 May 2015 21:33:24 GMT
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/libraries/xml_id_utilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/xml_id_utilities.php b/app/libraries/xml_id_utilities.php
new file mode 100755
index 0000000..6b54767
--- /dev/null
+++ b/app/libraries/xml_id_utilities.php
@@ -0,0 +1,252 @@
+<?php
+/**
+ * Utilities for ID management with an XML file
+ */
+
+//include 'id_utilities.php';
+
+class XmlIdUtilities implements IdUtilities
+{
+    const DB_PATH = 'users.xml';
+
+    /**
+     * Connect to the user database.
+     * @return mixed|void
+     */
+    public function connect()
+    {
+        global $db;
+
+
+        try
+        {
+            if (file_exists(self::DB_PATH))
+            {
+                $db = simplexml_load_file(self::DB_PATH);
+            }
+            else
+            {
+                throw new Exception("Error: Cannot connect to database!");
+            }
+
+
+            if (!$db)
+            {
+                throw new Exception('Error: Cannot open database!');
+            }
+        }
+        catch (Exception $e)
+        {
+            echo '<div>' . $e->getMessage() . '</div>';
+        }
+    }
+
+    /**
+     * Return true if the given username exists in the database.
+     * @param $username
+     * @return bool
+     */
+    public function username_exists($username)
+    {
+        global $db;
+
+        foreach($db->xpath('//username') as $db_username)
+        {
+            if ($db_username == $username)
+            {
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * Authenticate the user given username and password.
+     * @param $username
+     * @param $password
+     * @return int|mixed
+     */
+    public function authenticate($username, $password)
+    {
+        global $db;
+
+        $hashed_password = md5($password);
+        
+        $user = $db->xpath('//user[username="' . $username . '"]');
+
+        if (sizeof($user) == 1)
+        {
+            return $user[0]->password_hash == $hashed_password;
+        }
+        elseif(sizeof($user) == 0)
+        {
+            return -1;
+        }
+        else // duplicate users in database
+        {
+            return -2;
+        }
+    }
+
+    /**
+     * Add a new user to the database.
+     * @param $username
+     * @param $password
+     * @return mixed|void
+     */
+    public function add_user($username, $password, $first_name, $last_name, $email, $organization,
+            $address, $country,$telephone, $mobile, $im, $url)
+    {
+        global $db;
+
+        $users = $db->xpath('//users');
+
+        $user = $users[0]->addChild('user');
+
+        $user->addChild('username', $username);
+        $user->addChild('password_hash', md5($password));
+
+        //Format XML to save indented tree rather than one line
+        $dom = new DOMDocument('1.0');
+        $dom->preserveWhiteSpace = false;
+        $dom->formatOutput = true;
+        $dom->loadXML($db->asXML());
+        $dom->save('users.xml');
+    }
+
+    /**
+     * Get the user profile
+     * @param $username
+     * @return mixed|void
+     */
+    public function get_user_profile($username)
+    {
+        // TODO: Implement get_user_profile() method.
+    }
+
+    /**
+     * Update the user profile
+     *
+     * @param $username
+     * @param $first_name
+     * @param $last_name
+     * @param $email
+     * @param $organization
+     * @param $address
+     * @param $country
+     * @param $telephone
+     * @param $mobile
+     * @param $im
+     * @param $url
+     * @return mixed
+     */
+    public function update_user_profile($username, $first_name, $last_name, $email, $organization, $address,
+                                        $country, $telephone, $mobile, $im, $url)
+    {
+        // TODO: Implement update_user_profile() method.
+    }
+
+    /**
+     * Function to update user password
+     *
+     * @param $username
+     * @param $current_password
+     * @param $new_password
+     * @return mixed
+     */
+    public function change_password($username, $current_password, $new_password)
+    {
+        // TODO: Implement change_password() method.
+    }
+
+    /**
+     * Function to remove an existing user
+     *
+     * @param $username
+     * @return void
+     */
+    public function remove_user($username)
+    {
+        // TODO: Implement remove_user() method.
+    }
+
+    /**
+     * Function to check whether a user has permission for a particular permission string(api method).
+     *
+     * @param $username
+     * @param $permission_string
+     * @return bool
+     */
+    public function checkPermissionForUser($username, $permission_string)
+    {
+        // TODO: Implement checkPermissionForUser() method.
+    }
+
+    /**
+     * Function to get all the permissions that a particular user has.
+     *
+     * @param $username
+     * @return mixed
+     */
+    public function getUserPermissions($username)
+    {
+        // TODO: Implement getUserPermissions() method.
+    }
+
+    /**
+     * Function to get the entire list of roles in the application
+     *
+     * @return mixed
+     */
+    public function getRoleList()
+    {
+        // TODO: Implement getRoleList() method.
+    }
+
+    /**
+     * Function to get the role list of a user
+     *
+     * @param $username
+     * @return mixed
+     */
+    public function getRoleListOfUser($username)
+    {
+        // TODO: Implement getRoleListOfUser() method.
+    }
+
+    /**
+     * Function to get the user list of a particular role
+     *
+     * @param $role
+     * @return mixed
+     */
+    public function getUserListOfRole($role)
+    {
+        // TODO: Implement getUserListOfRole() method.
+    }
+
+    /**
+     * Function to add a role to a user
+     *
+     * @param $username
+     * @param $role
+     * @return void
+     */
+    public function addUserToRole($username, $role)
+    {
+        // TODO: Implement addUserToRole() method.
+    }
+
+    /**
+     * Function to role from user
+     *
+     * @param $username
+     * @param $role
+     * @return void
+     */
+    public function removeUserFromRole($username, $role)
+    {
+        // TODO: Implement removeUserFromRole() method.
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/models/Constant.php
----------------------------------------------------------------------
diff --git a/app/models/Constant.php b/app/models/Constant.php
new file mode 100644
index 0000000..f18ba41
--- /dev/null
+++ b/app/models/Constant.php
@@ -0,0 +1,48 @@
+<?php
+
+class Constant extends Eloquent{
+
+
+	const EXPERIMENT_DATA_ROOT = '/../experimentData/';
+
+	/* 
+
+	------------ now rest all are handled at config/app-config.ini -------------------
+
+	const AIRAVATA_SERVER = 'gw111.iu.xsede.org';
+	//const AIRAVATA_SERVER = 'gw127.iu.xsede.org';
+	//const AIRAVATA_SERVER = 'gw56.iu.xsede.org'; //Mirror
+	//const AIRAVATA_PORT = 8930; //development
+	const AIRAVATA_PORT = 9930; //production
+	const AIRAVATA_TIMEOUT = 100000;
+	const EXPERIMENT_DATA_ROOT = '/../experimentData/';
+
+	const SSH_USER = 'root';
+	//const DATA_PATH = 'file://home/pga/production/experimentData/';
+
+	const EXPERIMENT_DATA_ROOT_ABSOLUTE = '/var/www/experimentData/';
+	//const EXPERIMENT_DATA_ROOT_ABSOLUTE = 'C:/wamp/www/experimentData/';
+
+	//const USER_STORE = 'WSO2','XML','USER_API';
+	const USER_STORE = 'WSO2';
+
+	//This will need to be updated everytime a new user role is being added for
+	//specific purposes.
+	const ADMIN_ROLE = "admin";
+	const GATEWAY_ADMIN_ROLE = "gateway_admin";
+	const USER_ROLE = "Internal/everyone";
+
+	//identity server roles assigned for Gateway
+	const GATEWAY_ROLE_PREPEND = "gateway_";
+	const GATEWAY_ROLE_ADMIN_APPEND = "_admin";
+
+	const REQ_URL = 'https://gw111.iu.xsede.org:8443/credential-store/acs-start-servlet';
+	const GATEWAY_NAME = 'PHP-Reference-Gateway';
+	const EMAIL = 'admin@gw120.iu.xsede.org';	
+
+	const SERVER_ALLOWED_FILE_SIZE = 64; // in MB
+
+	*/ 
+}
+
+?>

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/models/User.php
----------------------------------------------------------------------
diff --git a/app/models/User.php b/app/models/User.php
new file mode 100755
index 0000000..0d96f81
--- /dev/null
+++ b/app/models/User.php
@@ -0,0 +1,25 @@
+<?php
+
+use Illuminate\Auth\UserTrait;
+use Illuminate\Auth\UserInterface;
+use Illuminate\Auth\Reminders\RemindableTrait;
+use Illuminate\Auth\Reminders\RemindableInterface;
+
+class User extends Eloquent implements UserInterface, RemindableInterface {
+
+	use UserTrait, RemindableTrait;
+
+	/**
+	 * The database table used by the model.
+	 *
+	 * @var string
+	 */
+	protected $table = 'users';
+
+	/**
+	 * The attributes excluded from the model's JSON form.
+	 *
+	 * @var array
+	 */
+	protected $hidden = array('password', 'remember_token');
+}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/resources/assets/PoweredbyAiravata_Small.png
----------------------------------------------------------------------
diff --git a/app/resources/assets/PoweredbyAiravata_Small.png b/app/resources/assets/PoweredbyAiravata_Small.png
new file mode 100755
index 0000000..7178e31
Binary files /dev/null and b/app/resources/assets/PoweredbyAiravata_Small.png differ

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/resources/assets/favicon.ico
----------------------------------------------------------------------
diff --git a/app/resources/assets/favicon.ico b/app/resources/assets/favicon.ico
new file mode 100755
index 0000000..541659e
Binary files /dev/null and b/app/resources/assets/favicon.ico differ

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/resources/assets/scigap-header-logo.png
----------------------------------------------------------------------
diff --git a/app/resources/assets/scigap-header-logo.png b/app/resources/assets/scigap-header-logo.png
new file mode 100755
index 0000000..6e8bf4a
Binary files /dev/null and b/app/resources/assets/scigap-header-logo.png differ

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/resources/oa4mp/oauth-properties.ini
----------------------------------------------------------------------
diff --git a/app/resources/oa4mp/oauth-properties.ini b/app/resources/oa4mp/oauth-properties.ini
new file mode 100755
index 0000000..d9e5b9b
--- /dev/null
+++ b/app/resources/oa4mp/oauth-properties.ini
@@ -0,0 +1,15 @@
+; Configuration file for XSEDE properties
+
+oauth_privkey_file = "/var/www/PHP-Reference-Gateway/resources/oa4mp/oauth-privkey.pk8"
+oauth_privkey_pem = "/var/www/PHP-Reference-Gateway/resources/oa4mp/oauth-privkey.pem"
+
+home_url = "https://gw120.iu.xsede.org/PHP-Reference-Gateway/xsede_login.php"
+oa4mp_id = "myproxy:oa4mp,2012:/client/5a323fc6fcffcff7a95401046a303520"
+
+dn[countryName] = "US"
+dn[stateOrProvinceName] = "IN"
+dn[localityName] = "Bloomington"
+dn[organizationName] = "IU"
+dn[organizationalUnitName] = "SGG"
+dn[commonName] = "gw120.iu.xsede.org"
+dn[emailAddress] = "yuma@iu.edu"

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/resources/security/idp_scigap_org.pem
----------------------------------------------------------------------
diff --git a/app/resources/security/idp_scigap_org.pem b/app/resources/security/idp_scigap_org.pem
new file mode 100755
index 0000000..6cb8cf3
--- /dev/null
+++ b/app/resources/security/idp_scigap_org.pem
@@ -0,0 +1,83 @@
+-----BEGIN CERTIFIC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BFjRodHRw
+czovL3d3dy5pbmNvbW1vbi5vcmcvY2VydC9yZXBvc2l0b3J5L2Nwc19zc2wucGRm
+MAgGBmeBDAECAjA9BgNVHR8ENjA0MDKgMKAuhixodHRwOi8vY3JsLmluY29tbW9u
+Lm9yZy9JbkNvbW1vblNlcnZlckNBLmNybDBvBggrBgEFBQcBAQRjMGEwOQYIKwYB
+BQUHMAKGLWh0dHA6Ly9jZXJ0LmluY29tbW9uLm9yZy9JbkNvbW1vblNlcnZlckNB
+LmNydDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuaW5jb21tb24ub3JnMBkGA1Ud
+EQQSMBCCDmlkcC5zY2lnYXAub3JnMA0GCSqGSIb3DQEBBQUAA4IBAQAdg9Cv2Ora
+un7CAt77dhfGirTUdytoTwb5d7//OzWz6M95vr3e0siRowrKXq5AnQLY8CZ+YE3H
+yDxlvulWM2cMbubPsOLExCI4sNllViPWFNQKDl6s3Cbc7E2q11Hz048OVU4KtmL5
+5jA6/rWRCvoMepDzMF4T72DCeMnFSe3ICq+kBRI+RmOPoWWjIrL8Q9rWfUVLdQbu
+LgKtSfPpm0VfedZLlrJ3R7urdqpnIESzkBFj5rNDaD7Wiwc0LqcpbpGNo9SZ6IiT
+kKYLJCeoyWMAQa5zo5nnRbJ5cu1z/B50uibxbYclRWKEamiTThEYH824G0jaGCXx
+IspTV/Gt1tKM
+-----END CERTIFICATE-----
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/routes.php
----------------------------------------------------------------------
diff --git a/app/routes.php b/app/routes.php
new file mode 100755
index 0000000..ad7ea27
--- /dev/null
+++ b/app/routes.php
@@ -0,0 +1,193 @@
+<?php
+
+/*
+|--------------------------------------------------------------------------
+| Application Routes
+|--------------------------------------------------------------------------
+|
+| Here is where you can register all of the routes for an application.
+| It's a breeze. Simply tell Laravel the URIs it should respond to
+| and give it the Closure to execute when that URI is requested.
+|
+*/
+
+
+/*
+ * User Routes
+*/
+
+Route::get("create", "AccountController@createAccountView");
+
+Route::post("create", "AccountController@createAccountSubmit");
+
+Route::get("login", "AccountController@loginView");
+
+Route::post("login", "AccountController@loginSubmit");
+
+Route::get("logout", "AccountController@logout");
+
+Route::get("forgot-password", "AccountController@forgotPassword");
+/*
+ * The following routes will not work without logging in.
+ *
+*/
+
+/*
+ * Project Routes
+*/
+
+Route::get("project/create", "ProjectController@createView");
+
+Route::post("project/create", "ProjectController@createSubmit");
+
+Route::get("project/summary", "ProjectController@summary");
+
+Route::get("project/search", "ProjectController@searchView");
+
+Route::post("project/search", "ProjectController@searchSubmit");
+
+Route::get("project/edit", "ProjectController@editView");
+
+Route::post("project/edit", "ProjectController@editSubmit");
+
+/*
+ * Experiment Routes
+*/
+
+Route::get("experiment/create", "ExperimentController@createView");
+
+Route::post("experiment/create", "ExperimentController@createSubmit");
+
+Route::get("experiment/summary", "ExperimentController@summary");
+
+Route::post("experiment/summary", "ExperimentController@expChange");
+
+Route::get("experiment/search", "ExperimentController@searchView");
+
+Route::post("experiment/search", "ExperimentController@searchSubmit");
+
+Route::get("experiment/edit", "ExperimentController@editView");
+
+Route::post("experiment/edit", "ExperimentController@editSubmit");
+
+Route::post("experiment/cancel", "ExperimentController@expCancel");
+
+/*
+ * Compute Resources Routes
+*/
+
+Route::get("cr/create", function(){
+	return Redirect::to("cr/create/step1");
+});
+
+Route::get("cr/create", "ComputeResource@createView"); 
+
+Route::post("cr/create", "ComputeResource@createSubmit");
+
+Route::get("cr/edit", "ComputeResource@editView"); 
+
+Route::post("cr/edit", "ComputeResource@editSubmit"); 
+
+Route::get("cr/browse", "ComputeResource@browseView");
+
+Route::post("cr/delete-jsi", "ComputeResource@deleteActions");
+
+Route::post("cr/delete-dmi", "ComputeResource@deleteActions");
+
+Route::post("cr/delete-cr", "ComputeResource@deleteActions");
+
+/*
+ * Application Catalog Routes
+*/
+
+Route::get("app/module", "ApplicationController@showAppModuleView");
+
+Route::post("app/module-create", "ApplicationController@modifyAppModuleSubmit");
+
+Route::post("app/module-edit", "ApplicationController@modifyAppModuleSubmit");
+
+Route::post("app/module-delete", "ApplicationController@deleteAppModule");
+
+Route::get("app/interface", "ApplicationController@createAppInterfaceView");
+
+Route::post("app/interface-create", "ApplicationController@createAppInterfaceSubmit");
+
+Route::post("app/interface-edit", "ApplicationController@editAppInterfaceSubmit");
+
+Route::post("app/interface-delete", "ApplicationController@deleteAppInterface");
+
+Route::get("app/deployment", "ApplicationController@createAppDeploymentView");
+
+Route::post("app/deployment-create", "ApplicationController@createAppDeploymentSubmit");
+
+Route::post("app/deployment-edit", "ApplicationController@editAppDeploymentSubmit");
+
+Route::post("app/deployment-delete", "ApplicationController@deleteAppDeployment");
+
+Route::get("gp/create", "GatewayprofileController@createView");
+
+Route::post("gp/create", "GatewayprofileController@createSubmit");
+
+Route::post("gp/edit", "GatewayprofileController@editGP");
+
+Route::get("gp/browse", "GatewayprofileController@browseView");
+
+Route::post("gp/delete-gp", "GatewayprofileController@delete");
+
+Route::post("gp/remove-cr", "GatewayprofileController@delete");
+
+Route::post("gp/add-crp", "GatewayprofileController@modifyCRP");
+
+Route::post("gp/update-crp", "GatewayprofileController@modifyCRP");
+
+//Management Dashboard
+
+Route::get("admin/console", "AdminController@console");
+
+Route::get("admin/dashboard", "AdminController@dashboard");
+
+Route::get("admin/dashboard/gateway", "AdminController@dashboard");
+
+Route::get("admin/dashboard/users", "AdminController@usersView");
+
+Route::get("admin/dashboard/roles", "AdminController@rolesView");
+
+Route::get("admin/dashboard/experiments", "AdminController@experimentsView");
+
+Route::get("admin/dashboard/experiment/summary", function(){
+	return Redirect::to("experiment/summary?expId=" . $_GET["expId"] . "&dashboard=true");
+});
+
+Route::get("admin/dashboard/credential-store", "AdminController@credentialStoreView");
+
+Route::get("manage/users", "AdminController@usersView");
+
+Route::post("admin/adduser", "AdminController@addAdminSubmit");
+
+Route::post("admin/addgatewayadmin", "AdminController@addGatewayAdminSubmit");
+
+Route::post("admin/addrole", "AdminController@addRole");
+
+Route::post("admin/checkroles", "AdminController@getRoles");
+
+Route::post("admin/deleterole", "AdminController@deleteRole");
+
+//Airavata Server Check
+Route::get("airavata/down", function(){
+	return View::make("server-down");
+});
+/*
+ * Test Routes.
+*/
+
+Route::get("testjob", function(){
+	//print_r( Session::all());
+});
+
+
+/*
+ * Following base Routes need to be at the bottom.
+*/
+Route::controller("home", "HomeController");
+
+Route::controller("/", "HomeController");

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/start/artisan.php
----------------------------------------------------------------------
diff --git a/app/start/artisan.php b/app/start/artisan.php
new file mode 100755
index 0000000..1df850b
--- /dev/null
+++ b/app/start/artisan.php
@@ -0,0 +1,13 @@
+<?php
+
+/*
+|--------------------------------------------------------------------------
+| Register The Artisan Commands
+|--------------------------------------------------------------------------
+|
+| Each available Artisan command must be registered with the console so
+| that it is available to be called. We'll register every command so
+| the console gets access to each of the command object instances.
+|
+*/
+

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/start/global.php
----------------------------------------------------------------------
diff --git a/app/start/global.php b/app/start/global.php
new file mode 100755
index 0000000..cddbe4d
--- /dev/null
+++ b/app/start/global.php
@@ -0,0 +1,82 @@
+<?php
+
+/*
+|--------------------------------------------------------------------------
+| Register The Laravel Class Loader
+|--------------------------------------------------------------------------
+|
+| In addition to using Composer, you may use the Laravel class loader to
+| load your controllers and models. This is useful for keeping all of
+| your classes in the "global" namespace without Composer updating.
+|
+*/
+
+ClassLoader::addDirectories(array(
+
+	app_path().'/commands',
+	app_path().'/controllers',
+	app_path().'/models',
+	app_path().'/database/seeds',
+	app_path().'/libraires',
+
+));
+
+/*
+|--------------------------------------------------------------------------
+| Application Error Logger
+|--------------------------------------------------------------------------
+|
+| Here we will configure the error logger setup for the application which
+| is built on top of the wonderful Monolog library. By default we will
+| build a basic log file setup which creates a single file for logs.
+|
+*/
+
+Log::useFiles(storage_path().'/logs/laravel.log');
+
+/*
+|--------------------------------------------------------------------------
+| Application Error Handler
+|--------------------------------------------------------------------------
+|
+| Here you may handle any errors that occur in your application, including
+| logging them or displaying custom views for specific errors. You may
+| even register several error handlers to handle different types of
+| exceptions. If nothing is returned, the default error view is
+| shown, which includes a detailed stack trace during debug.
+|
+*/
+
+App::error(function(Exception $exception, $code)
+{
+	Log::error($exception);
+});
+
+/*
+|--------------------------------------------------------------------------
+| Maintenance Mode Handler
+|--------------------------------------------------------------------------
+|
+| The "down" Artisan command gives you the ability to put an application
+| into maintenance mode. Here, you will define what is displayed back
+| to the user if maintenance mode is in effect for the application.
+|
+*/
+
+App::down(function()
+{
+	return Response::make("Be right back!", 503);
+});
+
+/*
+|--------------------------------------------------------------------------
+| Require The Filters File
+|--------------------------------------------------------------------------
+|
+| Next we will load the filters file for the application. This gives us
+| a nice separate location to store our route and application filter
+| definitions instead of putting them all in the main routes file.
+|
+*/
+
+require app_path().'/filters.php';

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/start/local.php
----------------------------------------------------------------------
diff --git a/app/start/local.php b/app/start/local.php
new file mode 100755
index 0000000..3d14850
--- /dev/null
+++ b/app/start/local.php
@@ -0,0 +1,3 @@
+<?php
+
+//
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/storage/.gitignore
----------------------------------------------------------------------
diff --git a/app/storage/.gitignore b/app/storage/.gitignore
new file mode 100644
index 0000000..35b719c
--- /dev/null
+++ b/app/storage/.gitignore
@@ -0,0 +1 @@
+services.manifest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/storage/cache/.gitignore
----------------------------------------------------------------------
diff --git a/app/storage/cache/.gitignore b/app/storage/cache/.gitignore
new file mode 100644
index 0000000..c96a04f
--- /dev/null
+++ b/app/storage/cache/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/storage/logs/.gitignore
----------------------------------------------------------------------
diff --git a/app/storage/logs/.gitignore b/app/storage/logs/.gitignore
new file mode 100644
index 0000000..c96a04f
--- /dev/null
+++ b/app/storage/logs/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/storage/meta/.gitignore
----------------------------------------------------------------------
diff --git a/app/storage/meta/.gitignore b/app/storage/meta/.gitignore
new file mode 100644
index 0000000..c96a04f
--- /dev/null
+++ b/app/storage/meta/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/storage/sessions/.gitignore
----------------------------------------------------------------------
diff --git a/app/storage/sessions/.gitignore b/app/storage/sessions/.gitignore
new file mode 100644
index 0000000..c96a04f
--- /dev/null
+++ b/app/storage/sessions/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/storage/views/.gitignore
----------------------------------------------------------------------
diff --git a/app/storage/views/.gitignore b/app/storage/views/.gitignore
new file mode 100644
index 0000000..c96a04f
--- /dev/null
+++ b/app/storage/views/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/tests/ExampleTest.php
----------------------------------------------------------------------
diff --git a/app/tests/ExampleTest.php b/app/tests/ExampleTest.php
new file mode 100755
index 0000000..62387de
--- /dev/null
+++ b/app/tests/ExampleTest.php
@@ -0,0 +1,17 @@
+<?php
+
+class ExampleTest extends TestCase {
+
+	/**
+	 * A basic functional test example.
+	 *
+	 * @return void
+	 */
+	public function testBasicExample()
+	{
+		$crawler = $this->client->request('GET', '/');
+
+		$this->assertTrue($this->client->getResponse()->isOk());
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/tests/TestCase.php
----------------------------------------------------------------------
diff --git a/app/tests/TestCase.php b/app/tests/TestCase.php
new file mode 100755
index 0000000..d367fe5
--- /dev/null
+++ b/app/tests/TestCase.php
@@ -0,0 +1,19 @@
+<?php
+
+class TestCase extends Illuminate\Foundation\Testing\TestCase {
+
+	/**
+	 * Creates the application.
+	 *
+	 * @return \Symfony\Component\HttpKernel\HttpKernelInterface
+	 */
+	public function createApplication()
+	{
+		$unitTesting = true;
+
+		$testEnvironment = 'testing';
+
+		return require __DIR__.'/../../bootstrap/start.php';
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/views/account/create.blade.php
----------------------------------------------------------------------
diff --git a/app/views/account/create.blade.php b/app/views/account/create.blade.php
new file mode 100755
index 0000000..9feb720
--- /dev/null
+++ b/app/views/account/create.blade.php
@@ -0,0 +1,121 @@
+@extends('layout.basic')
+
+@section('page-header')
+    @parent
+@stop
+
+@section('content')
+
+<div class="col-md-offset-4 col-md-4">
+    <div class="page-header">
+        <h3>Create New Account
+            <small>
+                <small> (Already registered? <a href="login">Log in</a>)</small>
+            </small>
+        </h3>
+    </div>
+    @if ($errors->has())
+        
+            @foreach ($errors->all() as $error)
+                {{ Utilities::print_error_message($error) }}        
+            @endforeach
+        
+        @endif
+
+    <form action="create" method="post" role="form">
+        
+    @if( Session::has('username_exists'))
+            {{ Utilities::print_error_message('The username you entered is already in use. Please select another.') }}
+    @endif
+    <?php
+    Session::forget("username_exists");
+    ?>
+        <div class="form-group required"><label class="control-label">Username</label>
+
+            <div><input class="form-control" id="username" minlength="6" maxlength="30" name="username"
+                        placeholder="Username" required="required" type="text"  value="{{Input::old('username') }}"/></div>
+        </div>
+        <div class="form-group required"><label class="control-label">Password</label>
+
+            <div><input class="form-control" id="password" minlength="6" name="password" placeholder="Password"
+                        required="required" title="" type="password"/></div>
+        </div>
+        <div class="form-group required"><label class="control-label">Password (again)</label>
+
+            <div><input class="form-control" id="confirm_password" name="confirm_password"
+                        placeholder="Password (again)" required="required" title="" type="password"/>
+            </div>
+        </div>
+        <div class="form-group required"><label class="control-label">E-mail</label>
+
+            <div><input class="form-control" id="email" name="email" placeholder="E-mail"
+                        required="required" title="" type="email"   value="{{Input::old('email') }}"/></div>
+        </div>
+        <div class="form-group required"><label class="control-label">First Name</label>
+
+            <div><input class="form-control" id="first_name" maxlength="30" name="first_name"
+                        placeholder="First Name" required="required" title="" type="text"   value="{{Input::old('first_name') }}"/></div>
+        </div>
+        <div class="form-group required"><label class="control-label">Last Name</label>
+
+            <div><input class="form-control" id="last_name" maxlength="30" name="last_name"
+                        placeholder="Last Name" required="required" title="" type="text"   value="{{Input::old('last_name') }}"/></div>
+        </div>
+        <div class="form-group"><label class="control-label">Organization</label>
+
+            <div><input class="form-control" id="organization" name="organization"
+                        placeholder="Organization" title="" type="text"   value="{{Input::old('organization') }}"/>
+            </div>
+        </div>
+        <div class="form-group"><label class="control-label">Address</label>
+
+            <div><input class="form-control" id="address" name="address"
+                        placeholder="Address" title="" type="text"   value="{{Input::old('address') }}"/>
+            </div>
+        </div>
+        <div class="form-group"><label class="control-label">Country</label>
+
+            <div><input class="form-control" id="country" name="country"
+                        placeholder="Country" title="" type="text"   value="{{Input::old('country') }}"/>
+            </div>
+        </div>
+        <div class="form-group"><label class="control-label">Telephone</label>
+
+            <div><input class="form-control" id="telephone" name="telephone"
+                        placeholder="Telephone" title="" type="tel"   value="{{Input::old('telephone') }}"/>
+            </div>
+        </div>
+        <div class="form-group"><label class="control-label">Mobile</label>
+
+            <div><input class="form-control" id="mobile" name="mobile"
+                        placeholder="Mobile" title="" type="tel"   value="{{Input::old('mobile') }}"/>
+            </div>
+        </div>
+        <div class="form-group"><label class="control-label">IM</label>
+
+            <div><input class="form-control" id="im" name="im"
+                        placeholder="IM" title="" type="text"   value="{{Input::old('im') }}"/>
+            </div>
+        </div>
+        <div class="form-group"><label class="control-label">URL</label>
+
+            <div><input class="form-control" id="url" name="url"
+                        placeholder="URL" title="" type="text"   value="{{Input::old('url') }}"/>
+            </div>
+        </div>
+        <br/>
+        <input name="Submit" type="submit" class="btn btn-primary btn-block" value="Create">
+    </form>
+
+    <style media="screen" type="text/css">
+        .form-group.required .control-label:after {
+            content: " *";
+            color: red;
+        }
+    </style>
+    <br/><br/><br/>
+</div>
+</body>
+
+@stop
+

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/views/account/forgot-password.blade.php
----------------------------------------------------------------------
diff --git a/app/views/account/forgot-password.blade.php b/app/views/account/forgot-password.blade.php
new file mode 100644
index 0000000..b9c8274
--- /dev/null
+++ b/app/views/account/forgot-password.blade.php
@@ -0,0 +1,18 @@
+@extends('layout.basic')
+
+@section('page-header')
+    @parent
+@stop
+
+@section('content')
+
+<div class="col-md-offset-3 col-md-6">
+
+<h3> Did you forget the password to your account? </h3>
+<h4> Please enter your email id, you registered with.</h4>
+<div class="form-group form-horizontal">
+	<div class="col-md-8"><input type="email" value="" class="form-control" placeholder="email"/></div>
+	<div class="col-md-2"><input type="submit" class="form-control btn btn-primary"value="Submit"/></div>
+</div>
+
+@stop
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/views/account/login.blade.php
----------------------------------------------------------------------
diff --git a/app/views/account/login.blade.php b/app/views/account/login.blade.php
new file mode 100755
index 0000000..0e13cd0
--- /dev/null
+++ b/app/views/account/login.blade.php
@@ -0,0 +1,44 @@
+@extends('layout.basic')
+
+@section('page-header')
+    @parent
+@stop
+
+@section('content')
+
+    <div class="col-md-offset-4 col-md-4">
+
+        <h3>
+            Login
+            <small>
+                <small> (Not registered? <a href="create">Create account</a>)</small>
+            </small>
+        </h3>
+
+        
+
+        <form action="login" method="post" role="form">
+            @if( Session::has("invalid-credentials") )
+                {{ Utilities::print_error_message('Invalid username or password. Please try again.') }}
+            @endif
+            <?php
+            Session::forget( "invalid-credentials");
+            ?>
+
+            <div class="form-group">
+                <label class="sr-only" for="username">Username</label>
+                <input type="text" class="form-control" name="username" placeholder="Username" autofocus required>
+            </div>
+            <div class="form-group">
+                <label class="sr-only" for="password">Password</label>
+                <input type="password" class="form-control" name="password" placeholder="Password" required>
+            </div>
+            <input name="Submit" type="submit" class="btn btn-primary btn-block" value="Sign in">
+        </form>
+
+            <small>
+                <small> (Forgot Password? Click <a href="{{URL::to('/') }}/forgot-password">here</a>)</small>
+            </small>
+    </div>
+
+@stop
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/views/admin/dashboard.blade.php
----------------------------------------------------------------------
diff --git a/app/views/admin/dashboard.blade.php b/app/views/admin/dashboard.blade.php
new file mode 100644
index 0000000..0fd2ffc
--- /dev/null
+++ b/app/views/admin/dashboard.blade.php
@@ -0,0 +1,115 @@
+@extends('layout.basic')
+
+@section('page-header')
+    @parent
+@stop
+
+@section('content')
+<div class="container">
+    <div class="col-md-12">
+        @if( Session::has("message"))
+            <div class="row">
+                <div class="alert alert-success alert-dismissible" role="alert">
+                    <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
+                    {{ Session::get("message") }}
+                </div>
+            </div>
+            {{ Session::forget("message") }}
+        @endif
+
+        <div class="row text-center">
+            <h1>Admin Console</h1>
+        </div>
+        <div class="row text-center admin-options">
+
+        <div class="row">
+            <a href="{{URL::to('/')}}/manage/users">
+                <div class="col-md-3 well">
+                    <div class="col-md-12">
+                        <span class="glyphicon glyphicon-user"></span>
+                    </div>
+                    <div class="col-md-12">
+                        Users
+                    </div>
+                </div>
+            </a>
+
+            <a href="{{URL::to('/')}}/admin/dashboard">
+                <div class=" col-md-offset-1 col-md-3 well">
+                    <div class="col-md-12">
+                        <span class="glyphicon glyphicon-eye-open"></span>
+                    </div>
+                    <div class="col-md-12">
+                        Admins
+                    </div>
+                </div>
+            </a>
+
+            <a href="{{URL::to('/')}}/cr/browse">
+                <div class=" col-md-offset-1 col-md-3 well">
+                    <div class="col-md-12">
+                        <span class="glyphicon glyphicon-briefcase"></span>
+                    </div>
+                    <div class="col-md-12">
+                        Resources
+                    </div>
+                </div>
+            </a>
+        </div>
+
+        <div class="row">
+            <div class="col-md-3 well">
+                <div class="col-md-12">
+                    <span class="glyphicon glyphicon-tasks"></span>
+                </div>
+                <div class="col-md-12">
+                    Application Catalog
+                </div>
+                <select  onchange="location = this.options[this.selectedIndex].value;">
+                    <option>-- Select --</option>
+                    <option value="{{URL::to('/')}}/app/interface">Interface</option>
+                    <option value="{{URL::to('/')}}/app/module">Module</option>
+                    <option value="{{URL::to('/')}}/app/deployment">Deployment</option>
+                </select>
+            </div>
+
+                <div class=" col-md-offset-1 col-md-3 well">
+                    <div class="col-md-12">
+                        <span class="glyphicon glyphicon-sort"></span>
+                    </div>
+                    <div class="col-md-12">
+                        Gateways
+                    </div>
+                    <select  onchange="location = this.options[this.selectedIndex].value;">
+                        <option>-- Select --</option>
+                        <option value="{{URL::to('/')}}/gp/create">Create</option>
+                        <option value="{{URL::to('/')}}/gp/browse">Browse</option>
+                    </select>
+                </div>
+
+                <div class=" col-md-offset-1 col-md-3 well">
+                    <div class="col-md-12">
+                        <span class="glyphicon glyphicon-list-alt"></span>
+                    </div>
+                    <div class="col-md-12">
+                        Reports
+                    </div>
+                </div>
+            </div>
+
+            <div class="row">
+                <div class="col-md-3 well">
+                    <div class="col-md-12">
+                        <span class="glyphicon glyphicon-question-sign"></span>
+                    </div>
+                    <div class="col-md-12">
+                        Support
+                    </div>
+                </div>
+            </div>
+
+        </div>
+    </div>
+</div>
+
+@stop
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/views/admin/manage-admin.blade.php
----------------------------------------------------------------------
diff --git a/app/views/admin/manage-admin.blade.php b/app/views/admin/manage-admin.blade.php
new file mode 100644
index 0000000..35fbaee
--- /dev/null
+++ b/app/views/admin/manage-admin.blade.php
@@ -0,0 +1,196 @@
+@extends('layout.basic')
+
+@section('page-header')
+    @parent
+@stop
+
+@section('content')
+<div class="container">
+    <div class="col-md-12">
+        @if( Session::has("message"))
+            <div class="row">
+                <div class="alert alert-success alert-dismissible" role="alert">
+                    <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
+                    {{ Session::get("message") }}
+                </div>
+            </div>
+            {{ Session::forget("message") }}
+        @endif
+        <div class="panel-group" id="accordion">
+
+        <!-- Super Admin Users have access to Scigap Administration -->
+          <div class="panel panel-default">
+            <div class="panel-heading">
+              <h4 class="panel-title">
+                <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
+                  Scigap Administration
+                </a>
+              </h4>
+            </div>
+            <div id="collapseOne" class="panel-collapse collapse in">
+                <div class="panel-body">
+                    <h1>Add a User to Admin</h1>
+                    <form action="{{URL::to('/')}}/admin/adduser" 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">
+                        </div>
+                        <div class="btn-toolbar">
+                            <input name="add" type="submit" class="btn btn-primary" value="Add User">
+                        </div>   
+                    </form>
+                </div>
+            </div>
+          </div>
+        <!-- Scigap Administration Ends -->
+
+        <!-- Gateway Administration can be accessed by Super Admins and Gateway Admins can access their particular gateway -->
+        <div class="panel panel-default">
+            <div class="panel-heading">
+              <h4 class="panel-title">
+                <a data-toggle="collapse" data-parent="#accordion" href="#collapseThree">
+                    Gateways Administration
+                </a>
+              </h4>
+            </div>
+            <div id="collapseThree" class="panel-collapse collapse">
+                <div class="panel-body">
+                    <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( $gatewayProfiles 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 }}" data-gp-desc="{{ $gp->gatewayDescription }}"></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">
+                                        <h5>{{ $gp->gatewayDescription}}</h5>
+                                        <hr/>
+                                        <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>
+            </div>
+          </div>
+
+        <!-- Super Admin Users have access to Role Administration -->
+          <div class="panel panel-default">
+            <div class="panel-heading">
+              <h4 class="panel-title">
+                <a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo">
+                  Role Adminstration
+                </a>
+              </h4>
+            </div>
+            <div id="collapseTwo" class="panel-collapse collapse">
+                <div class="panel-body">
+                    <h1>Existing Roles</h1>
+                    <table class="table table-condensed">
+                    @foreach( $roles as $role)
+                        <tr>
+                            <td>{{ $role }}</td>
+                            @if( $role != "admin")
+                                <td><a href=""><span class="glyphicon glyphicon-pencil"></span></a></td>
+                                <td><span class="glyphicon glyphicon-remove"></span></td>
+                            @endif
+                        </tr>
+                    @endforeach
+                    </table>
+                    <h1>Add a new Role</h1>
+                    <form id="role-form" action="{{URL::to('/')}}/admin/addrole" method="POST" role="form" enctype="multipart/form-data">
+                        <div class="form-group form-horizontal required col-md-2">
+                            <label for="experiment-name" class="control-label">Enter Role</label>
+                        </div>
+                        <div class="form-group form-horizontal required col-md-4">
+                            <input type="text" class="form-control input-small role-name" name="role" placeholder="username" autofocus required="required">
+                        </div>
+                        <div class="form-group form-horizontal col-md-4">
+                            <input name="add" type="submit" class="btn btn-primary add-role" value="Add">
+                        </div>   
+                    </form>
+                    <input type="hidden" id="roles" value="{{ htmlentities( json_encode( $roles) ) }}"/>
+                </div>
+            </div>
+          </div>
+          <!-- Role Administration complete -->
+
+          <!-- Admins will have access to their settings -->
+          <div class="panel panel-default">
+            <div class="panel-heading">
+              <h4 class="panel-title">
+                <a data-toggle="collapse" data-parent="#accordion" href="#collapseThree">
+                    Settings
+                </a>
+              </h4>
+            </div>
+            <div id="collapseThree" class="panel-collapse collapse">
+                <div class="panel-body">
+                    some settngs should come here.
+                </div>
+            </div>
+          </div>
+          <!--Settings complete -->
+
+        </div>
+    </div>
+</div>
+
+@stop
+
+
+@section('scripts')
+    @parent
+    <script>
+    // Checking if role already exists.
+    $(".add-role").click( function( e){
+        e.preventDefault();
+        var roles = $.parseJSON( $("#roles").val() );
+        if( $.inArray( $.trim( $(".role-name").val() ), roles ) != -1 )
+        {
+            console.log( $(this).parent().find(".alert").length );
+            if( ! $(this).parent().parent().find(".alert").length )
+            {
+                $(this).parent().after("<div class='col-md-12 alert alert-danger'>This role already exists. Please pick another role.</span>");
+            }
+        }
+        else
+            $("#role-form").submit();
+    })
+    </script>
+@stop
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/app/views/admin/manage-credentials.blade.php
----------------------------------------------------------------------
diff --git a/app/views/admin/manage-credentials.blade.php b/app/views/admin/manage-credentials.blade.php
new file mode 100644
index 0000000..2183739
--- /dev/null
+++ b/app/views/admin/manage-credentials.blade.php
@@ -0,0 +1,164 @@
+@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="col-md-12">
+                    @if( Session::has("message"))
+                        <div class="row">
+                            <div class="alert alert-success alert-dismissible" role="alert">
+                                <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
+                                {{ Session::get("message") }}
+                            </div>
+                        </div>
+                        {{ Session::forget("message") }}
+                    @endif
+
+                    <h1 class="text-center">SSH Keys</h1>
+
+                    <table class="table table-bordered table-condensed">
+                        <tr>
+                            <th class="text-center">
+                                Token</th>
+                            <th class="text-center">Public Key</th>
+                        </tr>
+                        @foreach( $tokens as $token)
+                        <tr>
+                            <td class="role-name">{{ $token }}</td>
+                            <td>
+                                {{ $public-key }}
+                            </td>
+                        </tr>
+                        @endforeach
+                        <tr>
+                            <td>Some token</td>
+                            <td>$ cat ~/.ssh/id_rsa.pub
+ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAklOUpkDHrfHY17SbrmTIpNLTGK9Tjom/BWDSU
+GPl+nafzlHDTYW7hdI4yZ5ew18JH4JW9jbhUFrviQzM7xlELEVf4h9lFX5QVkbPppSwg0cda3
+Pbv7kOdJ/MTyBlWXFCR+HAo3FXRitBqxiX1nKhXpHAZsMciLq8V6RjsNAQwdsdMFvSlVK/7XA
+t3FaoJoAsncM1Q9x5+3V0Ww68/eIFmb1zuUFljQJKprrX88XypNDvjYNby6vw/Pb0rwert/En
+mZ+AW4OZPnTPI89ZPmVMLuayrD2cE86Z/il8b+gw3r3+1nKatmIkjn2so1d01QraTlMqVSsbx
+NrRFi9wrf+M7Q== schacon@mylaptop.local</td>
+                        </tr>
+                    </table>
+                    <table class="table">
+                        <tr class="text-center table-condensed">
+                            <td><button class="btn btn-default">Generate a new token</button></td>
+                        </tr>
+                    </table>
+
+                    <div class="row">
+                        <h1 class="text-center">My Proxy Credentials</h1>
+
+                        <div class="col-md-offset-3 col-md-6">
+                            <table class="table table-striped table-condensed">
+                                <tr>
+                                    <td>My Proxy Server</td>
+                                    <td><input type="text" class="form-control" placeholder="" value=""/></td>
+                                </tr>
+                                <tr>
+                                    <td>Username</td>
+                                    <td><input type="text" class="form-control" placeholder="" value=""/></td>
+                                </tr>
+                                <tr>
+                                    <td>Passphrase</td>
+                                    <td><input type="text" class="form-control" placeholder="" value=""/></td>
+                                </tr>
+                            </table>
+                            <table class="table">
+                                <tr class="text-center table-condensed">
+                                    <td><button class="btn btn-default">Submit</button></td>
+                                </tr>
+                            </table>
+                        </div>
+                    </div>
+
+                    <h1 class="text-center">Amazon Credentials</h1>
+
+                    <table class="table table-striped table-condensed">
+                        <tr class="text-center">
+                            <td>Under Development</td>
+                        </tr>
+                    </table>
+
+                    <h1 class="text-center">OAuth MyProxy</h1>
+
+                    <table class="table table-striped table-condensed">
+                        <tr class="text-center">
+                            <td>Under Development</td>
+                        </tr>
+                    </table>
+                </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/01413d65/app/views/admin/manage-experiments.blade.php
----------------------------------------------------------------------
diff --git a/app/views/admin/manage-experiments.blade.php b/app/views/admin/manage-experiments.blade.php
new file mode 100644
index 0000000..0aaddc5
--- /dev/null
+++ b/app/views/admin/manage-experiments.blade.php
@@ -0,0 +1,169 @@
+@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="col-md-12">
+                <h3>Experiments</h3>
+            </div>
+            <div class="container-fluid">
+
+                <div class="row">
+                    <!--
+                        <div class="well col-md-2 text-center">
+                            Total 500
+                        </div>
+                    -->
+
+                    <div class="well form-group form-horizontal col-md-12">
+                        <label class="col-md-3">Enter Experiment Id to View Summary :</label>
+                        <div class="col-md-6">
+                            <input type="text" class="form-control experimentId"/>
+                        </div>
+                        <button class="col-md-3 btn btn-primary get-experiment">Get</button>
+                        <div class="loading-img hide text-center"><img src="{{URL::to('/')}}/assets/ajax-loader.gif"/></div>
+
+                        <div class="experiment-info col-md-12">
+                        </div>
+                    </div>
+                </div>
+
+                <div class="row">
+                    <div class="tree">
+                        <ul>
+                            <li>
+                                <span><i class="icon-calendar"></i>Experiment 1</span>
+                                <ul>
+                                    <li>
+                                        <span class="badge badge-success"><i class="icon-minus-sign"></i>Pre Processing</span>
+                                        <ul>
+                                            <li>
+                                                <a href=""><span class="alert alert-success"><i class="icon-time"></i>2015-04-17 15:21:21</span> &ndash;  PGA to Airavata Authentication Successful</a>
+                                            </li>
+                                            <li>
+                                                <a href=""><span class="alert alert-success"><i class="icon-time"></i>2015-04-17 15:21:21</span> &ndash;  Airavata to Resource Authentication Successful</a>
+                                            </li>
+                                        </ul>
+                                    </li>
+                                    <li>
+                                        <span class="badge badge-success"><i class="icon-minus-sign"></i>Input Staging</span>
+                                        <ul>
+                                            <li>
+                                                <span  class="alert alert-success"><i class="icon-time"></i>2015-04-17 15:21:21</span> &ndash; <a href="">PGA to Airavata File Transfer Successful</a>
+                                            </li>
+                                            <li>
+                                                <span  class="alert alert-success"abhi ><i class="icon-time"></i>2015-04-17 15:21:21</span> &ndash; <a href="">Airavata to Resource File Transfer Successful</a>
+                                            </li>
+                                        </ul>
+                                    </li>
+                                    <li>
+                                        <span class="badge badge-warning"><i class="icon-minus-sign"></i>Job Description</span>
+                                        <ul>
+                                            <li>
+                                                <a href=""><span>
+                                                   Long Script of Job Description / PBS Script <br/>
+                                                   <br/>
+                                                    <p>
+                                                        Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean
+                                                    </p>
+                                                 </span></a>
+                                            </li>
+                                        </ul>
+                                    </li>
+                                    <li>
+                                        <span class="badge badge-important"><i class="icon-minus-sign"></i>Execution</span>
+                                        <ul>
+                                            <li>
+                                                <a href=""><span  class="alert alert-success"><i class="icon-time"></i>2015-04-17 15:21:21</span> &ndash; Execution of Job Description - No errors</a>
+                                            </li>
+                                        </ul>
+                                    </li>
+
+                                    <li>
+                                        <span class="badge badge-important"><i class="icon-minus-sign"></i>Experiment Complete</span>
+                                        <ul>
+                                            <li>
+                                                <a href=""><span  class="alert alert-danger"><i class="icon-time"></i>2015-04-17 15:21:21</span> &ndash; Output Transfer from Resource to Airavata UnSuccessful</a>
+                                                <br/>
+                                                <span> Some text about failure</span>
+                                            </li>
+                                            <li>
+                                                <a href=""><span  class="alert alert-danger"><i class="icon-time"></i>2015-04-17 15:21:21</span> &ndash; Output Transfer from Airavata to PGA UnSuccessful</a>
+                                                <br/>
+                                                <span> Some text about failure</span>
+                                            </li>
+                                        </ul>
+                                    </li>
+
+
+                                </ul>
+                            </li>
+                        </ul>
+                    </div>
+                </div>
+            </div>
+            <!-- /.container-fluid -->
+
+        </div>
+        <!-- /#page-wrapper -->
+
+    </div>
+
+@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();
+        });
+
+        $(function () {
+            $('.tree li:has(ul)').addClass('parent_li').find(' > span').attr('title', 'Collapse this branch');
+            $('.tree li.parent_li > span').on('click', function (e) {
+                var children = $(this).parent('li.parent_li').find(' > ul > li');
+                if (children.is(":visible")) {
+                    children.hide('fast');
+                    $(this).attr('title', 'Expand this branch').find(' > i').addClass('icon-plus-sign').removeClass('icon-minus-sign');
+                } else {
+                    children.show('fast');
+                    $(this).attr('title', 'Collapse this branch').find(' > i').addClass('icon-minus-sign').removeClass('icon-plus-sign');
+                }
+                e.stopPropagation();
+            });
+
+            $(".get-experiment").click( function(){
+                $(".loading-img").removeClass("hide");
+                $.ajax({
+                    url:'experiment/summary?expId=' + $(".experimentId").val(),
+                    type: 'get',
+                    success:function( data){
+                        $(".experiment-info").html( data);
+
+                    }
+                }).complete( function(){
+                    $(".loading-img").addClass("hide");
+                });
+            });
+
+            //Experiment stages are under development.
+            $(".tree").parent().addClass("hide");
+        });
+    </script>
+@stop
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/01413d65/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..f7261d1
--- /dev/null
+++ b/app/views/admin/manage-gateway.blade.php
@@ -0,0 +1,228 @@
+@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="col-md-12">
+            @if( Session::has("message"))
+                <div class="row">
+                    <div class="alert alert-success alert-dismissible" role="alert">
+                        <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
+                        {{ Session::get("message") }}
+                    </div>
+                </div>
+                {{ Session::forget("message") }}
+            @endif
+            </div>
+            <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">
+                                                <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>
+                                                <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>
+                                                @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">
+                                                        <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


Mime
View raw message