diff --git a/checkin_notes b/checkin_notes
index 2802c75b4e..8e5e790a30 100644
--- a/checkin_notes
+++ b/checkin_notes
@@ -1224,3 +1224,15 @@ David 5 Feb 2009
inc/
stats_sites.inc
team.inc
+
+David 5 Feb 2009
+ - web: add links to cross-project host stats sites
+ (currently just boincstats)
+
+ html/
+ inc/
+ hosts.inc
+ stats_sites.inc
+ util.inc
+ user/
+ hosts_user.php
diff --git a/html/inc/host.inc b/html/inc/host.inc
index ce2d2c56cb..c04e58d123 100644
--- a/html/inc/host.inc
+++ b/html/inc/host.inc
@@ -17,6 +17,7 @@
// along with BOINC. If not, see .
require_once("../inc/credit.inc");
+require_once("../inc/stats_sites.inc");
require_once("../inc/boinc_db.inc");
function link_to_results($host) {
@@ -61,6 +62,18 @@ function location_form($host) {
return $x;
}
+function cross_project_links($host) {
+ global $host_sites;
+ $x = "";
+ shuffle($host_sites);
+ foreach ($host_sites as $h) {
+ $url = $h[0];
+ $name = $h[1];
+ $x .= "host_cpid.">$name
\n";
+ }
+ return $x;
+}
+
// Show full-page description of $host.
// If $user is non-null, it's both the owner of the host
// and the logged in user (so show some extra fields)
@@ -91,8 +104,9 @@ function show_host($host, $user, $ipprivate) {
}
}
row2("Created", time_str($host->create_time));
- row2("Total Credit", format_credit_large($host->total_credit));
- row2("Avg. credit", format_credit($host->expavg_credit));
+ row2("Total credit", format_credit_large($host->total_credit));
+ row2("Average credit", format_credit($host->expavg_credit));
+ row2("Cross project credit", cross_project_links($x));
row2("CPU type", "$host->p_vendor
$host->p_model");
row2("Number of processors", $host->p_ncpus);
if ($host->serialnum) {
@@ -184,7 +198,7 @@ function show_host($host, $user, $ipprivate) {
function top_host_table_start($sort_by) {
start_table();
echo "
";
- echo "Computer ID Click for more info | \n";
+ echo "Computer ID | \n";
echo "Rank | ";
echo "Owner | \n";
if ($sort_by == 'total_credit') {
@@ -235,8 +249,9 @@ function cpu_desc($host) {
function show_host_row($host, $i, $private, $show_owner) {
$j = $i % 2;
echo "
- id>$host->id
- | id>tasks
+ &bull id>Details
+ &bull id>Tasks
+ &bull Cross-project credit: ".cross_project_links($host)."
|
";
if ($private) {
@@ -466,8 +481,7 @@ function merge_hosts($old_host, $new_host) {
// update the database:
// - add credit from old to new host
// - change results to refer to new host
- // - put old host in "zombie" state
- // - update rpc_seqno if needed
+ // - put old host in "zombie" state (userid=0, rpc_seqno=new host ID)
//
$total_credit = $old_host->total_credit + $new_host->total_credit;
$recent_credit = $old_host->expavg_credit + $new_host->expavg_credit;
diff --git a/html/inc/stats_sites.inc b/html/inc/stats_sites.inc
index c2d6731e5d..6647e6a2f6 100644
--- a/html/inc/stats_sites.inc
+++ b/html/inc/stats_sites.inc
@@ -167,6 +167,12 @@ $team_name_sites = array(
),
);
+$host_sites = array(
+ array("http://boincstats.com/stats/boinc_host_graph.php?pr=bo&id=",
+ "BOINCstats.com"
+ ),
+);
+
function site_list($sites) {
echo "\n";
for ($i=0; $iid)";
}
- $x = "";
+ $x = "";
if ($user->has_profile) {
$img_url = URL_BASE."img/head_20.png";
$x .= ' ';
@@ -503,6 +503,7 @@ function user_links($user) {
require_once("../project/donations.inc");
$x .= DONATION_LINK;
}
+ $x .= "";
return $x;
}
diff --git a/html/user/hosts_user.php b/html/user/hosts_user.php
index cd7f6fb330..1e5baaf397 100644
--- a/html/user/hosts_user.php
+++ b/html/user/hosts_user.php
@@ -53,7 +53,7 @@ function user_host_table_start($private, $sort, $rev, $show_all) {
start_table();
echo "";
$url = link_url_rev($sort, "id", $rev, $show_all);
- echo "Computer ID Click for more info | \n";
+ echo "Computer ID | \n";
if ($private) {
$url = link_url_rev($sort, "name", $rev, $show_all);
echo "Name | \n";