Index: branches/eam_branches/ipp-ops-20130712/ippMonitor/czartool/czartool/Gpc1Db.pm
===================================================================
--- branches/eam_branches/ipp-ops-20130712/ippMonitor/czartool/czartool/Gpc1Db.pm	(revision 37064)
+++ branches/eam_branches/ipp-ops-20130712/ippMonitor/czartool/czartool/Gpc1Db.pm	(revision 37068)
@@ -139,4 +139,9 @@
     my $stateCol =  $table.".state";
 
+    my $extraState = "";
+    if ($state eq 'new') {
+        $extraState = " OR $stateCol = 'update' ";
+    }
+
     my $query =  $self->{_db}->prepare(<<SQL);
     SELECT COUNT(DISTINCT $id) 
@@ -144,5 +149,5 @@
         JOIN $joinTable USING ($id)
         WHERE label LIKE '$label'
-        AND (($faultCol != 0 AND $stateCol = '$state') OR $stateCol = 'failed_revert')
+        AND ($faultCol != 0 AND ($stateCol = '$state' $extraState))
 SQL
     $query->execute;
@@ -208,10 +213,12 @@
     my $query = undef;
 
+    my $joinTable = undef;
+    my $id = undef;
+    if (!getJoinTableAndId($self, $stage, \$joinTable, \$id)) {return -1;}
+
+    # XXX: the "update" page is now obsolete. The standard processing page should now show
+    # counts in new and update state
     if ($state eq "update") {
-
         if ($stage eq "dist") {return 0;}
-        my $joinTable = undef;
-        my $id = undef;
-        if (!getJoinTableAndId($self, $stage, \$joinTable, \$id)) {return -1;}
 
         if ($stage eq "chip" || $stage eq "fake" || $stage eq "warp" || $stage eq "diff" || $stage eq "magicDS") {
@@ -226,12 +233,11 @@
         }
         else {
-        
             $query = $self->{_db}->prepare(<<SQL);
             SELECT COUNT(state)
-                FROM $table JOIN $joinTable 
-                USING($id) 
+                FROM $table
                 WHERE label LIKE '$label'
                 AND state = 'update'; 
 SQL
+        
         }
 
@@ -240,10 +246,21 @@
     elsif ($state eq "new") {
 
-        $query = $self->{_db}->prepare(<<SQL);
-        SELECT COUNT(state)  
-            FROM $table 
-            WHERE label LIKE '$label' 
-            AND (state = 'new' OR state = 'update')
-SQL
+        if ($stage eq "chip" || $stage eq "fake" || $stage eq "warp" || $stage eq "diff" || $stage eq "magicDS") {
+            # get count of runs in new state and update state that have components left to update
+            $query = $self->{_db}->prepare(<<SQL);
+            SELECT COUNT(DISTINCT $id)  
+                FROM $table LEFT JOIN $joinTable
+                USING($id)
+                WHERE label LIKE '$label' 
+                AND (state = 'new' OR (state = 'update' AND data_state = 'update'))
+SQL
+        } else {
+            $query = $self->{_db}->prepare(<<SQL);
+            SELECT COUNT(state)
+                FROM $table
+                WHERE label LIKE '$label'
+                AND (state = 'new' OR state = 'update'); 
+SQL
+        }
     }
     else {
@@ -256,4 +273,6 @@
 SQL
     }
+
+    # print $query->{Statement} . "\n";
 
     $query->execute;
Index: branches/eam_branches/ipp-ops-20130712/ippMonitor/czartool/czartool/czarconfig.xml
===================================================================
--- branches/eam_branches/ipp-ops-20130712/ippMonitor/czartool/czartool/czarconfig.xml	(revision 37064)
+++ branches/eam_branches/ipp-ops-20130712/ippMonitor/czartool/czartool/czarconfig.xml	(revision 37068)
@@ -27,5 +27,5 @@
   <gpc1database>
     <name>gpc1</name>
-    <host>scidbm</host>
+    <host>scidbs1</host>
     <user>ippuser</user>
     <password>ippuser</password>
@@ -47,5 +47,5 @@
     <serverinterval>20 MINUTE</serverinterval>
     <!-- whitespace-separated server list for servers we want roboczar to check --> 
-    <interestedservers>stdscience distribution summitcopy registration stack publishing pstamp </interestedservers>
+    <interestedservers>stdscience distribution summitcopy registration stack pstamp </interestedservers>
     <!-- <interestedservers>pstamp</interestedservers> -->
   </roboczar>
Index: branches/eam_branches/ipp-ops-20130712/ippMonitor/def/camIQstats.d
===================================================================
--- branches/eam_branches/ipp-ops-20130712/ippMonitor/def/camIQstats.d	(revision 37064)
+++ branches/eam_branches/ipp-ops-20130712/ippMonitor/def/camIQstats.d	(revision 37068)
@@ -10,4 +10,7 @@
 WHERE camProcessedExp.cam_id  = camRun.cam_id
 WHERE camProcessedExp.fault = 0
+
+RESTRICT_COUNT AND dateobs >= CURDATE()
+UNRESTRICTED AND dateobs >= CURDATE()
 
 ARGS  ARG1  rawImfile.exp_id=$rawExp.exp_id
Index: branches/eam_branches/ipp-ops-20130712/ippMonitor/def/camProcessedExp.d
===================================================================
--- branches/eam_branches/ipp-ops-20130712/ippMonitor/def/camProcessedExp.d	(revision 37064)
+++ branches/eam_branches/ipp-ops-20130712/ippMonitor/def/camProcessedExp.d	(revision 37068)
@@ -10,4 +10,7 @@
 WHERE camProcessedExp.cam_id  = camRun.cam_id
 WHERE camProcessedExp.fault = 0
+
+RESTRICT_COUNT AND dateobs >= CURDATE()
+UNRESTRICTED AND dateobs >= CURDATE()
 
 # define the arguments supplied to the links below (if any)
Index: branches/eam_branches/ipp-ops-20130712/ippMonitor/def/camProcessedExp_Images.d
===================================================================
--- branches/eam_branches/ipp-ops-20130712/ippMonitor/def/camProcessedExp_Images.d	(revision 37064)
+++ branches/eam_branches/ipp-ops-20130712/ippMonitor/def/camProcessedExp_Images.d	(revision 37068)
@@ -3,6 +3,4 @@
 FILE  camProcessedExp_Images.php
 MENU  ipp.science.dat
-
-UNRESTRICTED AND 0>1
 
 # the following WHERE clauses are added to all queries joined by AND
@@ -12,4 +10,8 @@
 WHERE camProcessedExp.cam_id  = camRun.cam_id
 WHERE camProcessedExp.fault = 0
+
+RESTRICT_COUNT AND dateobs >= CURDATE()
+UNRESTRICTED AND dateobs >= CURDATE()
+
 # define image names to be used below
 # IMAGE VAR basename filerule camera class_id
Index: branches/eam_branches/ipp-ops-20130712/ippMonitor/def/camProcessedExp_NoImages.d
===================================================================
--- branches/eam_branches/ipp-ops-20130712/ippMonitor/def/camProcessedExp_NoImages.d	(revision 37064)
+++ branches/eam_branches/ipp-ops-20130712/ippMonitor/def/camProcessedExp_NoImages.d	(revision 37068)
@@ -10,4 +10,7 @@
 WHERE camProcessedExp.cam_id  = camRun.cam_id
 WHERE camProcessedExp.fault = 0
+
+RESTRICT_COUNT AND dateobs >= CURDATE()
+UNRESTRICTED AND dateobs >= CURDATE()
 
 # define the arguments supplied to the links below (if any)
Index: branches/eam_branches/ipp-ops-20130712/ippMonitor/def/camProcessedImfile.d
===================================================================
--- branches/eam_branches/ipp-ops-20130712/ippMonitor/def/camProcessedImfile.d	(revision 37064)
+++ branches/eam_branches/ipp-ops-20130712/ippMonitor/def/camProcessedImfile.d	(revision 37068)
@@ -10,4 +10,7 @@
 WHERE camProcessedExp.cam_id = camRun.cam_id
 WHERE chipProcessedImfile.chip_id = camRun.chip_id
+
+RESTRICT_COUNT AND dateobs >= CURDATE()
+UNRESTRICTED AND dateobs >= CURDATE()
 
 ARGS  ARG1  rawImfile.exp_id=$rawExp.exp_id
Index: branches/eam_branches/ipp-ops-20130712/ippMonitor/def/camStageExp.d
===================================================================
--- branches/eam_branches/ipp-ops-20130712/ippMonitor/def/camStageExp.d	(revision 37064)
+++ branches/eam_branches/ipp-ops-20130712/ippMonitor/def/camStageExp.d	(revision 37068)
@@ -6,4 +6,7 @@
 WHERE camRun.chip_id = chipRun.chip_id
 WHERE chipRun.exp_id = rawExp.exp_id
+
+RESTRICT_COUNT AND dateobs >= CURDATE()
+UNRESTRICTED AND dateobs >= CURDATE()
 
 ARGS  ARG1  rawImfile.exp_id=$rawExp.exp_id
Index: branches/eam_branches/ipp-ops-20130712/ippMonitor/def/chipIQstats.d
===================================================================
--- branches/eam_branches/ipp-ops-20130712/ippMonitor/def/chipIQstats.d	(revision 37064)
+++ branches/eam_branches/ipp-ops-20130712/ippMonitor/def/chipIQstats.d	(revision 37068)
@@ -8,4 +8,7 @@
 WHERE chipRun.exp_id = rawExp.exp_id
 WHERE chipRun.chip_id = chipProcessedImfile.chip_id
+
+RESTRICT_COUNT AND dateobs >= CURDATE()
+UNRESTRICTED AND dateobs >= CURDATE()
 
 ARGS  ARG1  rawImfile.exp_id=$rawExp.exp_id
Index: branches/eam_branches/ipp-ops-20130712/ippMonitor/def/chipProcessedExp.d
===================================================================
--- branches/eam_branches/ipp-ops-20130712/ippMonitor/def/chipProcessedExp.d	(revision 37064)
+++ branches/eam_branches/ipp-ops-20130712/ippMonitor/def/chipProcessedExp.d	(revision 37068)
@@ -7,4 +7,7 @@
 WHERE chipRun.state != 'new'
 WHERE chipRun.exp_id = rawExp.exp_id
+
+RESTRICT_COUNT AND dateobs >= CURDATE()
+UNRESTRICTED AND dateobs >= CURDATE()
 
 ARGS  ARG1  rawImfile.exp_id=$rawExp.exp_id
Index: branches/eam_branches/ipp-ops-20130712/ippMonitor/def/chipProcessedImfile.d
===================================================================
--- branches/eam_branches/ipp-ops-20130712/ippMonitor/def/chipProcessedImfile.d	(revision 37064)
+++ branches/eam_branches/ipp-ops-20130712/ippMonitor/def/chipProcessedImfile.d	(revision 37068)
@@ -9,4 +9,7 @@
 WHERE chipProcessedImfile.chip_id = chipRun.chip_id
 WHERE chipProcessedImfile.fault = 0
+
+RESTRICT_COUNT AND dateobs >= CURDATE()
+UNRESTRICTED AND dateobs >= CURDATE()
 
 #UNRESTRICTED WHERE 0=1
Index: branches/eam_branches/ipp-ops-20130712/ippMonitor/def/chipStageExp.d
===================================================================
--- branches/eam_branches/ipp-ops-20130712/ippMonitor/def/chipStageExp.d	(revision 37064)
+++ branches/eam_branches/ipp-ops-20130712/ippMonitor/def/chipStageExp.d	(revision 37068)
@@ -5,4 +5,7 @@
 
 WHERE chipRun.exp_id = rawExp.exp_id
+
+RESTRICT_COUNT AND dateobs >= CURDATE()
+UNRESTRICTED AND dateobs >= CURDATE()
 
 ARGS  ARG1  rawImfile.exp_id=$rawExp.exp_id
Index: branches/eam_branches/ipp-ops-20130712/ippMonitor/def/diffInputSkyfile.d
===================================================================
--- branches/eam_branches/ipp-ops-20130712/ippMonitor/def/diffInputSkyfile.d	(revision 37064)
+++ branches/eam_branches/ipp-ops-20130712/ippMonitor/def/diffInputSkyfile.d	(revision 37068)
@@ -5,4 +5,7 @@
 
 WHERE diffInputSkyfile.diff_id = diffRun.diff_id
+
+RESTRICT_COUNT AND 0 = 1
+UNRESTRICTED AND 0 = 1
 
 #        field                            size format  name           show     link to         extras
Index: branches/eam_branches/ipp-ops-20130712/ippMonitor/def/diffProcessedSkyfile.d
===================================================================
--- branches/eam_branches/ipp-ops-20130712/ippMonitor/def/diffProcessedSkyfile.d	(revision 37064)
+++ branches/eam_branches/ipp-ops-20130712/ippMonitor/def/diffProcessedSkyfile.d	(revision 37068)
@@ -7,4 +7,7 @@
 # WHERE diffRun.state = 'full'
 # WHERE diffSkyfile.fault = 0
+
+RESTRICT_COUNT AND 0 = 1
+UNRESTRICTED AND 0 = 1
 
 ARGS  ARG7 diffSkyfile.diff_id=$diffSkyfile.diff_id
Index: branches/eam_branches/ipp-ops-20130712/ippMonitor/def/diffProcessedSkyfile_Images.d
===================================================================
--- branches/eam_branches/ipp-ops-20130712/ippMonitor/def/diffProcessedSkyfile_Images.d	(revision 37064)
+++ branches/eam_branches/ipp-ops-20130712/ippMonitor/def/diffProcessedSkyfile_Images.d	(revision 37068)
@@ -3,4 +3,7 @@
 FILE  diffProcessedSkyfile_Images.php
 MENU  ipp.stack.dat
+
+#RESTRICT_COUNT AND dateobs >= CURDATE()
+#UNRESTRICTED AND dateobs >= CURDATE()
 
 UNRESTRICTED AND 0>1
Index: branches/eam_branches/ipp-ops-20130712/ippMonitor/def/diffRun.d
===================================================================
--- branches/eam_branches/ipp-ops-20130712/ippMonitor/def/diffRun.d	(revision 37064)
+++ branches/eam_branches/ipp-ops-20130712/ippMonitor/def/diffRun.d	(revision 37068)
@@ -3,4 +3,7 @@
 FILE  diffRun.php
 MENU  ipp.stack.dat
+
+#RESTRICT_COUNT WHERE dateobs >= CURDATE()
+#UNRESTRICTED WHERE dateobs >= CURDATE()
 
 #        field        size  format  name           show     link to         extras
Index: branches/eam_branches/ipp-ops-20130712/ippMonitor/def/rawBurntoolState.d
===================================================================
--- branches/eam_branches/ipp-ops-20130712/ippMonitor/def/rawBurntoolState.d	(revision 37064)
+++ branches/eam_branches/ipp-ops-20130712/ippMonitor/def/rawBurntoolState.d	(revision 37068)
@@ -5,6 +5,7 @@
 
 # if no query restrictions are supplied, we want to limit the query or it is extremely long running:
-RESTRICT_COUNT WHERE 0>1
-UNRESTRICTED WHERE exp_id = 0
+RESTRICT_COUNT WHERE dateobs >= CURDATE()
+# UNRESTRICTED WHERE exp_id = 0
+UNRESTRICTED WHERE dateobs >= CURDATE()
 
 #        field        size format  name           show          link to   extras
Index: branches/eam_branches/ipp-ops-20130712/ippMonitor/def/warpProcessedSkyfiles.d
===================================================================
--- branches/eam_branches/ipp-ops-20130712/ippMonitor/def/warpProcessedSkyfiles.d	(revision 37064)
+++ branches/eam_branches/ipp-ops-20130712/ippMonitor/def/warpProcessedSkyfiles.d	(revision 37068)
@@ -4,5 +4,6 @@
 MENU  ipp.science.dat
 
-UNRESTRICTED WHERE 0=1
+RESTRICT_COUNT WHERE dateobs >= CURDATE()
+UNRESTRICTED WHERE dateobs >= CURDATE()
 
 ARGS  ARG1  rawImfile.exp_id=$rawExp.exp_id
Index: branches/eam_branches/ipp-ops-20130712/ippMonitor/def/warpProcessedSkyfiles_Images.d
===================================================================
--- branches/eam_branches/ipp-ops-20130712/ippMonitor/def/warpProcessedSkyfiles_Images.d	(revision 37064)
+++ branches/eam_branches/ipp-ops-20130712/ippMonitor/def/warpProcessedSkyfiles_Images.d	(revision 37068)
@@ -4,5 +4,8 @@
 MENU  ipp.science.dat
 
-UNRESTRICTED WHERE 0=1
+RESTRICT_COUNT WHERE dateobs >= CURDATE()
+UNRESTRICTED WHERE dateobs >= CURDATE()
+
+# UNRESTRICTED WHERE 0=1
 
 # WHERE warpSkyfile.warp_id = warpRun.warp_id
