IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 29, 2010, 11:09:11 AM (16 years ago)
Author:
rhenders
Message:

support for log/linear plots

File:
1 edited

Legend:

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

    r29072 r29260  
    3535$selectedRevertStage = $_GET[revertstage];
    3636$selectedRevertMode = $_GET[revertmode];
     37$plotType = $_GET[plottype];
    3738
    3839if ($selectedLabel == "") { $selectedLabel = "all_stdscience_labels"; }
    3940if ($selectedStage == "") { $selectedStage = "all_stages"; }
     41if ($plotType == "") { $plotType = "linear"; }
    4042
    4143$nsStatus = getNightlyScienceStatus($czardb);
    42 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><br>Current nightly science status: $nsStatus</p>";
     44$plotTypeLink = ($plotType == "linear") ? "log" : "linear";
     45$link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=" . $selectedLabel . "&stage=" . $selectedStage . "&revertstage=" . $stage . "&plottype=$plotTypeLink";
     46echo "<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<br>Use <a href=\"$link\"> $plotTypeLink</a> plots </p>";
    4347
    4448
     
    9397  echo "<tr>\n";
    9498    echo "<td>\n";
    95       echo "<img src=\"czartool_getplot.php?type=t&label=$selectedLabel&stage=$selectedStage\"><br>";
     99      echo "<img src=\"czartool_getplot.php?type=t&label=$selectedLabel&stage=$selectedStage&plottype=$plotType\"><br>";
    96100    echo "</td>\n";
    97101
    98102    echo "<td> \n";
    99       createLabelsTable($pass, $proj, $czardb, "stdscience", $stdsLabels, $distLabels, $pubLabels, $stages, $states, "new", $selectedLabel, $selectedStage);
     103      createLabelsTable($pass, $proj, $czardb, "stdscience", $stdsLabels, $distLabels, $pubLabels, $stages, $states, "new", $selectedLabel, $selectedStage, $plotType);
    100104    echo "</td>\n";
    101105  echo "</tr>\n";
     
    103107  echo "<tr>\n";
    104108    echo "<td>\n";
    105       echo "<img src=\"czartool_getplot.php?type=h&label=$selectedLabel&stage=$selectedStage\"><br>";
     109      echo "<img src=\"czartool_getplot.php?type=h&label=$selectedLabel&stage=$selectedStage&plottype=linear\"><br>";
    106110    echo "</td>\n";
    107111
    108112    echo "<td> \n";
    109       createLabelsTable($pass, $proj, $czardb, "update", $updateLabels, $distLabels, $pubLabels, $stages, $states, "new", $selectedLabel, $selectedStage);
     113      createLabelsTable($pass, $proj, $czardb, "update", $updateLabels, $distLabels, $pubLabels, $stages, $states, "new", $selectedLabel, $selectedStage, $plotType);
    110114    echo "</td>\n";
    111115  echo "</tr>\n";
     
    118122        echo "</td>\n";
    119123        echo "<td>\n";
    120           createServersTable($pass, $proj,$czardb, $servers, $selectedLabel, $selectedStage);
     124          createServersTable($pass, $proj,$czardb, $servers, $selectedLabel, $selectedStage, $plotType);
    121125        echo "</td>\n";
    122126
     
    225229#
    226230###########################################################################
    227 function createLabelsTable($pass, $proj, $db, $server, $labels, $distLabels, $pubLabels, $stages, $states, $selectedState, $selectedLabel, $selectedStage) {
     231function createLabelsTable($pass, $proj, $db, $server, $labels, $distLabels, $pubLabels, $stages, $states, $selectedState, $selectedLabel, $selectedStage, $plotType) {
    228232
    229233    // set up table columns
     
    241245        if ($stage == "burntool") continue;
    242246        $reverting = getRevertStatus($db, $stage);
    243         $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=" . $selectedLabel . "&stage=" . $selectedStage . "&revertstage=" . $stage . "&revertmode=";
     247        $link = "czartool_labels.php?pass=".$pass."&proj=".$proj."&label=".$selectedLabel."&stage=".$selectedStage."&plottype=".$plotType."&revertstage=".$stage."&revertmode=";
    244248        if(!$reverting) {$label =  "Start";$link = $link . "on";}
    245249        if($reverting) {$label = "Stop";$link = $link . "off";}
     
    256260       
    257261        if ($stage == $selectedStage) $link = "";
    258         else $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=" . $selectedLabel . "&stage=" . $stage;
     262        else $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=" . $selectedLabel . "&stage=".$stage."&plottype=".$plotType;
    259263        write_table_cell($class, '%s', $link, $stage);
    260264    }
    261265
    262266    if ($selectedStage=="all_stages") $link = "";
    263     else $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=" . $selectedLabel . "&stage=all_stages";
     267    else $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=" . $selectedLabel . "&stage=all_stages"."&plottype=".$plotType;
    264268    write_table_cell($class, '%s', $link, "All stages");
    265269
     
    267271    echo "<tr><td></td>\n";
    268272
    269     $defaultlink = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj;
     273    $defaultlink = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj."&label=".$selectedLabel."&stage=".$selectedStage."&plottype=".$plotType;
    270274
    271275    // write rows
     
    285289        // create link to label summary page for each label
    286290        if ($thisLabel == $selectedLabel) $link = "";
    287         else $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=" . $thisLabel . "&stage=" . $selectedStage;
     291        else $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=" . $thisLabel . "&stage=" . $selectedStage."&plottype=".$plotType;
    288292
    289293        echo "<tr><td></td>\n";
     
    342346
    343347    if ($selectedLabel == "all_".$server."_labels") $link = "";
    344     else  $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=all_".$server."_labels&stage=".$selectedStage;
     348    else  $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=all_".$server."_labels&stage=".$selectedStage."&plottype=".$plotType;
    345349
    346350    echo "<tr><td></td>\n";
     
    437441#
    438442###########################################################################
    439 function createServersTable($pass, $proj, $db, $servers, $selectedLabel, $selectedStage) {
     443function createServersTable($pass, $proj, $db, $servers, $selectedLabel, $selectedStage, $plotType) {
    440444
    441445    // set up table columns
     
    450454    foreach ($servers as &$server) {
    451455
    452         $link = "czartool_labels.php?pass=".$pass."&proj=".$proj."&server=".$server."&label=".$selectedLabel."&stage=".$selectedStage;
     456        $link = "czartool_labels.php?pass=".$pass."&proj=".$proj."&server=".$server."&label=".$selectedLabel."&stage=".$selectedStage."&plottype=".$plotType;
    453457        //      $link = "";
    454458
Note: See TracChangeset for help on using the changeset viewer.