public static function getAppDeploymentData()
 {
     $appDeployments = Airavata::getAllApplicationDeployments(Session::get('authz-token'), Session::get("gateway_id"));
     //var_dump( $appDeployments); exit;
     $computeResources = Airavata::getAllComputeResourceNames(Session::get('authz-token'));
     $modules = AppUtilities::getAllModules();
     $apt = new ApplicationParallelismType();
     return array("appDeployments" => $appDeployments, "applicationParallelismTypes" => $apt::$__names, "computeResources" => $computeResources, "modules" => $modules);
 }
echo '</div>';
$experiments = ProjectUtilities::get_experiments_in_project($project->projectID);
echo '<div class="table-responsive">';
echo '<table class="table">';
echo '<tr>';
echo '<th>Name</th>';
echo '<th>Application</th>';
echo '<th>Compute Resource</th>';
echo '<th>Last Modified Time</th>';
echo '<th>Experiment Status</th>';
echo '<th>Job Status</th>';
echo '</tr>';
foreach ($experiments as $experiment) {
    $expValues = ExperimentUtilities::get_experiment_values($experiment, ProjectUtilities::get_project($experiment->projectId), true);
    $expValues["jobState"] = ExperimentUtilities::get_job_status($experiment);
    $applicationInterface = AppUtilities::get_application_interface($experiment->executionId);
    echo '<tr>';
    echo '<td>' . $experiment->experimentName . '</td>';
    echo "<td>{$applicationInterface->applicationName}</td>";
    echo '<td>';
    try {
        $cr = CRUtilities::get_compute_resource($experiment->userConfigurationData->computationalResourceScheduling->resourceHostId);
        if (!empty($cr)) {
            echo $cr->hostName;
        }
    } catch (Exception $ex) {
        //Error while retrieving the CR
    }
    echo '</td>';
    echo '<td class="time" unix-time="' . $expValues["experimentTimeOfStateChange"] . '"></td>';
    echo '<td>';
 /**
  * Create a select input and populate it with applications options
  * @param null $id
  * @param bool $editable
  */
 public static function create_application_select($id = null, $editable = true)
 {
     $disabled = $editable ? '' : 'disabled';
     $applicationIds = AppUtilities::get_all_applications();
     uksort($applicationIds, 'strcasecmp');
     echo '<select class="form-control" name="application" id="application" required ' . $disabled . '>';
     if (count($applicationIds)) {
         foreach ((array) $applicationIds as $applicationId => $applicationName) {
             $selected = $applicationId == $id ? 'selected' : '';
             echo '<option value="' . $applicationId . '" ' . $selected . '>' . $applicationName . '</option>';
         }
     }
     echo '</select>';
 }
 public function deleteAppDeployment()
 {
     if (AppUtilities::deleteAppDeployment(Input::get("appDeploymentId"))) {
         $message = "Deployment has been deleted successfully!";
     } else {
         $message = "An error has occurred. Please report the issue.";
     }
     return Redirect::to("app/deployment")->with("message", $message);
 }