File: workunit.php

package info (click to toggle)
boinc 5.4.11-4%2Betch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 21,440 kB
  • ctags: 16,986
  • sloc: cpp: 70,682; ansic: 45,747; php: 35,513; xml: 10,487; sh: 9,324; python: 4,291; makefile: 1,958; asm: 1,258; perl: 914; sql: 395; csh: 126; pascal: 124
file content (48 lines) | stat: -rw-r--r-- 1,283 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
// show summary of a workunit

require_once("../inc/db.inc");
require_once("../inc/result.inc");

db_init();
$wuid = get_int("wuid");
$wu = lookup_wu($wuid);
if (!$wu) {
    error_page("can't find workunit");
}

page_head("Workunit");
$app = lookup_app($wu->appid);

start_table();
row2("application", $app->user_friendly_name);
row2("created", time_str($wu->create_time));
row2("name", $wu->name);
if ($wu->canonical_resultid) {
    row2("canonical result", "<a href=result.php?resultid=$wu->canonical_resultid>$wu->canonical_resultid</a>");
    row2("granted credit", format_credit($wu->canonical_credit));
}
row2("minimum quorum", $wu->min_quorum);
row2("initial replication", $wu->target_nresults);
row2("max # of error/total/success results",
    "$wu->max_error_results, $wu->max_total_results, $wu->max_success_results"
);
if ($wu->error_mask) {
    row2("errors", wu_error_mask_str($wu->error_mask));
}
if ($wu->need_validate) {
    row2("validation", "Pending");
}
end_table();
project_workunit($wu);

result_table_start(false, true, true);
$result = mysql_query("select * from result where workunitid=$wuid");
while ($res = mysql_fetch_object($result)) {
    show_result_row($res, false, true, true);
}
mysql_free_result($result);
echo "</table>\n";
page_tail();

?>