當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Utilities::get_experiment_values方法代碼示例

本文整理匯總了PHP中Utilities::get_experiment_values方法的典型用法代碼示例。如果您正苦於以下問題:PHP Utilities::get_experiment_values方法的具體用法?PHP Utilities::get_experiment_values怎麽用?PHP Utilities::get_experiment_values使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Utilities的用法示例。


在下文中一共展示了Utilities::get_experiment_values方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: editView

 public function editView()
 {
     $app_config = Utilities::read_config();
     $queueDefaults = array("queueName" => $app_config["queue-name"], "nodeCount" => $app_config["node-count"], "cpuCount" => $app_config["total-cpu-count"], "wallTimeLimit" => $app_config["wall-time-limit"]);
     $experiment = Utilities::get_experiment($_GET['expId']);
     $project = Utilities::get_project($experiment->projectID);
     $expVal = Utilities::get_experiment_values($experiment, $project);
     //var_dump( $expVal); exit;
     $computeResources = Utilities::create_compute_resources_select($experiment->applicationId, $expVal['scheduling']->resourceHostId);
     $experimentInputs = array("disabled" => ' ', "experimentName" => $experiment->name, "experimentDescription" => $experiment->description, "application" => $experiment->applicationId, "allowedFileSize" => $app_config["server-allowed-file-size"], 'experiment' => $experiment, "queueDefaults" => $queueDefaults, 'project' => $project, 'expVal' => $expVal, 'cloning' => true, 'advancedOptions' => $app_config["advanced-experiment-options"], 'computeResources' => $computeResources, "resourceHostId" => $expVal['scheduling']->resourceHostId, 'project' => $project, 'expVal' => $expVal, 'cloning' => true, 'advancedOptions' => $app_config["advanced-experiment-options"]);
     return View::make("experiment/edit", array("expInputs" => $experimentInputs));
 }
開發者ID:sanyaade-iot,項目名稱:airavata-php-gateway,代碼行數:12,代碼來源:ExperimentController.php

示例2: get_all_user_experiments_with_pagination

    /**
     * Get results of the user's all experiments with pagination.
     * Results are ordered creation time DESC
     * @return array|null
     */
    public static function get_all_user_experiments_with_pagination($limit, $offset)
    {
        $experiments = array();

        try
        {
            $experiments = Airavata::getAllUserExperimentsWithPagination(
                Session::get('gateway_id'), Session::get('username'), $limit, $offset
            );
        }
        catch (InvalidRequestException $ire)
        {
            Utilities::print_error_message('InvalidRequestException!<br><br>' . $ire->getMessage());
        }
        catch (AiravataClientException $ace)
        {
            Utilities::print_error_message('AiravataClientException!<br><br>' . $ace->getMessage());
        }
        catch (AiravataSystemException $ase)
        {
            if ($ase->airavataErrorType == 2) // 2 = INTERNAL_ERROR
            {
                Utilities::print_info_message('<p>You have not created any experiments yet, so no results will be returned!</p>
                                <p>Click <a href="create_experiment.php">here</a> to create an experiment, or
                                <a href="create_project.php">here</a> to create a new project.</p>');
            }
            else
            {
                Utilities::print_error_message('There was a problem with Airavata. Please try again later or report a bug using the link in the Help menu.');
                //print_error_message('AiravataSystemException!<br><br>' . $ase->airavataErrorType . ': ' . $ase->getMessage());
            }
        }
        catch (TTransportException $tte)
        {
            Utilities::print_error_message('TTransportException!<br><br>' . $tte->getMessage());
        }

        //get values of all experiments
        $expContainer = array();
        $expNum = 0;
        foreach( $experiments as $experiment)
        {
            $expValue = Utilities::get_experiment_values( $experiment, Utilities::get_project($experiment->projectID), true );
            $expContainer[$expNum]['experiment'] = $experiment;
            if( $expValue["experimentStatusString"] == "FAILED")
                $expValue["editable"] = false;
            $expContainer[$expNum]['expValue'] = $expValue;
            $expNum++;
        }

        return $expContainer;
    }
開發者ID:sanyaade-iot,項目名稱:airavata-php-gateway,代碼行數:57,代碼來源:Utilities.php

示例3: get_expsearch_results

/**
 * Get results of the user's search of experiments
 * @return array|null
 */
public static function get_expsearch_results( $inputs)
{
    $experiments = array();

    try
    {
        switch ( $inputs["search-key"])
        {
            case 'experiment-name':
                $experiments = Airavata::searchExperimentsByName(Session::get('gateway_id'), Session::get('username'), $inputs["search-value"]);
                break;
            case 'experiment-description':
                $experiments = Airavata::searchExperimentsByDesc(Session::get('gateway_id'), Session::get('username'), $inputs["search-value"]);
                break;
            case 'application':
                $experiments = Airavata::searchExperimentsByApplication(Session::get('gateway_id'), Session::get('username'), $inputs["search-value"]);
                break;
            case 'creation-time':
                $experiments = Airavata::searchExperimentsByCreationTime(Session::get('gateway_id'), Session::get('username'), strtotime( $inputs["from-date"])*1000, strtotime( $inputs["to-date"])*1000 );
                break;
            case '':
        }
    }
    catch (InvalidRequestException $ire)
    {
        Utilities::print_error_message('InvalidRequestException!<br><br>' . $ire->getMessage());
    }
    catch (AiravataClientException $ace)
    {
        Utilities::print_error_message('AiravataClientException!<br><br>' . $ace->getMessage());
    }
    catch (AiravataSystemException $ase)
    {
        if ($ase->airavataErrorType == 2) // 2 = INTERNAL_ERROR
        {
            Utilities::print_info_message('<p>You have not created any experiments yet, so no results will be returned!</p>
                                <p>Click <a href="create_experiment.php">here</a> to create an experiment, or
                                <a href="create_project.php">here</a> to create a new project.</p>');
        }
        else
        {
            Utilities::print_error_message('There was a problem with Airavata. Please try again later or report a bug using the link in the Help menu.');
            //print_error_message('AiravataSystemException!<br><br>' . $ase->airavataErrorType . ': ' . $ase->getMessage());
        }
    }
    catch (TTransportException $tte)
    {
        Utilities::print_error_message('TTransportException!<br><br>' . $tte->getMessage());
    }

    //get values of all experiments
    $expContainer = array();
    $expNum = 0;
    foreach( $experiments as $experiment)
    {
        $expValue = Utilities::get_experiment_values( $experiment, Utilities::get_project($experiment->projectID), true );
        $expContainer[$expNum]['experiment'] = $experiment;
        if( $expValue["experimentStatusString"] == "FAILED")
            $expValue["editable"] = false;
        $expContainer[$expNum]['expValue'] = $expValue;
        $expNum++;
    }

    return $expContainer;
}
開發者ID:sanyaade-iot,項目名稱:airavata-php-gateway,代碼行數:69,代碼來源:ExpUtilities.php

示例4: foreach

    echo '<div class="table-responsive">';
    echo '<table class="table">';

    echo '<tr>';

    echo '<th>Name</th>';
    echo '<th>Application</th>';
    echo '<th>Time</th>';
    echo '<th>Status</th>';

    echo '</tr>';

    foreach ($experiments as $experiment)
    {
    	$expValues = Utilities::get_experiment_values( $experiment, Utilities::get_project($experiment->projectID), true );
        $applicationInterface = Utilities::get_application_interface($experiment->applicationId);

        echo '<tr>';

        echo '<td>';


        switch ($expValues["experimentStatusString"])
        {
            case 'SCHEDULED':
            case 'LAUNCHED':
            case 'EXECUTING':
            case 'CANCELING':
            case 'COMPLETED':
                echo $experiment->name;
開發者ID:sanyaade-iot,項目名稱:airavata-php-gateway,代碼行數:30,代碼來源:summary.blade.php


注:本文中的Utilities::get_experiment_values方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。