*** empty log message ***

svn path=/trunk/boinc/; revision=2578
This commit is contained in:
David Anderson 2003-10-27 17:49:05 +00:00
parent b08f15a1bd
commit 9be8585fc1
6 changed files with 66 additions and 46 deletions

View File

@ -7121,4 +7121,16 @@ David 27 Oct 2003
Oliver 27 Oct 2003
- Fixed efficiency bugs in starfield
api/
gutil.C,h
gutil.C,h
David 27 Oct 2003
- let users see list of all their results
- added db_dump to list of programs updated by update_project
html_user/
host.inc
results.php (new)
results_host.php (deleted)
user.inc
py/Boinc/
setup_project.py

View File

@ -80,7 +80,7 @@ function show_host($host, $private) {
$nresults = host_nresults($host);
$nresults_success = host_nresults_success($host);
$nresults_valid = host_nresults_valid($host);
$results = "$nresults_valid valid / $nresults_success successful / <a href=results_host.php?hostid=$host->id>$nresults</a> total";
$results = "$nresults_valid valid / $nresults_success successful / <a href=results.php?hostid=$host->id>$nresults</a> total";
if ($last_result) {
$time_last_result = time_str($last_result->received_time);
$results .= "<br>Last received: $time_last_result";
@ -188,7 +188,7 @@ function show_host_row($host, $i, $private) {
$nresults = host_nresults($host);
$nresults_success = host_nresults_success($host);
$nresults_valid = host_nresults_valid($host);
echo "<td>$nresults_valid / $nresults_success / <a href=results_host.php?hostid=$host->id>$nresults</a>";
echo "<td>$nresults_valid / $nresults_success / <a href=results.php?hostid=$host->id>$nresults</a>";
if ($last_result) {
$date_last_result = date_str($last_result->received_time);
echo " [$date_last_result]";

42
html/user/results.php Normal file
View File

@ -0,0 +1,42 @@
<?php
// show recent results for a host or user
require_once("db.inc");
require_once("util.inc");
require_once("result.inc");
$results_per_page = 20;
db_init();
$hostid = $_GET["hostid"];
$userid = $_GET["userid"];
$offset = $_GET["offset"];
if (!$offset) $offset=0;
if ($hostid) {
$type = "host";
$clause = "hostid=$hostid";
} else {
$type = "user";
$clause = "userid=$userid";
}
page_head("Results for $type");
echo "<h3>Results for $type</h3>\n";
result_table_start(true, false);
$i = 1;
$query = "select * from result where $clause order by id desc limit $results_per_page offset $offset";
$result = mysql_query($query);
while ($res = mysql_fetch_object($result)) {
show_result_row($res, true, false);
$i++;
}
mysql_free_result($result);
echo "</table>\n";
if ($i > $results_per_page) {
$offset = $offset+$results_per_page;
echo "
<br><center><a href=results.php?$clause&offset=$offset>Next $results_per_page results</a></center>
";
}
page_tail();
?>

View File

@ -1,33 +0,0 @@
<?php
// show recent results for a host
require_once("db.inc");
require_once("util.inc");
require_once("result.inc");
$results_per_page = 20;
db_init();
$hostid = $_GET["hostid"];
$offset = $_GET["offset"];
if (!$offset) $offset=0;
page_head("Results for host");
echo "<h3>Results for host</h3>\n";
result_table_start(true, false);
$i = 1;
$result = mysql_query("select * from result where hostid=$hostid order by id desc limit $results_per_page offset $offset");
while ($res = mysql_fetch_object($result)) {
show_result_row($res, true, false);
$i++;
}
mysql_free_result($result);
echo "</table>\n";
if ($i > $results_per_page) {
$offset = $offset+$results_per_page;
echo "
<br><center><a href=results_host.php?hostid=$hostid&offset=$offset>Next $results_per_page results</a></center>
";
}
page_tail();
?>

View File

@ -3,12 +3,11 @@
// show dynamic user info (private)
//
function show_user_stats_private($user) {
row1("Your account statistics");
row1("Account statistics");
row2(PROJECT." member since", time_str($user->create_time));
row2("Total credit", format_credit($user->total_credit));
row2("Recent average credit", format_credit($user->expavg_credit));
$team_header = "Team<br>
<font size=-1><a href=team.php>Change</a></font>";
$team_header = "Team<br><font size=-2><a href=team.php>Change</a></font>";
if ($user->teamid) {
$result = mysql_query("select * from team where id = $user->teamid");
$team = mysql_fetch_object($result);
@ -17,6 +16,7 @@ function show_user_stats_private($user) {
row2($team_header, "None");
}
row2("Computers", "<a href=hosts_user.php>View</a>");
row2("Results", "<a href=results.php?userid=$user->id>View</a>");
}
// show static user info (private)
@ -28,9 +28,9 @@ function show_user_profile_private($user) {
$email_text = "Verification pending";
}
row1("Your account information");
row1("Account information");
row2("Email address<br>
<font size=-1><a href=edit_email_form.php>Edit</a></font>",
<font size=-2><a href=edit_email_form.php>Edit</a></font>",
$email_text
);
row2("Name", $user->name);
@ -39,7 +39,7 @@ function show_user_profile_private($user) {
row2("Postal code", $user->postal_code);
row2("", "<a href=edit_user_info_form.php>Edit account info</a>");
row1("Your profile");
row1("Profile");
$sql = "SELECT * FROM profile WHERE userid = ".$user->id;
$result = mysql_query($sql);
@ -50,7 +50,7 @@ function show_user_profile_private($user) {
row2("", "<a href=create_profile.php>Create</a>");
}
row1("Your preferences");
row1("Preferences");
row2("General", "<a href=prefs.php?subset=global>View / Edit</a>");
row2(PROJECT, "<a href=prefs.php?subset=project>View / Edit</a>");
}

View File

@ -273,10 +273,9 @@ def install_boinc_files(dest_dir):
[ 'cgi', 'file_upload_handler'])
map(lambda (s): install(builddir('sched',s), dir('bin',s)),
[ 'make_work', 'feeder', 'transitioner', 'validate_test',
'file_deleter', 'assimilator' ])
'file_deleter', 'assimilator', 'db_dump' ])
map(lambda (s): install(srcdir('sched',s), dir('bin',s)),
[ 'start', 'stop', 'status',
'grep_logs' ])
[ 'start', 'stop', 'status', 'grep_logs' ])
map(lambda (s): install(srcdir('tools',s), dir('bin',s)),
[ 'boinc_path_config.py', 'add', 'dbcheck_files_exist', 'update_versions',
'upgrade' ])