IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28724


Ignore:
Timestamp:
Jul 27, 2010, 4:20:53 PM (16 years ago)
Author:
rhenders
Message:

Added plots to czartool display

Location:
trunk/ippMonitor
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippMonitor/Makefile.in

    r28688 r28724  
    1414PROGRAMS = \
    1515$(DESTBIN)/skyplot.dvo \
    16 $(DESTBIN)/czartool_getLabels.pl \
    17 $(DESTBIN)/czartool_checkServer.pl \
    1816$(DESTBIN)/czartool_getServerStatus.pl \
    1917$(DESTBIN)/czartool_revert.pl \
     
    5553$(DESTWWW)/ipp.czartool.dat \
    5654$(DESTWWW)/czartool_labels.php \
    57 $(DESTWWW)/czartool_servers.php \
    58 $(DESTWWW)/czartool_summit.php \
     55$(DESTWWW)/czartool_getplot.php \
    5956$(DESTWWW)/histogram.php \
    6057$(DESTWWW)/show_and_delete_image.php \
  • trunk/ippMonitor/raw/czartool_labels.php

    r28708 r28724  
    2828$menu = $ID['menu'];
    2929
    30 $userSelection = $_GET[selection];
     30$selectedLabel = $_GET[label];
    3131$selectedServer = $_GET[server];
    32 
    33 if ($userSelection == "") {$userSelection = $_POST['state'];}
    34 if ($userSelection == "") {$userSelection = "new";}
    35 
    36 // anything to revert?
    37 $revertServer = $_GET[server];
    38 $revertStage = $_GET[stage];
     32$revertServer = $_GET[revertserver];
     33$revertStage = $_GET[revertstage];
    3934$revertMode = $_GET[revert];
     35
     36if ($selectedLabel == "") $selectedLabel = "all_labels";
    4037
    4138if ($revertStage != "" && $revertMode != "" && $revertServer != "" )
     
    8178echo "NOTE: This data is good as of: $lastUpdateTime </p>";
    8279
    83 createLabelsTable($pass, $proj, $czardb, $stdsLabels, $distLabels, $pubLabels, $stages, $states, "new");
    84 
    8580echo "<table>\n";
    86 echo "<tr>\n";
    87 echo "<td style=\"width: 50%;\">\n";
    88 
    89 $today = date("Y-m-d");                         // 03.10.01
    90 showSummitData($gpc1db, $today);
    91 
    92 echo "</td>\n";
    93 echo "<td> \n";
    94 
    95 createServersTable($pass, $proj,$czardb, $servers);
    96 
    97 echo "</td?\n";
    98 echo "</tr>\n";
     81  echo "<tr>\n";
     82
     83    echo "<td> \n";
     84      echo "<img src=\"czartool_getplot.php?type=t&label=$selectedLabel\"><br>\n";
     85    echo "</td>\n";
     86
     87    echo "<td> \n";
     88      createLabelsTable($pass, $proj, $czardb, $stdsLabels, $distLabels, $pubLabels, $stages, $states, "new", $selectedLabel);
     89    echo "</td>\n";
     90
     91  echo "</tr>\n";
     92  echo "<tr>\n";
     93
     94echo "<table>\n";
     95  echo "<tr valign=top>\n";
     96    echo "<td> \n";
     97      echo "<img src=\"czartool_getplot.php?type=h&label=$selectedLabel\"><br>\n";
     98    echo "</td>\n";
     99    echo "<td> \n";
     100      createServersTable($pass, $proj,$czardb, $servers);
     101    echo "</td>\n";
     102
     103    echo "<td> \n";
     104      $today = date("Y-m-d");                         // 03.10.01
     105      showSummitData($gpc1db, $today);
     106    echo "</td>\n";
     107  echo "</tr>\n";
    99108echo "</table>\n";
    100 
    101109if ($selectedServer) showServerStatus($selectedServer);
     110
     111  echo "</tr>\n";
     112echo "</table>\n";
     113
    102114
    103115menu_end();
     
    143155
    144156        if ($expType[0] == "OBJECT") {
    145             if ($summit[0] == $mhpcc[0]) $msg = "All science exposures taken since $date have been registered at MHPCC";
    146             else $msg = "Warning: Not all science exposures taken since $date have been registered at MHPCC";
     157            if ($summit[0] == $mhpcc[0]) $msg = "All science exposures taken since $date<br>have been registered at MHPCC";
     158            else $msg = "Warning: Not all science exposures taken since $date<br>have been registered at MHPCC";
    147159        }
    148160
     
    166178function getLabels($db, $server) {
    167179
    168     $sql = "SELECT label FROM current_labels WHERE server LIKE '$server'";
     180    # order by descending priority as set in gpc1 database
     181    $sql = "SELECT label FROM current_labels WHERE server LIKE '$server' ORDER BY priority DESC";
    169182    if ($debug) {echo "$sql<br>";}
    170183
     
    184197#
    185198###########################################################################
    186 function createLabelsTable($pass, $proj, $db, $stdsLabels, $distLabels, $pubLabels, $stages, $states, $selectedState) {
     199function createLabelsTable($pass, $proj, $db, $stdsLabels, $distLabels, $pubLabels, $stages, $states, $selectedState, $selectedLabel) {
    187200
    188201    // set up table columns
     
    200213        else $server = "stdscience";
    201214        $reverting = getRevertStatus($db, $stage);
    202         $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&server=" . $server . "&stage=" . $stage . "&revert=";
     215        $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&revertserver=" . $server . "&revertstage=" . $stage . "&revert=";
    203216        if(!$reverting) {$label =  "Start";$link = $link . "on";}
    204217        if($reverting) {$label = "Stop";$link = $link . "off";}
     
    209222    echo "</tr>\n";
    210223    echo "<tr><td></td>\n";
    211     write_header_cell($class, "label");
    212     write_header_cell($class, "distributing?");
    213     write_header_cell($class, "publishing?");
     224    write_header_cell($class, "Label (in order of priority)");
     225    write_header_cell($class, "Distributing?");
     226    write_header_cell($class, "Publishing?");
    214227    foreach ($stages as &$stage) write_header_cell($class, $stage);
    215228
    216229    echo "</tr>\n";
    217230    echo "<tr><td></td>\n";
     231
     232    $defaultlink = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj;
    218233
    219234    // write rows
     
    232247
    233248        // create link to label summary page for each label
    234         //$link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&selection=" . $stdsLabel;
    235         $link = "";
    236         $defaultlink = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj;
     249        if ($stdsLabel == $selectedLabel) $link = "";
     250        else $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=" . $stdsLabel;
    237251
    238252        echo "<tr><td></td>\n";
     
    283297    }
    284298
     299    if ($selectedLabel == "all_labels") $link = "";
     300    else  $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=all_labels";
     301
     302    echo "<tr><td></td>\n";
     303    write_table_cell($class, '%s', $link, "All labels:");
     304    write_table_cell($class, '%s', "", "-");
     305    write_table_cell($class, '%s', "", "-");
     306
     307    $str = "";
     308    $anyFaults = false;
     309
     310    $link = "chipProcessedImfile_failure.php?pass=" . $pass . "&proj=" . $proj . "&chipRun.state=new";
     311    getStateAndFaults($db, "all_labels", $selectedState, "chip", $str, $anyFaults);
     312    write_table_cell($class, '%s', $anyFaults ? $link : "", $str);
     313
     314    $link = "camProcessedExp_failure.php?pass=" . $pass . "&proj=" . $proj . "&camRun.state=new";
     315    getStateAndFaults($db, "all_labels", $selectedState, "cam", $str, $anyFaults);
     316    write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
     317
     318    $link = $defaultlink;
     319    getStateAndFaults($db, "all_labels", $selectedState, "fake", $str, $anyFaults);
     320    write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
     321
     322    $link = "warpFailedSkyfiles.php?pass=" . $pass . "&proj=" . $proj . "&warpRun.state=new";
     323    getStateAndFaults($db, "all_labels", $selectedState, "warp", $str, $anyFaults);
     324    write_table_cell($class, '%s',  $anyFaults ? $link : "",  $str);
     325
     326    $link = "stackFailedSkyfile.php?pass=" . $pass . "&proj=" . $proj . "&stackRun.state=new";
     327    getStateAndFaults($db, "all_labels", $selectedState, "stack", $str, $anyFaults);
     328    write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
     329
     330    $link = "diffFailedSkyfile.php?pass=" . $pass . "&proj=" . $proj . "&diffRun.state=new";
     331    getStateAndFaults($db, "all_labels", $selectedState, "diff", $str, $anyFaults);
     332    write_table_cell($class, '%s',  $anyFaults ? $link : "",  $str);
     333
     334    $link = $defaultlink;
     335    getStateAndFaults($db, "all_labels", $selectedState, "magic", $str, $anyFaults);
     336    write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
     337
     338    $link = $defaultlink;
     339    getStateAndFaults($db, "all_labels", $selectedState, "magicDS", $str, $anyFaults);
     340    write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
     341
     342    $link = $defaultlink;
     343    getStateAndFaults($db, "all_labels", $selectedState, "dist", $str, $anyFaults);
     344    write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
     345
     346
    285347    echo "</tr>\n";
    286348    echo "</table>\n";
    287 
    288     echo "<p> - Click on a fault to find logfile<br>";
    289     echo "- Click on column header to turn reverts on or off </p>";
    290349}
    291350
     
    357416
    358417        $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&server=" . $server;
    359   //      $link = "";
     418        //      $link = "";
    360419
    361420        getServerStatus($db, $server, $alive, $running);
Note: See TracChangeset for help on using the changeset viewer.