Changeset 40883
- Timestamp:
- Sep 12, 2019, 11:30:59 AM (7 years ago)
- File:
-
- 1 edited
-
trunk/ippMonitor/raw/czartool_labels.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippMonitor/raw/czartool_labels.php
r40862 r40883 399 399 $qry2->fetchInto($summit); 400 400 401 401 402 $sql = "SELECT COUNT(*) FROM summitExp JOIN rawExp ON summitExp.exp_name = rawExp.exp_name WHERE summitExp.dateobs > '$date' AND rawExp.dateobs > '$date' AND summitExp.exp_type = '$expType[0]'"; 402 403 $qry2 = $projectdb->query($sql); … … 407 408 $qry2->fetchInto($dropped); 408 409 410 411 #Query with 30 minutes delay to check during the night if any exposures are missing. 412 $datehour = gmdate("Y-m-d H:i:s"); 413 $sql = "SELECT COUNT(*) FROM summitExp left join pzDownloadExp using (summit_id) WHERE dateobs > '$date' AND dateobs <= date_sub('$datehour', interval 30 minute) AND exp_type = '$expType[0]' and (state != 'drop' or state is null) and fault != 1042"; 414 $qry2 = $projectdb->query($sql); 415 $qry2->fetchInto($summitdelay); 416 417 $sql = "SELECT COUNT(*) FROM summitExp JOIN rawExp ON summitExp.exp_name = rawExp.exp_name WHERE summitExp.dateobs > '$date' AND summitExp.dateobs <= date_sub('$datehour', interval 30 minute) AND rawExp.dateobs > '$date' AND summitExp.exp_type = '$expType[0]'"; 418 $qry2 = $projectdb->query($sql); 419 $qry2->fetchInto($mhpccdelay); 420 409 421 echo "<tr>"; 410 422 411 if ($summit[0] == $mhpcc[0]) $error = 0; 423 $DLdiff = $summit[0] - $mhpcc[0]; 424 if ($DLdiff == 0) $error = 0; 412 425 else $error = 1; 426 427 $delayDLdiff = $summitdelay[0] - $mhpccdelay[0]; 428 if ($delayDLdiff == 0) $errordelay = 0; 429 else $errordelay = 1; 413 430 414 431 echo "<td>$expType[0]</td>"; 415 432 echo "<td>$summit[0]</td>"; 416 createFormattedTableCell("", "", $mhpcc[0], $error, 0); 433 #createFormattedTableCell("", "", $mhpcc[0], $error, 0); 434 if ($delayDLdiff==0) { 435 createFormattedTableCell("", "", $mhpcc[0], $error, 0); 436 } else { 437 $DLStatus = "<font style=\"BACKGROUND-COLOR: yellow\" color=\"red\">$mhpcc[0] ($delayDLdiff)</font>"; 438 echo "<td>$DLStatus</td>"; 439 } 440 417 441 echo "<td>$dropped[0]</td>"; 418 442 … … 482 506 createTableColumnHeader("Chunk"); 483 507 createTableColumnHeader("Nobs_1stvisit"); 484 createTableColumnHeader("Nobs_4visits ");508 createTableColumnHeader("Nobs_4visits(bad cam)"); 485 509 createTableColumnHeader("Ndiffs_published"); 486 510 createTableColumnHeader("Completion"); … … 492 516 $Nfirstvisits = 0; 493 517 $Nfourvisits = 0; 518 $badcam = 0; 494 519 495 520 $chunkname = $row[0]; … … 533 558 } 534 559 560 #also query for bad quality camRun exposures 561 $query4 = "SELECT count(*) "; 562 $query4 .= " FROM rawExp"; 563 $query4 .= " JOIN chipRun USING (exp_id)"; 564 $query4 .= " JOIN camRun USING (chip_id)"; 565 $query4 .= " JOIN camProcessedExp USING (cam_id)"; 566 $query4 .= " WHERE dateobs LIKE '$date%'"; 567 $query4 .= " AND exp_id > $refExpID[0]"; 568 $query4 .= " AND exp_type = 'OBJECT'"; 569 $query4 .= " AND substr(comment, 1, position(' ' in comment)) LIKE '$chunkname%'"; 570 $query4 .= " AND (camProcessedExp.quality > 0)"; 571 $qry4 = $projectdb->query($query4); 572 $qry4->fetchInto($badcam); 573 574 575 535 576 echo "<tr>"; 536 577 537 578 echo "<td>$chunkname</td>"; 538 579 echo "<td>$Nfirstvisits</td>"; 539 echo "<td>$Nfourvisits</td>"; 580 if ($badcam[0]==0) { 581 echo "<td>$Nfourvisits</td>"; 582 } else { 583 $DLStatus = "<font style=\"BACKGROUND-COLOR: yellow\" color=\"red\">$Nfourvisits ($badcam[0])</font>"; 584 echo "<td>$DLStatus</td>"; 585 } 540 586 echo "<td>$Ndiffs</td>"; 541 587 echo "<td>$complete</td>";
Note:
See TracChangeset
for help on using the changeset viewer.
