IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 19, 2010, 11:55:20 AM (16 years ago)
Author:
rhenders
Message:

Added table for update pantasks server labels

File:
1 edited

Legend:

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

    r28861 r28964  
    3434$selectedRevertMode = $_GET[revertmode];
    3535
    36 if ($selectedLabel == "") $selectedLabel = "all_labels";
     36if ($selectedLabel == "") $selectedLabel = "all_stdscience_labels";
    3737if ($selectedStage == "") $selectedStage = "all_stages";
    3838
     
    5252$distLabels = getLabels($czardb, "distribution");
    5353$pubLabels = getLabels($czardb, "publishing");
     54$updateLabels = getLabels($czardb, "update");
    5455
    5556if ($debug) {
     
    9293
    9394    echo "<td> \n";
    94       createLabelsTable($pass, $proj, $czardb, $stdsLabels, $distLabels, $pubLabels, $stages, $states, "new", $selectedLabel, $selectedStage);
     95      createLabelsTable($pass, $proj, $czardb, "stdscience", $stdsLabels, $distLabels, $pubLabels, $stages, $states, "new", $selectedLabel, $selectedStage);
     96    echo "</td>\n";
     97  echo "</tr>\n";
     98
     99  echo "<tr>\n";
     100    echo "<td>\n";
     101      echo "<img src=\"czartool_getplot.php?type=h&label=$selectedLabel&stage=$selectedStage\"><br>";
     102    echo "</td>\n";
     103
     104    echo "<td> \n";
     105      createLabelsTable($pass, $proj, $czardb, "update", $updateLabels, $distLabels, $pubLabels, $stages, $states, "new", $selectedLabel, $selectedStage);
    95106    echo "</td>\n";
    96107  echo "</tr>\n";
     
    100111      echo "<tr valign=top>\n";
    101112        echo "<td> \n";
    102           echo "<img src=\"czartool_getplot.php?type=h&label=$selectedLabel&stage=$selectedStage\"><br>";
     113          echo "<img src=\"czartool_getplot.php?type=s\"><br>";
    103114        echo "</td>\n";
    104115        echo "<td>\n";
     
    116127      echo "<tr valign=top>\n";
    117128        echo "<td> \n";
    118           echo "<img src=\"czartool_getplot.php?type=s\"><br>";
    119129        echo "</td>\n";
    120130        echo "<td>\n";
     
    211221#
    212222###########################################################################
    213 function createLabelsTable($pass, $proj, $db, $stdsLabels, $distLabels, $pubLabels, $stages, $states, $selectedState, $selectedLabel, $selectedStage) {
     223function createLabelsTable($pass, $proj, $db, $server, $labels, $distLabels, $pubLabels, $stages, $states, $selectedState, $selectedLabel, $selectedStage) {
    214224
    215225    // set up table columns
     
    217227    echo "<table class=$class >\n";
    218228    echo "<tr><td></td>\n";
     229
     230    echo "<p  align=\"center\"> Current labels for $server server </p>";
    219231
    220232    write_header_cell($class, "");
     
    254266
    255267    // write rows
    256     foreach ($stdsLabels as &$stdsLabel) {
     268    foreach ($labels as &$thisLabel) {
    257269
    258270        $distributing = false;
     
    260272        foreach ($distLabels as &$distLabel) {
    261273
    262             if ($stdsLabel == $distLabel) { $distributing = true; break;}
     274            if ($thisLabel == $distLabel) { $distributing = true; break;}
    263275        }
    264276        foreach ($pubLabels as &$pubLabel) {
    265277
    266             if ($stdsLabel == $pubLabel) { $publishing = true; break;}
     278            if ($thisLabel == $pubLabel) { $publishing = true; break;}
    267279        }
    268280
    269281        // 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;
     282        if ($thisLabel == $selectedLabel) $link = "";
     283        else $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=" . $thisLabel . "&stage=" . $selectedStage;
    272284
    273285        echo "<tr><td></td>\n";
    274         write_table_cell($class, '%s', $link, $stdsLabel);
     286        write_table_cell($class, '%s', $link, $thisLabel);
    275287        write_table_cell($class, '%s', "", $distributing ? "yes" : "NO");
    276288        write_table_cell($class, '%s', "", $publishing ? "yes" : "NO");
     
    279291        $anyFaults = false;
    280292
    281         $link = "chipProcessedImfile_failure.php?pass=" . $pass . "&proj=" . $proj . "&chipRun.label=" . $stdsLabel . "&chipRun.state=new";
    282         getStateAndFaults($db, $stdsLabel, $selectedState, "chip", $str, $anyFaults);
     293        $link = "chipProcessedImfile_failure.php?pass=" . $pass . "&proj=" . $proj . "&chipRun.label=" . $thisLabel . "&chipRun.state=new";
     294        getStateAndFaults($db, $thisLabel, $selectedState, "chip", $str, $anyFaults);
    283295        write_table_cell($class, '%s', $anyFaults ? $link : "", $str);
    284296
    285         $link = "camProcessedExp_failure.php?pass=" . $pass . "&proj=" . $proj . "&camRun.label=" . $stdsLabel . "&camRun.state=new";
    286         getStateAndFaults($db, $stdsLabel, $selectedState, "cam", $str, $anyFaults);
     297        $link = "camProcessedExp_failure.php?pass=" . $pass . "&proj=" . $proj . "&camRun.label=" . $thisLabel . "&camRun.state=new";
     298        getStateAndFaults($db, $thisLabel, $selectedState, "cam", $str, $anyFaults);
    287299        write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
    288300
    289301        $link = $defaultlink;
    290         getStateAndFaults($db, $stdsLabel, $selectedState, "fake", $str, $anyFaults);
    291         write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
    292 
    293         $link = "warpFailedSkyfiles.php?pass=" . $pass . "&proj=" . $proj . "&warpRun.label=" . $stdsLabel . "&warpRun.state=new";
    294         getStateAndFaults($db, $stdsLabel, $selectedState, "warp", $str, $anyFaults);
     302        getStateAndFaults($db, $thisLabel, $selectedState, "fake", $str, $anyFaults);
     303        write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
     304
     305        $link = "warpFailedSkyfiles.php?pass=" . $pass . "&proj=" . $proj . "&warpRun.label=" . $thisLabel . "&warpRun.state=new";
     306        getStateAndFaults($db, $thisLabel, $selectedState, "warp", $str, $anyFaults);
    295307        write_table_cell($class, '%s',  $anyFaults ? $link : "",  $str);
    296308
    297         $link = "stackFailedSkyfile.php?pass=" . $pass . "&proj=" . $proj . "&stackRun.label=" . $stdsLabel . "&stackRun.state=new";
    298         getStateAndFaults($db, $stdsLabel, $selectedState, "stack", $str, $anyFaults);
    299         write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
    300 
    301         $link = "diffFailedSkyfile.php?pass=" . $pass . "&proj=" . $proj . "&diffRun.label=" . $stdsLabel . "&diffRun.state=new";
    302         getStateAndFaults($db, $stdsLabel, $selectedState, "diff", $str, $anyFaults);
     309        $link = "stackFailedSkyfile.php?pass=" . $pass . "&proj=" . $proj . "&stackRun.label=" . $thisLabel . "&stackRun.state=new";
     310        getStateAndFaults($db, $thisLabel, $selectedState, "stack", $str, $anyFaults);
     311        write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
     312
     313        $link = "diffFailedSkyfile.php?pass=" . $pass . "&proj=" . $proj . "&diffRun.label=" . $thisLabel . "&diffRun.state=new";
     314        getStateAndFaults($db, $thisLabel, $selectedState, "diff", $str, $anyFaults);
    303315        write_table_cell($class, '%s',  $anyFaults ? $link : "",  $str);
    304316
    305317        $link = $defaultlink;
    306         getStateAndFaults($db, $stdsLabel, $selectedState, "magic", $str, $anyFaults);
     318        getStateAndFaults($db, $thisLabel, $selectedState, "magic", $str, $anyFaults);
    307319        write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
    308320
    309321        $link = $defaultlink;
    310         getStateAndFaults($db, $stdsLabel, $selectedState, "magicDS", $str, $anyFaults);
     322        getStateAndFaults($db, $thisLabel, $selectedState, "magicDS", $str, $anyFaults);
    311323        write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
    312324
    313325        $link = $defaultlink;
    314         getStateAndFaults($db, $stdsLabel, $selectedState, "dist", $str, $anyFaults);
     326        getStateAndFaults($db, $thisLabel, $selectedState, "dist", $str, $anyFaults);
    315327        write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
    316328
     
    318330    }
    319331
    320     if ($selectedLabel == "all_labels") $link = "";
    321     else  $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=all_labels&stage=".$selectedStage;
    322 
    323     echo "<tr><td></td>\n";
    324     write_table_cell($class, '%s', $link, "All labels");
     332    if ($selectedLabel == "all_".$server."_labels") $link = "";
     333    else  $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=all_".$server."_labels&stage=".$selectedStage;
     334
     335    echo "<tr><td></td>\n";
     336    write_table_cell($class, '%s', $link, "All $server labels");
    325337
    326338    echo "</tr>\n";
Note: See TracChangeset for help on using the changeset viewer.