You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2017/08/03 17:03:03 UTC
[12/50] airavata-php-gateway git commit: Resolving merge conflicts
Resolving merge conflicts
Project: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/commit/4ef56fe4
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/4ef56fe4
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/4ef56fe4
Branch: refs/heads/master
Commit: 4ef56fe4973a83c847438f4d722cba321f1e0b8b
Parents: a8a9c61 8fefd01
Author: Sneha Tilak <ti...@Snehas-MacBook-Pro.local>
Authored: Tue Jul 4 11:24:16 2017 -0500
Committer: Sneha Tilak <ti...@Snehas-MacBook-Pro.local>
Committed: Tue Jul 4 11:24:16 2017 -0500
----------------------------------------------------------------------
app/controllers/AccountController.php | 4 ++--
app/controllers/AdminController.php | 16 ++++++++++----
.../GatewayRequestUpdateController.php | 2 +-
app/libraries/AdminUtilities.php | 14 +++++++++++++
app/routes.php | 4 ++--
app/views/admin/manage-gateway.blade.php | 22 +++++++++++++++-----
6 files changed, 48 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/4ef56fe4/app/controllers/AdminController.php
----------------------------------------------------------------------
diff --cc app/controllers/AdminController.php
index 69e835a,24e5895..6b2ec4d
--- a/app/controllers/AdminController.php
+++ b/app/controllers/AdminController.php
@@@ -168,15 -168,20 +168,19 @@@ class AdminController extends BaseContr
}
}
- public function updateGatewayRequest(){
+ public function updateGateway(){
+ $gateway = TenantProfileService::getGateway( Session::get('authz-token'), Input::get("internal_gateway_id"));
$returnVal = AdminUtilities::update_gateway( Input::get("internal_gateway_id"), Input::except("oauthClientId","oauthClientSecret"));
if( Request::ajax()){
if( $returnVal == 1) {
- $username = Session::get("username");
$email = Config::get('pga_config.portal')['admin-emails'];
- $user_profile = Keycloak::getUserProfile($username);
- EmailUtilities::mailToUser($user_profile["firstname"], $user_profile["lastname"], $email, Input::get("gateway_id"));
- EmailUtilities::mailToAdmin($email, Input::get("gateway_id"));
+ EmailUtilities::gatewayUpdateMailToProvider($gateway->gatewayAdminFirstName, $gateway->gatewayAdminLastName, $gateway->emailAddress, Input::get("gateway_id"));
+ EmailUtilities::gatewayUpdateMailToAdmin($email, Input::get("gateway_id"));
+ if (isset($gatewayData["createTenant"]))
+ Session::put("successMessages", "Tenant has been created successfully!");
+ else
+ Session::put("successMessages", "Gateway has been updated successfully!");
return json_encode(AdminUtilities::get_gateway(Input::get("internal_gateway_id")));
}
else {
@@@ -185,13 -190,15 +189,13 @@@
}
else{
if( $returnVal) {
- $username = Session::get("username");
$email = Config::get('pga_config.portal')['admin-emails'];
- $user_profile = Keycloak::getUserProfile($username);
- EmailUtilities::mailToUser($user_profile["firstname"], $user_profile["lastname"], $email, Input::get("gateway_id"));
- EmailUtilities::mailToAdmin($email, Input::get("gateway_id"));
+ EmailUtilities::gatewayUpdateMailToProvider($gateway->gatewayAdminFirstName, $gateway->gatewayAdminLastName, $gateway->emailAddress, Input::get("gateway_id"));
+ EmailUtilities::gatewayUpdateMailToAdmin($email, Input::get("gateway_id"));
- Session::put("message", "Request has been updated");
+ Session::put("message", "Gateway has been updated successfully!");
}
else {
- Session::put("message", "An error has occurred while updating your request. Please make sure you've entered all the details correctly. Try again or contact admin to report the issue.");
+ Session::put("message", "An error has occurred while updating your Gateway. Please make sure you've entered all the details correctly. Try again or contact the Admin to report the issue.");
}
return Redirect::back();