2003-08-07 21:40:17 +00:00
|
|
|
<?php
|
2008-08-05 22:43:14 +00:00
|
|
|
// This file is part of BOINC.
|
|
|
|
// http://boinc.berkeley.edu
|
|
|
|
// Copyright (C) 2008 University of California
|
|
|
|
//
|
|
|
|
// BOINC is free software; you can redistribute it and/or modify it
|
|
|
|
// under the terms of the GNU Lesser General Public License
|
|
|
|
// as published by the Free Software Foundation,
|
|
|
|
// either version 3 of the License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// BOINC is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
// See the GNU Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Lesser General Public License
|
|
|
|
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
2007-11-12 22:28:17 +00:00
|
|
|
|
2005-02-19 08:06:53 +00:00
|
|
|
// show summary of a workunit
|
2003-08-07 21:40:17 +00:00
|
|
|
|
2008-06-11 16:49:56 +00:00
|
|
|
require_once("../inc/util.inc");
|
2007-11-12 22:28:17 +00:00
|
|
|
require_once("../inc/boinc_db.inc");
|
2005-02-19 08:06:53 +00:00
|
|
|
require_once("../inc/result.inc");
|
2003-08-07 21:40:17 +00:00
|
|
|
|
2005-02-19 08:06:53 +00:00
|
|
|
$wuid = get_int("wuid");
|
2007-11-12 22:28:17 +00:00
|
|
|
$wu = BoincWorkunit::lookup_id($wuid);
|
2005-02-19 08:06:53 +00:00
|
|
|
if (!$wu) {
|
2005-03-04 10:09:25 +00:00
|
|
|
error_page("can't find workunit");
|
2005-02-19 08:06:53 +00:00
|
|
|
}
|
2003-12-12 21:10:39 +00:00
|
|
|
|
2007-10-04 17:30:28 +00:00
|
|
|
page_head("Workunit details");
|
2007-11-12 22:28:17 +00:00
|
|
|
$app = BoincApp::lookup_id($wu->appid);
|
2003-08-07 21:40:17 +00:00
|
|
|
|
2005-02-19 08:06:53 +00:00
|
|
|
start_table();
|
|
|
|
row2("application", $app->user_friendly_name);
|
|
|
|
row2("created", time_str($wu->create_time));
|
|
|
|
row2("name", $wu->name);
|
|
|
|
if ($wu->canonical_resultid) {
|
2008-06-11 16:49:56 +00:00
|
|
|
row2("canonical result",
|
|
|
|
"<a href=result.php?resultid=$wu->canonical_resultid>$wu->canonical_resultid</a>"
|
|
|
|
);
|
2005-02-19 08:06:53 +00:00
|
|
|
row2("granted credit", format_credit($wu->canonical_credit));
|
|
|
|
}
|
|
|
|
|
2008-08-06 18:36:30 +00:00
|
|
|
// if app is using adaptive replication and WU not assimilated yet,
|
|
|
|
// don't show anything more
|
|
|
|
// (so that bad guys can't tell if they have an unreplicated job)
|
|
|
|
|
|
|
|
if ($app->target_nresults>0 && $wu->assimilate_state < 2) {
|
|
|
|
row2("Tasks in progress", "suppressed pending completion");
|
2008-12-08 19:39:19 +00:00
|
|
|
end_table();
|
2008-08-06 18:36:30 +00:00
|
|
|
} else {
|
|
|
|
row2("minimum quorum", $wu->min_quorum);
|
|
|
|
row2("initial replication", $wu->target_nresults);
|
|
|
|
row2("max # of error/total/success tasks",
|
|
|
|
"$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);
|
|
|
|
$results = BoincResult::enum("workunitid=$wuid");
|
2008-08-07 20:43:52 +00:00
|
|
|
$i = 0;
|
2008-08-06 18:36:30 +00:00
|
|
|
foreach ($results as $result) {
|
2008-08-07 20:43:52 +00:00
|
|
|
show_result_row($result, false, true, true, $i++);
|
2008-08-06 18:36:30 +00:00
|
|
|
}
|
|
|
|
echo "</table>\n";
|
2005-02-19 08:06:53 +00:00
|
|
|
}
|
2008-08-06 18:36:30 +00:00
|
|
|
|
2005-02-19 08:06:53 +00:00
|
|
|
page_tail();
|
2003-08-07 21:40:17 +00:00
|
|
|
|
|
|
|
?>
|