merge
diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php
index 601ad8e..6a50124 100644
--- a/app/controllers/AccountController.php
+++ b/app/controllers/AccountController.php
@@ -78,7 +78,7 @@
if(! in_array( "gateway-provider", $allRoles)){
WSIS::addRole( "gateway-provider");
}
- $userRoles["new"] = array("gateway-provider", "admin");
+ $userRoles["new"] = array("gateway-provider");
}
$userRoles["deleted"] = array();
WSIS::updateUserRoles( $username, $userRoles);
@@ -292,26 +292,20 @@
}
public function dashboard(){
-
- $userProfile = Session::get("user-profile");
-
- if( in_array( "gateway-provider", $userProfile["roles"]) ) {
+ if( Session::has("gateway-provider")){
$gatewayOfUser = "";
-
+ //var_dump( Session::get("authz-token")->accessToken); exit;
+ $userProfile = Session::get("user-profile");
$gatewaysInfo = CRUtilities::getAllGateways();
- var_dump( $gatewaysInfo); exit;
- foreach ($gatewaysInfo as $index => $gateway) {
- if ($gateway->emailAddress == $userProfile["email"]) {
+ foreach( $gatewaysInfo as $index => $gateway){
+ if( $gateway->emailAddress == $userProfile["email"]){
Session::set("gateway_id", $gateway->gatewayId);
$gatewayOfUser = $gateway->gatewayId;
- Session::forget("super-admin");
break;
}
}
- if ($gatewayOfUser == "") {
- $userInfo["username"] = $userProfile["username"];
- $userInfo["email"] = $userProfile["email"];
- Session::put("new-gateway-provider", true);
+ if( $gatewayOfUser == ""){
+ Session::put("new-gateway-provider");
}
}
@@ -415,7 +409,7 @@
$username = $username . "@" . $wsisConfig['tenant-domain'];
$str = "Gateway Portal: " . $_SERVER['SERVER_NAME'] ."<br/>";
- $str = $str . "Username: " . $username ."<ber/>";
+ $str = $str . "Username: " . $username ."<br/>";
$str = $str . "Name: " . $userProfile["firstname"] . " " . $userProfile["lastname"] . "<br/>";
$str = $str . "Email: " . $userProfile["email"];
diff --git a/app/controllers/AdminController.php b/app/controllers/AdminController.php
index e27c30b..f289e07 100644
--- a/app/controllers/AdminController.php
+++ b/app/controllers/AdminController.php
@@ -13,29 +13,21 @@
$userProfile = Session::get("user-profile");
Session::forget("new-gateway-provider");
- if( in_array( "gateway-provider", $userProfile["roles"]) ) {
- $gatewayOfUser = "";
- $gatewaysInfo = CRUtilities::getAllGateways();
- //var_dump( $gatewaysInfo); exit;
- foreach ($gatewaysInfo as $index => $gateway) {
- if ($gateway->identityServerUserName == $userProfile["username"]) {
+
+ if( in_array( "gateway-provider", $userProfile["roles"]) ){
+ $gatewayOfUser = "";
+ $gatewaysInfo = CRUtilities::getAllGateways();
+ foreach( $gatewaysInfo as $index => $gateway){
+ if( $gateway->emailAddress == $userProfile["email"]){
Session::set("gateway_id", $gateway->gatewayId);
$gatewayOfUser = $gateway->gatewayId;
Session::forget("super-admin");
- Session::put("existing-gateway-provider", true);
- if( $gateway->gatewayApprovalStatus == 0){
- Session::put("approvalStatus", "Requested");
- }
- elseif( $gateway->gatewayApprovalStatus == 3){
- Session::put("approvalStatus", "Denied");
- }
break;
}
}
-
- if ($gatewayOfUser == "") {
- $userInfo["username"] = $userProfile["username"];
- $userInfo["email"] = $userProfile["email"];
+ if( $gatewayOfUser == ""){
+ $userInfo["username"] = $userProfile["username"];
+ $userInfo["email"] = $userProfile["email"];
Session::put("new-gateway-provider", true);
}
}
@@ -139,12 +131,6 @@
}
}
- public function updateGatewayRequest(){
- AdminUtilities::update_gateway_status( Input::get("gateway_id"), Input::get("status"));
-
- return Redirect::to("admin/dashboard/gateway");
- }
-
public function rolesView(){
$roles = WSIS::getAllRoles();
Session::put("admin-nav", "manage-roles");
@@ -388,43 +374,6 @@
}
}
-
- public function requestGateway(){
- $inputs = Input::all();
-
- $rules = array(
- "username" => "required|min:6",
- "password" => "required|min:6|max:48|regex:/^.*(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[@!$#*]).*$/",
- "confirm_password" => "required|same:password",
- "email" => "required|email",
- );
-
- $messages = array(
- 'password.regex' => 'Password needs to contain at least (a) One lower case letter (b) One Upper case letter and (c) One number (d) One of the following special characters - !@#$&*',
- );
-
- $checkValidation = array();
- $checkValidation["username"] = $inputs["admin-username"];
- $checkValidation["password"] = $inputs["admin-password"];
- $checkValidation["confirm_password"] = $inputs["admin-password-confirm"];
- $checkValidation["email"] = $inputs["email-address"];
-
- $validator = Validator::make( $checkValidation, $rules, $messages);
- if ($validator->fails()) {
- Session::put("message", $validator->messages() );
- return Redirect::to("admin/dashboard");
- }
- else{
- $gateway = AdminUtilities::request_gateway(Input::all());
-
- //$tm = WSIS::createTenant(1, $inputs["admin-username"] . "@" . $inputs["domain"], $inputs["admin-password"], inputs["admin-email"], $inputs["admin-firstname"], $inputs["admin-lastname"], $inputs["domain"]);
-
- Session::put("message", "Your request for Gateway " . $inputs["gateway-name"] . " has been created.");
-
- return Redirect::to("admin/dashboard");
- }
- }
-
public function enableComputeResource(){
$resourceId = Input::get("resourceId");
$computeResource = CRUtilities::get_compute_resource($resourceId);
diff --git a/app/controllers/GatewayController.php b/app/controllers/GatewayController.php
deleted file mode 100644
index 48d42e5..0000000
--- a/app/controllers/GatewayController.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-
-class GatewayController extends BaseController {
-
- public function requestGateway(){
- $inputs = Input::all();
-
- $rules = array(
- "username" => "required|min:6",
- "password" => "required|min:6|max:48|regex:/^.*(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[@!$#*]).*$/",
- "confirm_password" => "required|same:password",
- "email" => "required|email",
- );
-
- $messages = array(
- 'password.regex' => 'Password needs to contain at least (a) One lower case letter (b) One Upper case letter and (c) One number (d) One of the following special characters - !@#$&*',
- );
-
- $checkValidation = array();
- $checkValidation["username"] = $inputs["admin-username"];
- $checkValidation["password"] = $inputs["admin-password"];
- $checkValidation["confirm_password"] = $inputs["admin-password-confirm"];
- $checkValidation["email"] = $inputs["email-address"];
-
- $validator = Validator::make( $checkValidation, $rules, $messages);
- if ($validator->fails()) {
- Session::put("message", implode(",", $validator->messages() ));
- return Redirect::to("admin/dashboard");
- }
- else{
- $gateway = AdminUtilities::request_gateway(Input::all());
-
- Session::put("message", "Your request for Gateway " . $inputs["gatewayName"] . " has been created.");
-
- return Redirect::to("admin/dashboard");
- }
- }
-
-
-}
diff --git a/app/libraries/AdminUtilities.php b/app/libraries/AdminUtilities.php
index 2057a29..edb095f 100644
--- a/app/libraries/AdminUtilities.php
+++ b/app/libraries/AdminUtilities.php
@@ -1,7 +1,6 @@
<?php
use Airavata\Model\Workspace\Gateway;
-use Airavata\Model\Workspace\GatewayApprovalStatus;
use Airavata\Model\Workspace\Notification;
use Airavata\Model\Workspace\NotificationPriority;
@@ -23,45 +22,6 @@
return Airavata::addGateway(Session::get('authz-token'), $gateway);
}
- public static function request_gateway( $inputs)
- {
- $gateway = new Gateway( $inputs);
- $gateway->gatewayId = $inputs["gateway-name"];
- $gateway->gatewayApprovalStatus = GatewayApprovalStatus::REQUESTED;
- $gateway->domain = $inputs["domain"];
- $gateway->gatewayName = $inputs["gateway-name"];
- $gateway->emailAddress = $inputs["email-address"];
- $gateway->gatewayAcronym = $inputs["gateway-acronym"];
- $gateway->gatewayURL = $inputs["gateway-url"];
- $gateway->gatewayAdminFirstName = $inputs["admin-firstname"];
- $gateway->gatewayAdminLastName = $inputs["admin-lastname"];
- $gateway->identityServerUserName = $inputs["admin-username"];
- $gateway->identityServerPasswordToken = $inputs["admin-password"];
- $gateway->reviewProposalDescription = $inputs["project-details"];
- $gateway->gatewayPublicAbstract - $inputs["public-project-description"];
-
- return Airavata::addGateway(Session::get('authz-token'), $gateway);
-
- }
-
- public static function update_gateway_status( $gatewayId, $status){
- $gateway = Airavata::getGateway( Session::get('authz-token'), $gatewayId);
- $gateway->gatewayApprovalStatus = intval( $status);
-
- if( Airavata::updateGateway( Session::get('authz-token'), $gateway->gatewayId, $gateway) ){
- if( $gateway->gatewayApprovalStatus == GatewayApprovalStatus::APPROVED){
- if( AdminUtilities::add_tenant( $gateway) ){
- Adminutilities::update_gateway_status( Input::get("gateway_id"), GatewayApprovalStatus::ACTIVE);
- }
- }
-
- }
- }
-
- public static function add_tenant( $gateway){
- return WSIS::createTenant(1, $gateway->identityServerUserName . "@" . $gateway->domain, $gateway->identityServerPasswordToken, $gateway->emailAddress,$gateway->gatewayAdminFirstName, $gateway->gatewayAdminLastName, $gateway->domain);
- }
-
/**
* Method to get experiment execution statistics object
* @param $fromTime
diff --git a/app/libraries/Airavata/API/Airavata.php b/app/libraries/Airavata/API/Airavata.php
index df385a9..cebfb90 100644
--- a/app/libraries/Airavata/API/Airavata.php
+++ b/app/libraries/Airavata/API/Airavata.php
@@ -106,7 +106,6 @@
* @param \Airavata\Model\Security\AuthzToken $authzToken
* @param string $gatewayId
* @param \Airavata\Model\Workspace\Gateway $updatedGateway
- * @return bool
* @throws \Airavata\API\Error\InvalidRequestException
* @throws \Airavata\API\Error\AiravataClientException
* @throws \Airavata\API\Error\AiravataSystemException
@@ -3639,7 +3638,7 @@
public function updateGateway(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, \Airavata\Model\Workspace\Gateway $updatedGateway)
{
$this->send_updateGateway($authzToken, $gatewayId, $updatedGateway);
- return $this->recv_updateGateway();
+ $this->recv_updateGateway();
}
public function send_updateGateway(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, \Airavata\Model\Workspace\Gateway $updatedGateway)
@@ -3683,9 +3682,6 @@
$result->read($this->input_);
$this->input_->readMessageEnd();
}
- if ($result->success !== null) {
- return $result->success;
- }
if ($result->ire !== null) {
throw $result->ire;
}
@@ -3698,7 +3694,7 @@
if ($result->ae !== null) {
throw $result->ae;
}
- throw new \Exception("updateGateway failed: unknown result");
+ return;
}
public function getGateway(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
@@ -13767,10 +13763,6 @@
static $_TSPEC;
/**
- * @var bool
- */
- public $success = null;
- /**
* @var \Airavata\API\Error\InvalidRequestException
*/
public $ire = null;
@@ -13790,10 +13782,6 @@
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
- 0 => array(
- 'var' => 'success',
- 'type' => TType::BOOL,
- ),
1 => array(
'var' => 'ire',
'type' => TType::STRUCT,
@@ -13817,9 +13805,6 @@
);
}
if (is_array($vals)) {
- if (isset($vals['success'])) {
- $this->success = $vals['success'];
- }
if (isset($vals['ire'])) {
$this->ire = $vals['ire'];
}
@@ -13854,13 +13839,6 @@
}
switch ($fid)
{
- case 0:
- if ($ftype == TType::BOOL) {
- $xfer += $input->readBool($this->success);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
case 1:
if ($ftype == TType::STRUCT) {
$this->ire = new \Airavata\API\Error\InvalidRequestException();
@@ -13906,11 +13884,6 @@
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('Airavata_updateGateway_result');
- if ($this->success !== null) {
- $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
- $xfer += $output->writeBool($this->success);
- $xfer += $output->writeFieldEnd();
- }
if ($this->ire !== null) {
$xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
$xfer += $this->ire->write($output);
diff --git a/app/libraries/Airavata/Model/Workspace/Types.php b/app/libraries/Airavata/Model/Workspace/Types.php
index 1b516d8..b16d03c 100644
--- a/app/libraries/Airavata/Model/Workspace/Types.php
+++ b/app/libraries/Airavata/Model/Workspace/Types.php
@@ -569,26 +569,6 @@
* @var string
*/
public $reviewProposalDescription = null;
- /**
- * @var string
- */
- public $gatewayAdminFirstName = null;
- /**
- * @var string
- */
- public $gatewayAdminLastName = null;
- /**
- * @var string
- */
- public $gatewayAdminEmail = null;
- /**
- * @var string
- */
- public $identityServerUserName = null;
- /**
- * @var string
- */
- public $identityServerPasswordToken = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
@@ -629,26 +609,6 @@
'var' => 'reviewProposalDescription',
'type' => TType::STRING,
),
- 10 => array(
- 'var' => 'gatewayAdminFirstName',
- 'type' => TType::STRING,
- ),
- 11 => array(
- 'var' => 'gatewayAdminLastName',
- 'type' => TType::STRING,
- ),
- 12 => array(
- 'var' => 'gatewayAdminEmail',
- 'type' => TType::STRING,
- ),
- 13 => array(
- 'var' => 'identityServerUserName',
- 'type' => TType::STRING,
- ),
- 14 => array(
- 'var' => 'identityServerPasswordToken',
- 'type' => TType::STRING,
- ),
);
}
if (is_array($vals)) {
@@ -679,21 +639,6 @@
if (isset($vals['reviewProposalDescription'])) {
$this->reviewProposalDescription = $vals['reviewProposalDescription'];
}
- if (isset($vals['gatewayAdminFirstName'])) {
- $this->gatewayAdminFirstName = $vals['gatewayAdminFirstName'];
- }
- if (isset($vals['gatewayAdminLastName'])) {
- $this->gatewayAdminLastName = $vals['gatewayAdminLastName'];
- }
- if (isset($vals['gatewayAdminEmail'])) {
- $this->gatewayAdminEmail = $vals['gatewayAdminEmail'];
- }
- if (isset($vals['identityServerUserName'])) {
- $this->identityServerUserName = $vals['identityServerUserName'];
- }
- if (isset($vals['identityServerPasswordToken'])) {
- $this->identityServerPasswordToken = $vals['identityServerPasswordToken'];
- }
}
}
@@ -779,41 +724,6 @@
$xfer += $input->skip($ftype);
}
break;
- case 10:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->gatewayAdminFirstName);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 11:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->gatewayAdminLastName);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 12:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->gatewayAdminEmail);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 13:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->identityServerUserName);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 14:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->identityServerPasswordToken);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
default:
$xfer += $input->skip($ftype);
break;
@@ -872,31 +782,6 @@
$xfer += $output->writeString($this->reviewProposalDescription);
$xfer += $output->writeFieldEnd();
}
- if ($this->gatewayAdminFirstName !== null) {
- $xfer += $output->writeFieldBegin('gatewayAdminFirstName', TType::STRING, 10);
- $xfer += $output->writeString($this->gatewayAdminFirstName);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->gatewayAdminLastName !== null) {
- $xfer += $output->writeFieldBegin('gatewayAdminLastName', TType::STRING, 11);
- $xfer += $output->writeString($this->gatewayAdminLastName);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->gatewayAdminEmail !== null) {
- $xfer += $output->writeFieldBegin('gatewayAdminEmail', TType::STRING, 12);
- $xfer += $output->writeString($this->gatewayAdminEmail);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->identityServerUserName !== null) {
- $xfer += $output->writeFieldBegin('identityServerUserName', TType::STRING, 13);
- $xfer += $output->writeString($this->identityServerUserName);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->identityServerPasswordToken !== null) {
- $xfer += $output->writeFieldBegin('identityServerPasswordToken', TType::STRING, 14);
- $xfer += $output->writeString($this->identityServerPasswordToken);
- $xfer += $output->writeFieldEnd();
- }
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
diff --git a/app/libraries/CRUtilities.php b/app/libraries/CRUtilities.php
index 171965a..042b31a 100755
--- a/app/libraries/CRUtilities.php
+++ b/app/libraries/CRUtilities.php
@@ -507,6 +507,7 @@
public static function getAllGateways()
{
+
if (Session::has("super-admin"))
$gateways = Airavata::getAllGateways(Session::get('authz-token'));
else {
diff --git a/app/libraries/ProjectUtilities.php b/app/libraries/ProjectUtilities.php
index 23c4f86..1ac6502 100644
--- a/app/libraries/ProjectUtilities.php
+++ b/app/libraries/ProjectUtilities.php
@@ -131,8 +131,8 @@
$project = new Project();
$project->owner = $username;
$project->name = "Default Project";
- $project->description = "This is the default project for user " . $project->owner;
$project->gatewayId = Config::get('pga_config.airavata')['gateway-id'];
+ $project->description = "This is the default project for user " . $project->owner;
$projectId = null;
diff --git a/app/routes.php b/app/routes.php
index a574d21..cd0b20f 100644
--- a/app/routes.php
+++ b/app/routes.php
@@ -312,8 +312,6 @@
Route::post("admin/remove-pwd-token", "AdminController@removePWD");
-//GatewayProviders
-Route::get("provider/request-gateway", "AdminController@requestGateway");
//notices
Route::get("admin/dashboard/notices", "AdminController@noticesView");
@@ -331,8 +329,6 @@
Route::post("admin/add-gateway", "AdminController@addGateway");
Route::get("admin/add-gateway", "AdminController@addGateway");
-Route::get("admin/update-gateway-request", "AdminController@updateGatewayRequest");
-
/*
* Theme Pages Routes
*/
diff --git a/app/views/account/dashboard.blade.php b/app/views/account/dashboard.blade.php
index 917319b..58c2d69 100644
--- a/app/views/account/dashboard.blade.php
+++ b/app/views/account/dashboard.blade.php
@@ -22,74 +22,17 @@
@if( Session::has('new-gateway-provider') )
<div class="row">
<div class="col-md-offset-2 col-md-8">
- <form id="add-tenant-form" action="{{ URL::to('/') }}/provider/request-gateway">
+ <form id="add-tenant-form" action="{{ URL::to("/") }}/provider/add-gateway">
<div class="col-md-12 text-center" style="margin-top:50px;">
- <h3>Request your gateway now!</h3>
+ <h3>Register your gateway now!</h3>
+ <button type="button" class="btn btn-default toggle-add-tenant"><span
+ class="glyphicon glyphicon-plus"></span>Add a new gateway
+ </button>
</div>
- <div class="form-group required">
- <label class="control-label">Gateway Name</label>
- <input type="text" name="gateway-name" class="form-control" required="required"/>
- </div>
- <div class="form-group">
- <label class="control-label">Gateway Acronym <i>(optional)</i></label>
- <input type="text" name="gateway-acronym" class="form-control"/>
- </div>
- <div class="form-group required">
- <label class="control-label">Domain</label>
- <input type="text" name="domain" class="form-control"/>
- </div>
-
- <div class="form-group required">
- <label class="control-label">Gateway URL</label>
- <input type="text" name="gateway-url" class="form-control"/>
- </div>
- <div class="form-group required">
- <label class="control-label">Gateway Admin Username</label>
- <input type="text" name="admin-username" value="{{ Session::get('username') }}" readonly="true" class="form-control" required="required"/>
- </div>
- <div class="form-group required">
- <label class="control-label">Gateway Admin Password</label>
- <input type="password" name="admin-password" class="form-control" required="required"/>
- </div>
- <div class="form-group required">
- <label class="control-label">Admin Password Confirmation</label>
- <input type="password" name="admin-password-confirm" class="form-control" required="required"/>
- </div>
-
- <div class="form-group required">
- <label class="control-label">Admin First Name</label>
- <input type="text" name="admin-firstname" class="form-control" required="required"/>
- </div>
-
- <div class="form-group required">
- <label class="control-label">Admin Last Name</label>
- <input type="text" name="admin-lastname" class="form-control" required="required"/>
- </div>
- <div class="form-group required">
- <label class="control-label">Gateway Email</label>
- <input type="text" name="email-address" class="form-control" required="required"/>
- </div>
- <div class="form-group required">
- <label class="control-label">Project Details</label>
- <textarea type="text" name="project-details" class="form-control" required="required"></textarea>
- </div>
- <div class="form-group required">
- <label class="control-label">Public Project Description</label>
- <textarea type="text" name="public-project-description" class="form-control" required="required"></textarea>
- </div>
- <input type="submit" value="Send Request" class="btn btn-primary"/>
- <input type="reset" value="Reset" class="btn">
+ @include('partials/add-gateway-block', $userInfo)
</form>
</div>
</div>
- @elseif( Session::has("existing-gateway-provider") )
- @if( Session::get("approvalStatus") == "Requested")
- <blockquote>Gateway you have request is yet to be approved. Please log back in after sometime.</blockquote>
- @elseif( Session::get("approvalStatus") == "Denied")
- <div class="well alert alert-danger">Unfortunately, Your Request has been denied at this moment.</div>
- @else
- <blockquote>Download Credentials | Get Started with your PGA View</blockquote>
- @endif
@elseif( Session::has('authorized-user') || Session::has('admin') || Session::has('admin-read-only') )
<div class="row text-center breathing-space">
<h1>Let's get started!</h1>
@@ -314,6 +257,45 @@
$(".add-tenant").slideDown();
});
+ $("#add-tenant-form").submit(function (event) {
+ event.preventDefault();
+ event.stopPropagation();
+ var formData = $("#add-tenant-form").serialize();
+ $("#add-gateway-loading").modal("show");
+ $(".loading-gif").removeClass("hide");
+ $.ajax({
+ type: "POST",
+ data: formData,
+ url: '{{ URL::to("/") }}/admin/add-gateway',
+ success: function (data) {
+ if( data.gateway == $(".gatewayName").val() ){
+ $(".gateway-success").html("Gateway has been added. The page will be reloaded in a moment.").removeClass("hide");
+ setTimeout( function(){
+ location.reload();
+ }, 2000);
+ }
+ else if( data == 0){
+ $(".gateway-error").html( "An unknown error occurred while trying to create the gateway.")
+ .removeClass("hide");
+ }
+ else{
+ errors = data;
+ $(".gateway-error").html("").removeClass("hide");
+ for( input in data)
+ {
+ $(".gateway-error").append(" -- " + input + " : " + data[input] + "<br/><br/>");
+ }
+ }
+ },
+ error: function( data){
+ var error = $.parseJSON( data.responseText);
+ $(".gateway-error").html(error.error.message).removeClass("hide");
+ }
+ }).complete(function () {
+ $("#add-gateway-loading").modal("hide");
+ $(".loading-gif").addClass("hide");
+ });
+ });
</script>
@stop
\ No newline at end of file
diff --git a/app/views/admin/manage-gateway.blade.php b/app/views/admin/manage-gateway.blade.php
index 4198db3..3fb69da 100644
--- a/app/views/admin/manage-gateway.blade.php
+++ b/app/views/admin/manage-gateway.blade.php
@@ -62,44 +62,8 @@
@include('partials/add-gateway-block')
</form>
</div>
- <div class="row">
- <div class="col-md-12">
- <h3>Gateway Requests</h3>
- <table class="table table-striped table-bordered">
- <thead>
- <tr>
- <th>Gateway Name</th>
- <th>Admin Name</th>
- <th>Gateway URL</th>
- <th>Project Details</th>
- <th>Project Abstract</th>
- <th>Actions</th>
- </tr>
- </thead>
- <tbody>
- @foreach( $gateways as $indexGP => $gp )
- @if( $gp->gatewayApprovalStatus == 0)
- <tr>
- <td>{{$gp->gatewayName }}</td>
- <td>{{ $gp->gatewayAdminFirstName }} {{ $gp->gatewayAdminLastName }} </td>
- <td>{{ $gp->gatewayURL }}</td>
- <td>{{ $gp->reviewProposalDescription}}</td>
- <td>{{ $gp->gatewayPublicAbstract}}</td>
- <td>
- <a href="{{URL::to('/')}}/admin/update-gateway-request?gateway_id={{$gp->gatewayId}}&status=1"><input type="button" class="btn btn-primary" value="Approve"/></a>
- <a href="{{URL::to('/')}}/admin/update-gateway-request?gateway_id={{$gp->gatewayId}}&status=3"><input type="button" class="btn btn-danger" value="Deny"/></a>
- </td>
- </tr>
- @endif
- @endforeach
- <!-- foreach code ends -->
- </tbody>
- </table>
- </div>
- </div>
<div class="panel-group super-admin-gateways-view" id="accordion1">
- <h3>Approved Gateways</h3>
@foreach( $gateways as $indexGP => $gp )
@include('partials/gateway-preferences-block', array("gp" => $gp, "accName" => "accordion1"))
@endforeach
diff --git a/app/views/home.blade.php b/app/views/home.blade.php
index bcaf892..5f8cade 100755
--- a/app/views/home.blade.php
+++ b/app/views/home.blade.php
@@ -28,8 +28,8 @@
</p>
<p><a href="https://github.com/apache/airavata-php-gateway"
target="_blank">See the code <span class="glyphicon glyphicon-new-window"></span></a></p>
- <p><a href="https://cwiki.apache.org/confluence/display/AIRAVATA/XSEDE+2016+Tutorials"
- target="_blank">XSEDE 2016 tutorial documentation <span class="glyphicon glyphicon-new-window"></span></a>
+ <p><a href="https://cwiki.apache.org/confluence/display/AIRAVATA/XSEDE+2015+Tutorial"
+ target="_blank">XSEDE 2015 tutorial documentation <span class="glyphicon glyphicon-new-window"></span></a>
</p>
</div>
</div>