示例#1
0
    }
}
if ($db) {
    $aggregators = array();
    if ($aggregators_table = $db->fetch_table('aggregators')) {
        foreach ($aggregators_table as $aggregator_row) {
            $aggregators[$aggregator_row['aggregator_id']] = $aggregator_row['aggregator_name'];
        }
    }
    $triggerables = array();
    if ($triggerable_table = $db->fetch_table('build_triggerables', 'triggerable_name')) {
        foreach ($triggerable_table as $triggerable_row) {
            $triggerables[$triggerable_row['triggerable_id']] = $triggerable_row;
        }
    }
    $test_name_resolver = new TestNameResolver($db);
    if ($test_name_resolver->tests()) {
        $name_to_platform = array();
        foreach ($db->fetch_table('platforms') as $platform) {
            $name_to_platform[$platform['platform_name']] = $platform;
        }
        $platform_names = array_keys($name_to_platform);
        asort($platform_names);
        $odd = false;
        $selected_parent_full_name = trim(array_get($_SERVER, 'PATH_INFO', ''), '/');
        $selected_parent = $test_name_resolver->test_id_for_full_name($selected_parent_full_name);
        if ($selected_parent) {
            echo '<h2>' . htmlspecialchars($selected_parent_full_name) . '</h2>';
        }
        ?>
<table>
示例#2
0
}
if ($db) {
    date_default_timezone_set('Etc/UTC');
    if ($action == 'add-run' && array_get($_POST, 'metric') && array_get($_POST, 'platform') && array_get($_POST, 'config-type') && array_get($_POST, 'date') && array_get($_POST, 'mean')) {
        add_run(intval($_POST['metric']), intval($_POST['platform']), $_POST['config-type'], $_POST['date'], floatval($_POST['mean']));
    } else {
        if ($action == 'delete-run' && array_get($_POST, 'run') && array_get($_POST, 'build')) {
            delete_run(intval($_POST['run']), intval($_POST['build']));
        } else {
            if ($action) {
                notice("Invalid arguments");
            }
        }
    }
    $metric_id = intval(array_get($_GET, 'metric'));
    $test_name_resolver = new TestNameResolver($db);
    $full_metric_name = $test_name_resolver->full_name_for_metric($metric_id);
    echo "<h2>{$full_metric_name}</h2>";
    $page = new AdministrativePage($db, 'platforms', 'platform', array('name' => array('label' => 'Platform Name'), 'Configurations' => array('subcolumns' => array('ID', 'Type'), 'custom' => function ($platform_row) {
        return generate_rows_for_configurations($platform_row['platform_id']);
    }), 'Baseline Test Runs' => array('subcolumns' => array('Run ID', 'Build ID', 'Time', 'Mean', 'Actions'), 'custom' => function ($platform_row) {
        return generate_rows_for_test_runs($platform_row['platform_id'], 'baseline');
    }), 'Target Test Runs' => array('subcolumns' => array('Run ID', 'Build ID', 'Time', 'Mean', 'Actions'), 'custom' => function ($platform_row) {
        return generate_rows_for_test_runs($platform_row['platform_id'], 'target');
    })));
    function generate_rows_for_configurations($platform_id)
    {
        global $test_name_resolver;
        global $metric_id;
        $rows = array();
        if ($configurations = $test_name_resolver->configurations_for_metric_and_platform($metric_id, $platform_id)) {
示例#3
0
文件: tests.php 项目: fka2004/webkit
                    regenerate_manifest();
                } else {
                    notice('Invalid parameters');
                }
            }
        }
    }
}
if ($db) {
    $aggregators = array();
    if ($aggregators_table = $db->fetch_table('aggregators')) {
        foreach ($aggregators_table as $aggregator_row) {
            $aggregators[$aggregator_row['aggregator_id']] = $aggregator_row['aggregator_name'];
        }
    }
    $test_name_resolver = new TestNameResolver($db);
    if ($test_name_resolver->tests()) {
        $name_to_platform = array();
        foreach ($db->fetch_table('platforms') as $platform) {
            $name_to_platform[$platform['platform_name']] = $platform;
        }
        $platform_names = array_keys($name_to_platform);
        asort($platform_names);
        $odd = false;
        $selected_parent_full_name = trim(array_get($_SERVER, 'PATH_INFO', ''), '/');
        $selected_parent = $test_name_resolver->test_id_for_full_name($selected_parent_full_name);
        if ($selected_parent) {
            echo '<h2>' . htmlspecialchars($selected_parent_full_name) . '</h2>';
        }
        ?>
<table>