Index: /trunk/ippMonitor/raw/czartool_labels.php
===================================================================
--- /trunk/ippMonitor/raw/czartool_labels.php	(revision 28963)
+++ /trunk/ippMonitor/raw/czartool_labels.php	(revision 28964)
@@ -34,5 +34,5 @@
 $selectedRevertMode = $_GET[revertmode];
 
-if ($selectedLabel == "") $selectedLabel = "all_labels";
+if ($selectedLabel == "") $selectedLabel = "all_stdscience_labels";
 if ($selectedStage == "") $selectedStage = "all_stages";
 
@@ -52,4 +52,5 @@
 $distLabels = getLabels($czardb, "distribution");
 $pubLabels = getLabels($czardb, "publishing");
+$updateLabels = getLabels($czardb, "update");
 
 if ($debug) {
@@ -92,5 +93,15 @@
 
     echo "<td> \n";
-      createLabelsTable($pass, $proj, $czardb, $stdsLabels, $distLabels, $pubLabels, $stages, $states, "new", $selectedLabel, $selectedStage);
+      createLabelsTable($pass, $proj, $czardb, "stdscience", $stdsLabels, $distLabels, $pubLabels, $stages, $states, "new", $selectedLabel, $selectedStage);
+    echo "</td>\n";
+  echo "</tr>\n";
+
+  echo "<tr>\n";
+    echo "<td>\n";
+      echo "<img src=\"czartool_getplot.php?type=h&label=$selectedLabel&stage=$selectedStage\"><br>";
+    echo "</td>\n";
+
+    echo "<td> \n";
+      createLabelsTable($pass, $proj, $czardb, "update", $updateLabels, $distLabels, $pubLabels, $stages, $states, "new", $selectedLabel, $selectedStage);
     echo "</td>\n";
   echo "</tr>\n";
@@ -100,5 +111,5 @@
       echo "<tr valign=top>\n";
         echo "<td> \n";
-          echo "<img src=\"czartool_getplot.php?type=h&label=$selectedLabel&stage=$selectedStage\"><br>";
+          echo "<img src=\"czartool_getplot.php?type=s\"><br>";
         echo "</td>\n";
         echo "<td>\n";
@@ -116,5 +127,4 @@
       echo "<tr valign=top>\n";
         echo "<td> \n";
-          echo "<img src=\"czartool_getplot.php?type=s\"><br>";
         echo "</td>\n";
         echo "<td>\n";
@@ -211,5 +221,5 @@
 #
 ###########################################################################
-function createLabelsTable($pass, $proj, $db, $stdsLabels, $distLabels, $pubLabels, $stages, $states, $selectedState, $selectedLabel, $selectedStage) {
+function createLabelsTable($pass, $proj, $db, $server, $labels, $distLabels, $pubLabels, $stages, $states, $selectedState, $selectedLabel, $selectedStage) {
 
     // set up table columns
@@ -217,4 +227,6 @@
     echo "<table class=$class >\n";
     echo "<tr><td></td>\n";
+
+    echo "<p  align=\"center\"> Current labels for $server server </p>";
 
     write_header_cell($class, "");
@@ -254,5 +266,5 @@
 
     // write rows
-    foreach ($stdsLabels as &$stdsLabel) {
+    foreach ($labels as &$thisLabel) {
 
         $distributing = false;
@@ -260,17 +272,17 @@
         foreach ($distLabels as &$distLabel) {
 
-            if ($stdsLabel == $distLabel) { $distributing = true; break;}
+            if ($thisLabel == $distLabel) { $distributing = true; break;}
         }
         foreach ($pubLabels as &$pubLabel) {
 
-            if ($stdsLabel == $pubLabel) { $publishing = true; break;}
+            if ($thisLabel == $pubLabel) { $publishing = true; break;}
         }
 
         // create link to label summary page for each label
-        if ($stdsLabel == $selectedLabel) $link = "";
-        else $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=" . $stdsLabel . "&stage=" . $selectedStage;
+        if ($thisLabel == $selectedLabel) $link = "";
+        else $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=" . $thisLabel . "&stage=" . $selectedStage;
 
         echo "<tr><td></td>\n";
-        write_table_cell($class, '%s', $link, $stdsLabel);
+        write_table_cell($class, '%s', $link, $thisLabel);
         write_table_cell($class, '%s', "", $distributing ? "yes" : "NO");
         write_table_cell($class, '%s', "", $publishing ? "yes" : "NO");
@@ -279,38 +291,38 @@
         $anyFaults = false; 
 
-        $link = "chipProcessedImfile_failure.php?pass=" . $pass . "&proj=" . $proj . "&chipRun.label=" . $stdsLabel . "&chipRun.state=new";
-        getStateAndFaults($db, $stdsLabel, $selectedState, "chip", $str, $anyFaults);
+        $link = "chipProcessedImfile_failure.php?pass=" . $pass . "&proj=" . $proj . "&chipRun.label=" . $thisLabel . "&chipRun.state=new";
+        getStateAndFaults($db, $thisLabel, $selectedState, "chip", $str, $anyFaults);
         write_table_cell($class, '%s', $anyFaults ? $link : "", $str);
 
-        $link = "camProcessedExp_failure.php?pass=" . $pass . "&proj=" . $proj . "&camRun.label=" . $stdsLabel . "&camRun.state=new";
-        getStateAndFaults($db, $stdsLabel, $selectedState, "cam", $str, $anyFaults);
+        $link = "camProcessedExp_failure.php?pass=" . $pass . "&proj=" . $proj . "&camRun.label=" . $thisLabel . "&camRun.state=new";
+        getStateAndFaults($db, $thisLabel, $selectedState, "cam", $str, $anyFaults);
         write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
 
         $link = $defaultlink;
-        getStateAndFaults($db, $stdsLabel, $selectedState, "fake", $str, $anyFaults);
-        write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
-
-        $link = "warpFailedSkyfiles.php?pass=" . $pass . "&proj=" . $proj . "&warpRun.label=" . $stdsLabel . "&warpRun.state=new";
-        getStateAndFaults($db, $stdsLabel, $selectedState, "warp", $str, $anyFaults);
+        getStateAndFaults($db, $thisLabel, $selectedState, "fake", $str, $anyFaults);
+        write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
+
+        $link = "warpFailedSkyfiles.php?pass=" . $pass . "&proj=" . $proj . "&warpRun.label=" . $thisLabel . "&warpRun.state=new";
+        getStateAndFaults($db, $thisLabel, $selectedState, "warp", $str, $anyFaults);
         write_table_cell($class, '%s',  $anyFaults ? $link : "",  $str);
 
-        $link = "stackFailedSkyfile.php?pass=" . $pass . "&proj=" . $proj . "&stackRun.label=" . $stdsLabel . "&stackRun.state=new";
-        getStateAndFaults($db, $stdsLabel, $selectedState, "stack", $str, $anyFaults);
-        write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
-
-        $link = "diffFailedSkyfile.php?pass=" . $pass . "&proj=" . $proj . "&diffRun.label=" . $stdsLabel . "&diffRun.state=new";
-        getStateAndFaults($db, $stdsLabel, $selectedState, "diff", $str, $anyFaults);
+        $link = "stackFailedSkyfile.php?pass=" . $pass . "&proj=" . $proj . "&stackRun.label=" . $thisLabel . "&stackRun.state=new";
+        getStateAndFaults($db, $thisLabel, $selectedState, "stack", $str, $anyFaults);
+        write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
+
+        $link = "diffFailedSkyfile.php?pass=" . $pass . "&proj=" . $proj . "&diffRun.label=" . $thisLabel . "&diffRun.state=new";
+        getStateAndFaults($db, $thisLabel, $selectedState, "diff", $str, $anyFaults);
         write_table_cell($class, '%s',  $anyFaults ? $link : "",  $str);
 
         $link = $defaultlink;
-        getStateAndFaults($db, $stdsLabel, $selectedState, "magic", $str, $anyFaults);
+        getStateAndFaults($db, $thisLabel, $selectedState, "magic", $str, $anyFaults);
         write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
 
         $link = $defaultlink;
-        getStateAndFaults($db, $stdsLabel, $selectedState, "magicDS", $str, $anyFaults);
+        getStateAndFaults($db, $thisLabel, $selectedState, "magicDS", $str, $anyFaults);
         write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
 
         $link = $defaultlink;
-        getStateAndFaults($db, $stdsLabel, $selectedState, "dist", $str, $anyFaults);
+        getStateAndFaults($db, $thisLabel, $selectedState, "dist", $str, $anyFaults);
         write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
 
@@ -318,9 +330,9 @@
     }
 
-    if ($selectedLabel == "all_labels") $link = "";
-    else  $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=all_labels&stage=".$selectedStage;
-
-    echo "<tr><td></td>\n";
-    write_table_cell($class, '%s', $link, "All labels");
+    if ($selectedLabel == "all_".$server."_labels") $link = "";
+    else  $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=all_".$server."_labels&stage=".$selectedStage;
+
+    echo "<tr><td></td>\n";
+    write_table_cell($class, '%s', $link, "All $server labels");
 
     echo "</tr>\n";
