IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 27, 2010, 9:23:05 AM (16 years ago)
Author:
rhenders
Message:

Added nightly science status to top of page

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippMonitor/raw/czartool_labels.php

    r29056 r29072  
    3939if ($selectedStage == "") { $selectedStage = "all_stages"; }
    4040
    41 echo "<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></p>";
     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
     
    366368###########################################################################
    367369#
     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];
     383}
     384
     385###########################################################################
     386#
    368387# Returns whether this stage is reverting or not
    369388#
Note: See TracChangeset for help on using the changeset viewer.