Skip to content
Permalink
Browse files
merging changes from develop
  • Loading branch information
smarru committed Dec 4, 2015
2 parents 5720922 + 93eb29d commit 6f6aae0fd914a3d4a145f3b6d3b8f4ba90e54011
Show file tree
Hide file tree
Showing 42 changed files with 7,804 additions and 3,400 deletions.
@@ -124,6 +124,7 @@
'Wsis\WsisServiceProvider',
'Airavata\AiravataServiceProvider',
'Teepluss\Theme\ThemeServiceProvider',
'GrahamCampbell\Markdown\MarkdownServiceProvider',
),

/*
@@ -193,6 +194,7 @@
'WSIS' => 'Wsis\Facades\Wsis',
'Airavata' => 'Airavata\Facades\Airavata',
'Theme' => 'Teepluss\Theme\Facades\Theme',
'Markdown' => 'GrahamCampbell\Markdown\Facades\Markdown',
),

);
@@ -0,0 +1,30 @@
<?php

/*
* This file is part of Laravel Markdown.
*
* (c) Graham Campbell <graham@mineuk.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

return [

/*
|--------------------------------------------------------------------------
| Enable The Engines
|--------------------------------------------------------------------------
|
| This option specifies if the view engines are enabled so you can write
| markdown views and have them compiled into html. The following extensions
| are currently supported: ".md", ".md.php", and ".md.blade.php". You may
| disable the engines if they are conflicting with another package.
|
| Default: true
|
*/

'engines' => true,

];
@@ -132,7 +132,7 @@ public function loginSubmit()
if(Session::get("admin") || Session::get("admin-read-only") || Session::get("authorized-user")){
return $this->initializeWithAiravata($username);
}
return Redirect::to("home");
return View::make("account/dashboard");
}

}
@@ -203,7 +203,7 @@ private function initializeWithAiravata($username){
return View::make('home');
}

return Redirect::to("home");
return View::make("account/dashboard");
}

public function forgotPassword()
@@ -8,28 +8,30 @@ public function __construct()
Session::put("nav-active", "user-console");
}

public function console(){
return View::make("admin/dashboard");
}

public function dashboard(){
//only for super admin
//Session::put("scigap_admin", true);

$crData = CRUtilities::getEditCRData();
$gateways = CRUtilities::getAllGatewayProfilesData();

$gatewayData = array(
"gateways" => $gateways,
"computeResources" => CRUtilities::getAllCRObjects(),
"crData" => $crData);
if( Session::has("scigap_admin"))
{
$crData = CRUtilities::getEditCRData();
$gateways = CRUtilities::getAllGatewayProfilesData();

$gatewayData = array(
"gateways" => $gateways,
"computeResources" => CRUtilities::getAllCRObjects(),
"crData" => $crData
);

$view = "scigap-admin/manage-gateway";
else{
$view = "admin/manage-gateway";

Session::put("admin-nav", "gateway-prefs");
}
return View::make( $view, $gatewayData);
}
else{
return View::make("account/dashboard");

}
}

public function addAdminSubmit(){
@@ -70,6 +72,31 @@ public function searchUsersView(){

}

public function gatewayView(){
//only for super admin
//Session::put("scigap_admin", true);
$crData = CRUtilities::getEditCRData();
$gateways = CRUtilities::getAllGatewayProfilesData();
$tokens = AdminUtilities::get_ssh_tokens();

//$dsData = CRUtilities::getAllDataStoragePreferences( $gateways);
$gatewayData = array(
"gateways" => $gateways,
"computeResources" => CRUtilities::getAllCRObjects(),
"crData" => $crData,
"tokens" => $tokens
);
//var_dump( $gateways); exit;
if( Session::has("scigap_admin"))
$view = "scigap-admin/manage-gateway";
else{
$view = "admin/manage-gateway";
}

Session::put("admin-nav", "gateway-prefs");
return View::make( $view, $gatewayData);
}

public function addGatewayAdminSubmit(){
//check if username exists
if(WSIS::usernameExists( Input::get("username")) )
@@ -146,7 +173,9 @@ public function deleteRole(){

public function credentialStoreView(){
Session::put("admin-nav", "credential-store");
return View::make("admin/manage-credentials", array("tokens" => array()) );
$tokens = AdminUtilities::get_ssh_tokens();
//var_dump( $tokens); exit;
return View::make("admin/manage-credentials", array("tokens" => $tokens ) );
}

public function updateUserRoles(){
@@ -188,8 +217,11 @@ public function getExperimentsOfTimeRange()
$inputs = Input::all();
$expContainer = AdminUtilities::get_experiments_of_time_range($inputs);
$expStates = ExperimentUtilities::getExpStates();
return View::make("partials/experiment-container", array("expContainer" => $expContainer,
"expStates" => $expStates));
return View::make("partials/experiment-container",
array( "expContainer" => $expContainer,
"expStates" => $expStates,
"dashboard" => true
));
}
}

@@ -206,4 +238,9 @@ public function disableComputeResource(){
$computeResource->enabled = false;
CRUtilities::register_or_update_compute_resource($computeResource, true);
}

public function createSSH(){
return AdminUtilities::create_ssh_token();
}

}
@@ -79,35 +79,37 @@ public function createSubmit()

public function summary()
{
if (Input::has("dashboard"))
$experiment = ExperimentUtilities::get_detailed_experiment_tree($_GET['expId']);
else
$experiment = ExperimentUtilities::get_experiment( $_GET['expId']);

$experiment = ExperimentUtilities::get_experiment($_GET['expId']);
//var_dump( $detailedExperiment); exit;
if ($experiment != null) {
$project = ProjectUtilities::get_project($experiment->projectId);
$expVal = ExperimentUtilities::get_experiment_values($experiment, $project);
$jobDetails = ExperimentUtilities::get_job_details($experiment->experimentId);
if(isset($jobDetails[0]->jobStatus)){
$expVal["jobState"] = JobState::$__names[$jobDetails[0]->jobStatus->jobState];
}else{
$expVal["jobState"] = "";
//var_dump( $jobDetails); exit;
foreach( $jobDetails as $index => $jobDetail){
if(isset($jobDetail->jobStatus)){
$jobDetails[ $index]->jobStatus->jobStateName = JobState::$__names[$jobDetail->jobStatus->jobState];
}
else{
$jobDetails[ $index]->jobStatus = new stdClass();
$jobDetails[ $index]->jobStatus->jobStateName = null;
}
}
// User should not clone or edit a failed experiment. Only create clones of it.
if ($expVal["experimentStatusString"] == "FAILED")
$expVal["editable"] = false;

$expVal["cancelable"] = false;
if ($expVal["experimentStatusString"] == "LAUNCHED" || $expVal["experimentStatusString"] == "EXECUTING")
$expVal["cancelable"] = true;
$expVal["jobDetails"] = $jobDetails;


$data = array(
"expId" => Input::get("expId"),
"experiment" => $experiment,
"project" => $project,
"jobDetails" => $jobDetails,
"expVal" => $expVal
);
if( Input::has("dashboard"))
{
$detailedExperiment = ExperimentUtilities::get_detailed_experiment( $_GET['expId']);
$data["detailedExperiment"] = $detailedExperiment;
}

if (Request::ajax()) {
//admin wants to see an experiment summary
@@ -29,13 +29,11 @@ public function editGP()

public function browseView()
{
$crObjects = CRUtilities::getAllCRObjects();
$crData = CRUtilities::getEditCRData();
//var_dump( $crObjects[0]); exit;
return View::make("gateway/browse", array( "gatewayProfiles" => CRUtilities::getAllGatewayProfilesData(),
"computeResources" => CRUtilities::getAllCRObjects(),
"crData" => CRUtilities::getEditCRData()
));
));
}

public function modifyCRP()
@@ -84,7 +82,6 @@ public function cstChange(){
else
return "An error has occurred. Please try again later or report a bug using the link in the Help menu";
}

}

?>

0 comments on commit 6f6aae0

Please sign in to comment.