IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 26, 2010, 9:18:39 AM (16 years ago)
Author:
Serge CHASTEL
Message:

Merging trunk in branch

Location:
branches/sc_branches/trunkTest
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/sc_branches/trunkTest

  • branches/sc_branches/trunkTest/ippMonitor/raw/czartool_labels.php

    r28861 r29060  
    1010//$db = dbconnect($ID['proj']);
    1111$czardb = dbconnect("czardb"); // HACK to connect to czarDb
     12$lastUpdateTime = getLastUpdateTime($czardb);
     13
    1214$gpc1db = dbconnect($ID['proj']);
    1315
     
    2224else {$myMenu = "ipp.imfiles.dat";}
    2325
    24 menu($myMenu, 'Czartool', 'ipp.css', $ID['link'], $ID['proj']);
     26menu($myMenu, 'Czartool on '.$lastUpdateTime, 'ipp.css', $ID['link'], $ID['proj']);
    2527
    2628$pass = $ID['pass'];
     
    3436$selectedRevertMode = $_GET[revertmode];
    3537
    36 if ($selectedLabel == "") $selectedLabel = "all_labels";
    37 if ($selectedStage == "") $selectedStage = "all_stages";
     38if ($selectedLabel == "") { $selectedLabel = "all_stdscience_labels"; }
     39if ($selectedStage == "") { $selectedStage = "all_stages"; }
     40
     41echo "<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>";
    3842
    3943// deal with reverts: turn on or off if requested and pass current revert state for this stage onto labels table later
     
    5256$distLabels = getLabels($czardb, "distribution");
    5357$pubLabels = getLabels($czardb, "publishing");
     58$updateLabels = getLabels($czardb, "update");
    5459
    5560if ($debug) {
     
    6166
    6267$states=array("full","new","drop","wait");
    63 $stages=array("chip","cam","fake","warp","stack","diff","magic","magicDS","dist");
     68$stages=array("burntool", "chip","cam","fake","warp","stack","diff","magic","magicDS","dist");
    6469$servers=array(
    6570        "addstar",
     
    8287echo "<input type=\"hidden\" name=\"menu\" value=\"$menu\">\n";
    8388echo "</form>\n";
    84 $lastUpdateTime = getLastUpdateTime($czardb);
    85 echo "<p  align=\"center\"> Current status of IPP (any faults are shown in parentheses). NOTE: This data is good as of: $lastUpdateTime </p>";
    8689
    8790echo "<table>\n";
     
    9295
    9396    echo "<td> \n";
    94       createLabelsTable($pass, $proj, $czardb, $stdsLabels, $distLabels, $pubLabels, $stages, $states, "new", $selectedLabel, $selectedStage);
     97      createLabelsTable($pass, $proj, $czardb, "stdscience", $stdsLabels, $distLabels, $pubLabels, $stages, $states, "new", $selectedLabel, $selectedStage);
     98    echo "</td>\n";
     99  echo "</tr>\n";
     100
     101  echo "<tr>\n";
     102    echo "<td>\n";
     103      echo "<img src=\"czartool_getplot.php?type=h&label=$selectedLabel&stage=$selectedStage\"><br>";
     104    echo "</td>\n";
     105
     106    echo "<td> \n";
     107      createLabelsTable($pass, $proj, $czardb, "update", $updateLabels, $distLabels, $pubLabels, $stages, $states, "new", $selectedLabel, $selectedStage);
    95108    echo "</td>\n";
    96109  echo "</tr>\n";
     
    100113      echo "<tr valign=top>\n";
    101114        echo "<td> \n";
    102           echo "<img src=\"czartool_getplot.php?type=h&label=$selectedLabel&stage=$selectedStage\"><br>";
     115          echo "<img src=\"czartool_getplot.php?type=s\"><br>";
    103116        echo "</td>\n";
    104117        echo "<td>\n";
     
    116129      echo "<tr valign=top>\n";
    117130        echo "<td> \n";
    118           echo "<img src=\"czartool_getplot.php?type=s\"><br>";
    119131        echo "</td>\n";
    120132        echo "<td>\n";
     
    211223#
    212224###########################################################################
    213 function createLabelsTable($pass, $proj, $db, $stdsLabels, $distLabels, $pubLabels, $stages, $states, $selectedState, $selectedLabel, $selectedStage) {
     225function createLabelsTable($pass, $proj, $db, $server, $labels, $distLabels, $pubLabels, $stages, $states, $selectedState, $selectedLabel, $selectedStage) {
    214226
    215227    // set up table columns
     
    218230    echo "<tr><td></td>\n";
    219231
     232    echo "<p  align=\"center\"> Current labels for $server server (D=distributing, P=publishing)</p>";
     233
    220234    write_header_cell($class, "");
    221235    write_header_cell($class, "");
     
    223237    foreach ($stages as &$stage) {
    224238
     239        if ($stage == "burntool") continue;
    225240        $reverting = getRevertStatus($db, $stage);
    226241        $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=" . $selectedLabel . "&stage=" . $selectedStage . "&revertstage=" . $stage . "&revertmode=";
     
    234249    echo "</tr>\n";
    235250    echo "<tr><td></td>\n";
     251    write_header_cell($class, " ");
    236252    write_header_cell($class, "Label (in order of priority)");
    237     write_header_cell($class, "Distributing?");
    238     write_header_cell($class, "Publishing?");
    239253    foreach ($stages as &$stage) {
    240254       
     
    254268
    255269    // write rows
    256     foreach ($stdsLabels as &$stdsLabel) {
     270    foreach ($labels as &$thisLabel) {
    257271
    258272        $distributing = false;
     
    260274        foreach ($distLabels as &$distLabel) {
    261275
    262             if ($stdsLabel == $distLabel) { $distributing = true; break;}
     276            if ($thisLabel == $distLabel) { $distributing = true; break;}
    263277        }
    264278        foreach ($pubLabels as &$pubLabel) {
    265279
    266             if ($stdsLabel == $pubLabel) { $publishing = true; break;}
     280            if ($thisLabel == $pubLabel) { $publishing = true; break;}
    267281        }
    268282
    269283        // create link to label summary page for each label
    270         if ($stdsLabel == $selectedLabel) $link = "";
    271         else $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=" . $stdsLabel . "&stage=" . $selectedStage;
     284        if ($thisLabel == $selectedLabel) $link = "";
     285        else $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=" . $thisLabel . "&stage=" . $selectedStage;
    272286
    273287        echo "<tr><td></td>\n";
    274         write_table_cell($class, '%s', $link, $stdsLabel);
    275         write_table_cell($class, '%s', "", $distributing ? "yes" : "NO");
    276         write_table_cell($class, '%s', "", $publishing ? "yes" : "NO");
     288        $distPub = " ";
     289        if ($distributing) $distPub = "D";
     290        if ($publishing) $distPub = $distPub . "P";
     291        write_table_cell($class, '%s', "", $distPub);
     292
     293        write_table_cell($class, '%s', $link, $thisLabel);
    277294
    278295        $str = "";
    279296        $anyFaults = false;
    280297
    281         $link = "chipProcessedImfile_failure.php?pass=" . $pass . "&proj=" . $proj . "&chipRun.label=" . $stdsLabel . "&chipRun.state=new";
    282         getStateAndFaults($db, $stdsLabel, $selectedState, "chip", $str, $anyFaults);
     298        $link = $defaultlink;
     299        getStateAndFaults($db, $thisLabel, $selectedState, "burntool", $str, $anyFaults);
    283300        write_table_cell($class, '%s', $anyFaults ? $link : "", $str);
    284301
    285         $link = "camProcessedExp_failure.php?pass=" . $pass . "&proj=" . $proj . "&camRun.label=" . $stdsLabel . "&camRun.state=new";
    286         getStateAndFaults($db, $stdsLabel, $selectedState, "cam", $str, $anyFaults);
     302        $link = "failedChipProcessedImfile.php?pass=" . $pass . "&proj=" . $proj . "&chipRun.label=" . $thisLabel . "&chipRun.state=new";
     303        getStateAndFaults($db, $thisLabel, $selectedState, "chip", $str, $anyFaults);
     304        write_table_cell($class, '%s', $anyFaults ? $link : "", $str);
     305
     306        $link = "failedCamProcessedExp.php?pass=" . $pass . "&proj=" . $proj . "&camRun.label=" . $thisLabel . "&camRun.state=new";
     307        getStateAndFaults($db, $thisLabel, $selectedState, "cam", $str, $anyFaults);
    287308        write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
    288309
     310        $link =  "failedFakeProcessedImfile.php?pass=" . $pass . "&proj=" . $proj . "&fakeRun.label=" . $thisLabel . "&fakeRun.state=new";
     311        getStateAndFaults($db, $thisLabel, $selectedState, "fake", $str, $anyFaults);
     312        write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
     313
     314        $link = "failedWarpSkyfiles.php?pass=" . $pass . "&proj=" . $proj . "&warpRun.label=" . $thisLabel . "&warpRun.state=new";
     315        getStateAndFaults($db, $thisLabel, $selectedState, "warp", $str, $anyFaults);
     316        write_table_cell($class, '%s',  $anyFaults ? $link : "",  $str);
     317
     318        $link = "failedStackSkyfile.php?pass=" . $pass . "&proj=" . $proj . "&stackRun.label=" . $thisLabel . "&stackRun.state=new";
     319        getStateAndFaults($db, $thisLabel, $selectedState, "stack", $str, $anyFaults);
     320        write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
     321
     322        $link = "failedDiffSkyfile.php?pass=" . $pass . "&proj=" . $proj . "&diffRun.label=" . $thisLabel . "&diffRun.state=new";
     323        getStateAndFaults($db, $thisLabel, $selectedState, "diff", $str, $anyFaults);
     324        write_table_cell($class, '%s',  $anyFaults ? $link : "",  $str);
     325
    289326        $link = $defaultlink;
    290         getStateAndFaults($db, $stdsLabel, $selectedState, "fake", $str, $anyFaults);
     327        getStateAndFaults($db, $thisLabel, $selectedState, "magic", $str, $anyFaults);
    291328        write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
    292329
    293         $link = "warpFailedSkyfiles.php?pass=" . $pass . "&proj=" . $proj . "&warpRun.label=" . $stdsLabel . "&warpRun.state=new";
    294         getStateAndFaults($db, $stdsLabel, $selectedState, "warp", $str, $anyFaults);
    295         write_table_cell($class, '%s',  $anyFaults ? $link : "",  $str);
    296 
    297         $link = "stackFailedSkyfile.php?pass=" . $pass . "&proj=" . $proj . "&stackRun.label=" . $stdsLabel . "&stackRun.state=new";
    298         getStateAndFaults($db, $stdsLabel, $selectedState, "stack", $str, $anyFaults);
     330        $link = $defaultlink;
     331        getStateAndFaults($db, $thisLabel, $selectedState, "magicDS", $str, $anyFaults);
    299332        write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
    300333
    301         $link = "diffFailedSkyfile.php?pass=" . $pass . "&proj=" . $proj . "&diffRun.label=" . $stdsLabel . "&diffRun.state=new";
    302         getStateAndFaults($db, $stdsLabel, $selectedState, "diff", $str, $anyFaults);
    303         write_table_cell($class, '%s',  $anyFaults ? $link : "",  $str);
    304 
    305334        $link = $defaultlink;
    306         getStateAndFaults($db, $stdsLabel, $selectedState, "magic", $str, $anyFaults);
     335        getStateAndFaults($db, $thisLabel, $selectedState, "dist", $str, $anyFaults);
    307336        write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
    308337
    309         $link = $defaultlink;
    310         getStateAndFaults($db, $stdsLabel, $selectedState, "magicDS", $str, $anyFaults);
    311         write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
    312 
    313         $link = $defaultlink;
    314         getStateAndFaults($db, $stdsLabel, $selectedState, "dist", $str, $anyFaults);
    315         write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
    316 
    317338        echo "</tr>\n";
    318339    }
    319340
    320     if ($selectedLabel == "all_labels") $link = "";
    321     else  $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=all_labels&stage=".$selectedStage;
     341    if ($selectedLabel == "all_".$server."_labels") $link = "";
     342    else  $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=all_".$server."_labels&stage=".$selectedStage;
    322343
    323344    echo "<tr><td></td>\n";
    324     write_table_cell($class, '%s', $link, "All labels");
     345    write_table_cell($class, '%s', "", " ");
     346    write_table_cell($class, '%s', $link, "All $server labels");
    325347
    326348    echo "</tr>\n";
Note: See TracChangeset for help on using the changeset viewer.