Sort users list of hosts by last rpc time received and add a

corresponding table column.  David's going
to clean this up to sort by any column.

svn path=/trunk/boinc/; revision=6708
This commit is contained in:
Bruce Allen 2005-07-21 06:57:40 +00:00
parent 9f5c3c3da8
commit 18799e34d0
3 changed files with 26 additions and 1 deletions

View File

@ -9305,3 +9305,14 @@ David 20 July 2005
html/user/
hosts_user.php
Bruce 21 July 2005
- Sort users list of hosts by last rpc time received and add a
corresponding table column. David's going
to clean this up to sort by any column.
html/
inc/
host.inc
user/
hosts_user.php

View File

@ -148,6 +148,7 @@ function user_host_table_start($private) {
<th>Total credit</th>
<th>CPU type</th>
<th>Operating system</th>
<th>Last contact</th>
</tr>
";
}
@ -207,6 +208,18 @@ function show_host_row($host, $i, $private, $show_owner) {
}
}
}
if (!$show_owner)
printf("
<td>%s</td>
<td>%s</td>
<td>%s <br> %s</td>
<td>%s <br> %s</td>
<td>%s</td>",
format_credit($host->expavg_credit), format_credit($host->total_credit),
$host->p_vendor, $host->p_model,
$host->os_name, $host->os_version, time_str($host->rpc_time)
);
else
printf("
<td>%s</td>
<td>%s</td>
@ -217,6 +230,7 @@ function show_host_row($host, $i, $private, $show_owner) {
$host->os_name, $host->os_version
);
//$nresults = host_nresults($host);
//echo "<td><a href=results.php?hostid=$host->id>$nresults</a></td>";
echo "</tr>\n";

View File

@ -40,7 +40,7 @@
$private = true;
}
$i = 1;
$result = mysql_query("select * from host where userid=$userid order by expavg_credit desc");
$result = mysql_query("select * from host where userid=$userid order by rpc_time desc");
while ($host = mysql_fetch_object($result)) {
show_host_row($host, $i, $private, false);
$i++;