IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 7, 2010, 9:16:10 AM (16 years ago)
Author:
eugene
Message:

updates from trunk

Location:
branches/eam_branches/ipp-20100823
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20100823

  • branches/eam_branches/ipp-20100823/ippMonitor/raw/czartool_labels.php

    r28969 r29124  
    3939if ($selectedStage == "") { $selectedStage = "all_stages"; }
    4040
    41 echo 'Some documentation can be found <a href="http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/Processing">here</a><br>';
     41$nsStatus = getNightlyScienceStatus($czardb);
     42echo "<p  align=\"center\"> Current status of the IPP as of $lastUpdateTime (faults are shown in parentheses). <br>Documentation can be found <a href=\"http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/Processing\">here</a> and cluster load monitored <a href=\"http://ganglia.pan-starrs.ifa.hawaii.edu/?r=hour&s=descending&c=IPP%2520Production\">here</a><br>Current nightly science status: $nsStatus</p>";
     43
    4244
    4345// deal with reverts: turn on or off if requested and pass current revert state for this stage onto labels table later
     
    6668
    6769$states=array("full","new","drop","wait");
    68 $stages=array("chip","cam","fake","warp","stack","diff","magic","magicDS","dist");
     70$stages=array("burntool", "chip","cam","fake","warp","stack","diff","magic","magicDS","dist");
    6971$servers=array(
    7072        "addstar",
     
    8789echo "<input type=\"hidden\" name=\"menu\" value=\"$menu\">\n";
    8890echo "</form>\n";
    89 echo "<p  align=\"center\"> Current status of IPP (any faults are shown in parentheses). NOTE: This data is good as of: $lastUpdateTime </p>";
    9091
    9192echo "<table>\n";
     
    231232    echo "<tr><td></td>\n";
    232233
    233     echo "<p  align=\"center\"> Current labels for $server server </p>";
     234    echo "<p  align=\"center\"> Current labels for $server server (D=distributing, P=publishing)</p>";
    234235
    235236    write_header_cell($class, "");
     
    238239    foreach ($stages as &$stage) {
    239240
     241        if ($stage == "burntool") continue;
    240242        $reverting = getRevertStatus($db, $stage);
    241243        $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=" . $selectedLabel . "&stage=" . $selectedStage . "&revertstage=" . $stage . "&revertmode=";
     
    249251    echo "</tr>\n";
    250252    echo "<tr><td></td>\n";
     253    write_header_cell($class, " ");
    251254    write_header_cell($class, "Label (in order of priority)");
    252     write_header_cell($class, "Distributing?");
    253     write_header_cell($class, "Publishing?");
    254255    foreach ($stages as &$stage) {
    255256       
     
    287288
    288289        echo "<tr><td></td>\n";
     290        $distPub = " ";
     291        if ($distributing) $distPub = "D";
     292        if ($publishing) $distPub = $distPub . "P";
     293        write_table_cell($class, '%s', "", $distPub);
     294
    289295        write_table_cell($class, '%s', $link, $thisLabel);
    290         write_table_cell($class, '%s', "", $distributing ? "yes" : "NO");
    291         write_table_cell($class, '%s', "", $publishing ? "yes" : "NO");
    292296
    293297        $str = "";
    294298        $anyFaults = false;
     299
     300        $link = $defaultlink;
     301        getStateAndFaults($db, $thisLabel, $selectedState, "burntool", $str, $anyFaults);
     302        write_table_cell($class, '%s', $anyFaults ? $link : "", $str);
    295303
    296304        $link = "failedChipProcessedImfile.php?pass=" . $pass . "&proj=" . $proj . "&chipRun.label=" . $thisLabel . "&chipRun.state=new";
     
    337345
    338346    echo "<tr><td></td>\n";
     347    write_table_cell($class, '%s', "", " ");
    339348    write_table_cell($class, '%s', $link, "All $server labels");
    340349
     
    355364    $qry = $db->query($sql);
    356365    if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
     366}
     367
     368###########################################################################
     369#
     370# Returns current nightly science status
     371#
     372###########################################################################
     373function getNightlyScienceStatus($db) {
     374
     375    $sql = "SELECT status FROM nightlyscience";
     376    if ($debug) {echo "$sql<br>";}
     377
     378    $qry = $db->query($sql);
     379    if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
     380    $qry->fetchInto($row);
     381
     382    return $row[0];
    357383}
    358384
Note: See TracChangeset for help on using the changeset viewer.