mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=1989
This commit is contained in:
parent
db60d36842
commit
c62d6e28e6
|
@ -452,6 +452,23 @@ function client_version_string($client_version_num) {
|
|||
}
|
||||
}
|
||||
|
||||
function host_user_link($hostid)
|
||||
{
|
||||
if (!$hostid) return '----';
|
||||
|
||||
$h = "<a href=db_action.php?table=host&id=$hostid>$hostid</a>";
|
||||
$result = mysql_query("select userid from host where id='$hostid' limit 1");
|
||||
if (!$result) return $h;
|
||||
$host = mysql_fetch_object($result);
|
||||
mysql_free_result($result);
|
||||
if (!$host->userid) return $h;
|
||||
$result = mysql_query("select * from user where id='$host->userid' limit 1");
|
||||
if (!$result) return $h;
|
||||
$user = mysql_fetch_object($result);
|
||||
mysql_free_result($result);
|
||||
return "$h <small>(a href=db_action.php?table=user&id=$user->id>$user->name</a>)</small>";
|
||||
}
|
||||
|
||||
function outcome_color($s) {
|
||||
switch($s) {
|
||||
case 1: return '33cc33'; // "Success"
|
||||
|
@ -500,8 +517,7 @@ function result_short_header() {
|
|||
<th>WU ID</th>
|
||||
<th>server state</th>
|
||||
<th>outcome</th>
|
||||
<th>client state</th>
|
||||
<th>host</th>
|
||||
<th>host (user)</th>
|
||||
<th>client ver</th>
|
||||
<th>received</th>
|
||||
</tr>
|
||||
|
@ -510,15 +526,15 @@ function result_short_header() {
|
|||
|
||||
function show_result_short($result) {
|
||||
$ss = result_server_state_string($result->server_state);
|
||||
$oc = result_outcome_string($result->outcome);
|
||||
if ($result->outcome == 3) {
|
||||
$cs = result_client_state_string($result->client_state);
|
||||
} else {
|
||||
$cs = '---';
|
||||
$oc = "$oc ($cs)";
|
||||
}
|
||||
$oc = result_outcome_string($result->outcome);
|
||||
$received = time_str($result->received_time);
|
||||
$version = client_version_string($result->client_version_num);
|
||||
$outcome_color = outcome_color($result->outcome);
|
||||
$host_user = host_user_link($result->userid);
|
||||
|
||||
echo "
|
||||
<tr>
|
||||
|
@ -526,18 +542,9 @@ function show_result_short($result) {
|
|||
<td><a href=db_action.php?table=workunit&id=$result->workunitid>$result->workunitid</a></td>
|
||||
<td>$ss</td>
|
||||
<td bgcolor=$outcome_color>$oc</td>
|
||||
<td>$cs</td>
|
||||
";
|
||||
if ($result->hostid) {
|
||||
echo "
|
||||
<td><a href=db_action.php?table=host&id=$result->hostid>$result->hostid</a></td>
|
||||
";
|
||||
} else {
|
||||
echo "<td>---</td>\n";
|
||||
}
|
||||
echo "<td>$version</td>";
|
||||
echo "<td>$received</td>";
|
||||
echo "
|
||||
<td>$host_user</td>
|
||||
<td>$version</td>
|
||||
<td>$received</td>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue