~ubuntu-branches/ubuntu/precise/boinc/precise

« back to all changes in this revision

Viewing changes to html/user/workunit.php

Tags: 6.12.8+dfsg-1
* New upstream release.
* Simplified debian/rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
require_once("../inc/boinc_db.inc");
23
23
require_once("../inc/result.inc");
24
24
 
 
25
BoincDb::get(true);
 
26
 
25
27
$wuid = get_int("wuid");
26
28
$wu = BoincWorkunit::lookup_id($wuid);
27
29
if (!$wu) {
28
 
    error_page("can't find workunit");
 
30
    error_page(tra("can't find workunit"));
29
31
}
30
32
 
31
 
page_head("Workunit details");
 
33
page_head(tra("Workunit %1", $wuid));
32
34
$app = BoincApp::lookup_id($wu->appid);
33
35
 
34
36
start_table();
35
 
row2("application", $app->user_friendly_name);
36
 
row2("created", time_str($wu->create_time));
37
 
row2("name", $wu->name);
 
37
row2(tra("name"), $wu->name);
 
38
row2(tra("application"), $app->user_friendly_name);
 
39
row2(tra("created"), time_str($wu->create_time));
38
40
if ($wu->canonical_resultid) {
39
 
    row2("canonical result",
 
41
    row2(tra("canonical result"),
40
42
        "<a href=result.php?resultid=$wu->canonical_resultid>$wu->canonical_resultid</a>"
41
43
    );
42
 
    row2("granted credit", format_credit($wu->canonical_credit));
 
44
    row2(tra("granted credit"), format_credit($wu->canonical_credit));
43
45
}
44
46
 
45
 
// if app is using adaptive replication and WU not assimilated yet,
 
47
// if app is using adaptive replication and no canonical result yet,
46
48
// don't show anything more
47
49
// (so that bad guys can't tell if they have an unreplicated job)
48
50
 
49
 
if ($app->target_nresults>0 && $wu->assimilate_state < 2) {
50
 
    row2("Tasks in progress", "suppressed pending completion");
 
51
if ($app->target_nresults>0 && !$wu->canonical_resultid) {
 
52
    row2(tra("Tasks in progress"), tra("suppressed pending completion"));
 
53
    end_table();
51
54
} else {
52
 
    row2("minimum quorum", $wu->min_quorum);
53
 
    row2("initial replication", $wu->target_nresults);
54
 
    row2("max # of error/total/success tasks",
 
55
    row2(tra("minimum quorum"), $wu->min_quorum);
 
56
    row2(tra("initial replication"), $wu->target_nresults);
 
57
    row2(tra("max # of error/total/success tasks"),
55
58
        "$wu->max_error_results, $wu->max_total_results, $wu->max_success_results"
56
59
    );
57
60
    if ($wu->error_mask) {
58
 
        row2("errors", wu_error_mask_str($wu->error_mask));
 
61
        row2(tra("errors"), wu_error_mask_str($wu->error_mask));
59
62
    }
60
63
    if ($wu->need_validate) {
61
 
        row2("validation", "Pending");
 
64
        row2(tra("validation"), tra("Pending"));
62
65
    }
63
66
    end_table();
64
67
    project_workunit($wu);
65
68
 
66
 
    result_table_start(false, true, true);
 
69
    result_table_start(false, true, null);
67
70
    $results = BoincResult::enum("workunitid=$wuid");
68
71
    $i = 0;
69
72
    foreach ($results as $result) {
70
 
        show_result_row($result, false, true, true, $i++);
 
73
        show_result_row($result, false, true, false, $i++);
71
74
    }
72
75
    echo "</table>\n";
73
76
}