Changeset 36680 for branches/eam_branches/ps2-tc3-20130727/ippMonitor
- Timestamp:
- Apr 21, 2014, 5:42:34 AM (12 years ago)
- Location:
- branches/eam_branches/ps2-tc3-20130727
- Files:
-
- 3 edited
-
. (modified) (1 prop)
-
ippMonitor (modified) (1 prop)
-
ippMonitor/czartool/czartool/Gpc1Db.pm (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ps2-tc3-20130727
- Property svn:mergeinfo changed
-
branches/eam_branches/ps2-tc3-20130727/ippMonitor
- Property svn:mergeinfo deleted
-
branches/eam_branches/ps2-tc3-20130727/ippMonitor/czartool/czartool/Gpc1Db.pm
r33814 r36680 139 139 my $stateCol = $table.".state"; 140 140 141 my $extraState = ""; 142 if ($state eq 'new') { 143 $extraState = " OR $stateCol = 'update' "; 144 } 145 141 146 my $query = $self->{_db}->prepare(<<SQL); 142 147 SELECT COUNT(DISTINCT $id) … … 144 149 JOIN $joinTable USING ($id) 145 150 WHERE label LIKE '$label' 146 AND ( ($faultCol != 0 AND $stateCol = '$state') OR $stateCol = 'failed_revert')151 AND ($faultCol != 0 AND ($stateCol = '$state' $extraState)) 147 152 SQL 148 153 $query->execute; … … 208 213 my $query = undef; 209 214 215 my $joinTable = undef; 216 my $id = undef; 217 if (!getJoinTableAndId($self, $stage, \$joinTable, \$id)) {return -1;} 218 219 # XXX: the "update" page is now obsolete. The standard processing page should now show 220 # counts in new and update state 210 221 if ($state eq "update") { 211 212 222 if ($stage eq "dist") {return 0;} 213 my $joinTable = undef;214 my $id = undef;215 if (!getJoinTableAndId($self, $stage, \$joinTable, \$id)) {return -1;}216 223 217 224 if ($stage eq "chip" || $stage eq "fake" || $stage eq "warp" || $stage eq "diff" || $stage eq "magicDS") { … … 226 233 } 227 234 else { 228 229 235 $query = $self->{_db}->prepare(<<SQL); 230 236 SELECT COUNT(state) 231 FROM $table JOIN $joinTable 232 USING($id) 237 FROM $table 233 238 WHERE label LIKE '$label' 234 239 AND state = 'update'; 235 240 SQL 241 236 242 } 237 243 … … 240 246 elsif ($state eq "new") { 241 247 242 $query = $self->{_db}->prepare(<<SQL); 243 SELECT COUNT(state) 244 FROM $table 245 WHERE label LIKE '$label' 246 AND (state = 'new' OR state = 'update') 247 SQL 248 if ($stage eq "chip" || $stage eq "fake" || $stage eq "warp" || $stage eq "diff" || $stage eq "magicDS") { 249 # get count of runs in new state and update state that have components left to update 250 $query = $self->{_db}->prepare(<<SQL); 251 SELECT COUNT(DISTINCT $id) 252 FROM $table LEFT JOIN $joinTable 253 USING($id) 254 WHERE label LIKE '$label' 255 AND (state = 'new' OR (state = 'update' AND data_state = 'update')) 256 SQL 257 } else { 258 $query = $self->{_db}->prepare(<<SQL); 259 SELECT COUNT(state) 260 FROM $table 261 WHERE label LIKE '$label' 262 AND (state = 'new' OR state = 'update'); 263 SQL 264 } 248 265 } 249 266 else { … … 256 273 SQL 257 274 } 275 276 # print $query->{Statement} . "\n"; 258 277 259 278 $query->execute;
Note:
See TracChangeset
for help on using the changeset viewer.
