~ubuntu-branches/ubuntu/lucid/boinc/lucid

« back to all changes in this revision

Viewing changes to html/inc/db_ops.inc

  • Committer: Bazaar Package Importer
  • Author(s): Frank S. Thomas, Frank S. Thomas
  • Date: 2008-05-31 08:02:47 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20080531080247-4ce890lp2rc768cr
Tags: 6.2.7-1
[ Frank S. Thomas ]
* New upstream release.
  - BOINC Manager: Redraw disk usage charts immediately after connecting to
    a (different) client. (closes: 463823)
* debian/copyright:
  - Added the instructions from debian/README.Debian-source about how
    repackaged BOINC tarballs can be reproduced because DevRef now
    recommends to put this here instead of in the afore-mentioned file.
  - Updated for the new release.
* Removed the obsolete debian/README.Debian-source.
* For consistency upstream renamed the core client and the command tool
  ("boinc_client" to "boinc" and "boinc_cmd" to "boinccmd"). Done the same
  in all packages and created symlinks with the old names for the binaries
  and man pages. Also added an entry in debian/boinc-client.NEWS explaining
  this change.
* debian/rules: Do not list Makefile.ins in the clean target individually,
  just remove all that can be found.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
 
$cvs_version_tracker[]="\$Id: db_ops.inc 12127 2007-02-21 16:26:51Z boincadm $";  //Generated automatically - do not edit
 
2
 
 
3
class BoincAssignment {
 
4
    static function enum($where_clause) {
 
5
        $db = BoincDb::get();
 
6
        return $db->enum('assignment', 'BoincAssignment', $where_clause);
 
7
    }
 
8
}
3
9
 
4
10
define("NVALIDATE_STATES", 6);
5
11
 
466
472
    for ($ss=1; $ss<6; $ss++) {
467
473
        $server_state[$ss] = 0;
468
474
    }
469
 
    for ($ro=0; $ro<7; $ro++) {
 
475
    for ($ro=0; $ro<8; $ro++) {
470
476
        $outcome[$ro] = 0;
471
477
    }
472
 
    for ($cs=1; $cs<6; $cs++) {
 
478
    for ($cs=1; $cs<7; $cs++) {
473
479
        $client_state[$cs] = 0;
474
480
    }
475
481
    for ($fds=0; $fds<4; $fds++) {
515
521
       SUM(case when server_state = '5' and outcome = '4' then 1 else 0 end) AS outcome_noreply,
516
522
       SUM(case when server_state = '5' and outcome = '5' then 1 else 0 end) AS outcome_didntneed,
517
523
       SUM(case when server_state = '5' and outcome = '6' then 1 else 0 end) AS outcome_validateerror,
 
524
       SUM(case when server_state = '5' and outcome = '7' then 1 else 0 end) AS outcome_clientdetached,
518
525
       SUM(case when server_state = '5' and outcome = '1' and validate_state = '0' then 1 else 0 end) AS validate_init,
519
526
       SUM(case when server_state = '5' and outcome = '1' and validate_state = '1' then 1 else 0 end) AS validate_valid,
520
527
       SUM(case when server_state = '5' and outcome = '1' and validate_state = '2' then 1 else 0 end) AS validate_invalid,
570
577
        $outcome[4]      = $res->outcome_noreply;
571
578
        $outcome[5]      = $res->outcome_didntneed;
572
579
        $outcome[6]      = $res->outcome_validateerror;
 
580
        $outcome[7]      = $res->outcome_clientdetached;
573
581
 
574
582
        $client_state[1] = $res->clientstate_downloading;
575
583
        $client_state[2] = $res->clientstate_downloaded;
615
623
    echo "<td><table border=2 cellpadding=4>\n";
616
624
    echo "<tr><th>Outcome</th><th># results</th></tr>\n";
617
625
 
618
 
    for ($ro=0; $ro<7; $ro++) {
 
626
    for ($ro=0; $ro<8; $ro++) {
619
627
        c_row2($outcome[$ro]?outcome_color($ro):'', outcome_string($ro),
620
628
            link_results("$outcome[$ro]", $urlquery, "outcome=$ro", '')
621
629
        );
668
676
        <select name=\"outcome\">
669
677
        <option value=\"CHOOSE_ALL\" selected=\"selected\"> Any </option>
670
678
    ";
671
 
    for($i=0; $i<7; $i++) {
 
679
    for($i=0; $i<8; $i++) {
672
680
        echo "<option value=\"$i\"> "."[$i]&nbsp;&nbsp;".'   '.outcome_string($i)."</option>\n";
673
681
    }
674
682
    echo "</select>\n";
690
698
        <select name=\"client_state\">
691
699
        <option value=\"CHOOSE_ALL\" selected=\"selected\"> Any </option>
692
700
    ";
693
 
    for($i=0; $i<6; $i++) {
 
701
    for($i=0; $i<7; $i++) {
694
702
        echo "<option value=\"$i\"> "."[$i]&nbsp;&nbsp;".client_state_string($i)."</option>\n";
695
703
    }
696
704
    echo "</select>\n";
908
916
        $x = $x."Unrecognized Error: $s<br>";
909
917
    }
910
918
    if (strlen($x)) {
911
 
        $x="<font color=\"ff3333\">".$x."</font>";
 
919
        $x="<font color=\"#ff3333\">".$x."</font>";
912
920
    } else {
913
921
        $x="<br>";
914
922
    }
1162
1170
        <th>WU ID</th>
1163
1171
        <th>server<br>state</th>
1164
1172
        <th>outcome</th>
 
1173
        <th>client<br>state</th>
1165
1174
        <th>validate<br>state</th>
1166
1175
        <th>delete<br>state</th>
1167
1176
        <th>exit<br>status</th>
1168
1177
        <th>host<br>(user)</th>
1169
1178
        <th>app<br>ver</th>
1170
 
        <th>received <br><i>or</i> <font color=\"ff3333\">dead</font><font color=\"33cc33\">line</font> <br><i>or</i> <font color=\"9900cc\">created</font></th>
 
1179
        <th>received <br><i>or</i> <font color=\"#ff3333\">dead</font><font color=\"#33cc33\">line</font> <br><i>or</i> <font color=\"#9900cc\">created</font></th>
1171
1180
        <th>CPU<br>hours</th>
1172
1181
        <th>claimed<br>credit</th>
1173
1182
        <th>granted<br>credit</th>
1176
1185
}
1177
1186
 
1178
1187
function show_result_short($result) {
1179
 
    $ss = server_state_string($result->server_state);
1180
 
    $oc = outcome_string($result->outcome);
1181
 
    $vs = validate_state_str($result->validate_state);
 
1188
    $ss = server_state_string($result->server_state)." [$result->server_state]";
 
1189
    $oc = outcome_string($result->outcome)." [$result->outcome]";
 
1190
    $vs = validate_state_str($result->validate_state)." [$result->validate_state]";
 
1191
    $cs2 = client_state_string($result->client_state)." [$result->client_state]";
1182
1192
    if ($result->outcome == 3) {
1183
1193
        $cs = client_state_string($result->client_state);
1184
1194
        $oc = "$oc ($cs)";
1194
1204
            $received = "<font color=\"9900cc\">". time_str($result->create_time) . "</font>";
1195
1205
        } else if ($result->report_deadline>=$timenow) {
1196
1206
            // overdue -- show deadline in red
1197
 
            $received = "<font color=\"33cc33\">". time_str($result->report_deadline) . "</font>";
 
1207
            $received = "<font color=\"#33cc33\">". time_str($result->report_deadline) . "</font>";
1198
1208
        } else {
1199
1209
            // in progress and not overdue -- show deadline in green
1200
 
            $received = "<font color=\"ff3333\">". time_str($result->report_deadline) . "</font>";
 
1210
            $received = "<font color=\"#ff3333\">". time_str($result->report_deadline) . "</font>";
1201
1211
        }
1202
1212
    }
1203
1213
    $version = $result->app_version_num;
1215
1225
        <td><a href=\"db_action.php?table=workunit&id=$result->workunitid\">$result->workunitid</a></td>
1216
1226
        <td>$ss</td>
1217
1227
        <td bgcolor=$outcome_color>$oc</td>
 
1228
        <td>$cs2</td>
1218
1229
        <td bgcolor=$validate_color>$vs</td>
1219
1230
        <td>$delete_state</td>
1220
1231
        <td>", exit_status_string($result), "</td>
1381
1392
    }
1382
1393
}
1383
1394
 
 
1395
$cvs_version_tracker[]="\$Id: db_ops.inc 14767 2008-02-21 00:47:50Z davea $";  //Generated automatically - do not edit
1384
1396
?>