echo "Time: <input type=text size=20 name=\"start_time\" value=\"{$start_time}\"><br>"; echo "Hares: <input type=text size=50 maxlength=50 name=\"hares\" value=\"{$hares}\"><br>"; echo "Location: <input type=text size=60 maxlength=500 name=\"location\" value=\"{$location}\"><br>"; echo "On On: <input type=text size=60 maxlength=500 name=\"On_On_location\" value=\"{$On_On_location}\"><br>"; echo "Comments: <input type=text size=60 maxlength=500 name=\"comments\" value=\"{$comments}\"><br>"; echo "Directions: <input type=text size=60 maxlength=500 name=\"directions\" value=\"{$directions}\"><br>"; echo "Map: <input type=text size=60 maxlength=500 name=\"run_map\" value=\"{$run_map}\"><br>"; echo "Hash: <input type=text size=12 maxlength=50 name=\"hash\" value=\"{$Hash}\"><br>"; echo "<br>"; echo "<input type=\"Submit\" name=\"function\" value=\"update\">"; echo "<input type=\"Submit\" name=\"function\" value=\"delete\">"; echo "<input type=\"Reset\" value=\"cancel\">"; print '</form>'; echo "</pre>"; mysql_close(); mysql_free_result($result); } /* * Now this is where the program actually starts. First we see if we were called with a * run number and what we're supposed to do (ie function value) */ $function = $_POST['function']; $run = $_POST['run']; if (!$function) { show_run(); } elseif ($function == "delete") { delete_run(); } elseif ($function = "update") { update_run(); } include 'sfh3_footer.html';
} $removed_builds = $db->query_and_get_affected_rows('DELETE FROM builds WHERE build_id = $1', array($build_id)); if (!$removed_runs || count($removed_runs) != 1) { $db->rollback_transaction(); return notice("Failed to delete the build {$build_id}."); } $db->commit_transaction(); regenerate_manifest(); } 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) {