Changeset 30939
- Timestamp:
- Mar 17, 2011, 12:12:26 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippMonitor/raw/czartool_labels.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippMonitor/raw/czartool_labels.php
r30937 r30939 73 73 echo "<tr><td>ippMonitor SVN version</td><td>"; include 'version.php'; echo "</td></tr>"; 74 74 echo "<tr><td>Current nightly science status</td><td>$nsStatus</td></tr>"; 75 echo "<tr><td>Postage stamp server status</td><td><a href=\"http://pstamp.ipp.ifa.hawaii.edu/status.php\"><font color=\"blue\">here</font></a></td></tr>"; 75 76 echo "<tr><td>Documentation</td><td><a href=\"http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/Processing\"><font color=\"blue\">here</font></a></td></tr>"; 76 77 echo "<tr><td>Cluster load</td><td><a href=\"http://ganglia.pan-starrs.ifa.hawaii.edu/?r=hour&s=descending&c=IPP%2520Production\"><font color=\"blue\">here</font></a></td></tr>"; … … 290 291 291 292 if ($expType[0] == "OBJECT") $msg = "All science exposures taken since $date<br>have been registered at MHPCC"; 292 $ color = "";293 $error = 0; 293 294 } 294 295 else { 295 296 if ($expType[0] == "OBJECT") $msg = "<font color=\"red\">Warning: Not all science exposures taken since $date<br>have been registered at MHPCC</a>"; 296 $ color = "red";297 $error = 1; 297 298 } 298 299 … … 300 301 echo "<td>$summit[0]</td>"; 301 302 302 echo "<td bgcolor=\"$color\">$mhpcc[0]</td>"; 303 304 305 #echo "<td bgcolor=\"$color\">$mhpcc[0]</td>"; 306 createFormattedTableCell("", "", $mhpcc[0], $error); 303 307 304 308 echo "</tr>"; … … 416 420 ."&plottype=".$plotType; 417 421 418 create LabelTableCell($showLink, $link, $stage, "blue");422 createFormattedTableCell($showLink, $link, $stage, 0); 419 423 } 420 424 … … 461 465 ."&stage=".$selectedStage 462 466 ."&plottype=".$plotType; 463 create LabelTableCell($showLink, $link, $thisLabel, "blue");467 createFormattedTableCell($showLink, $link, $thisLabel, 0); 464 468 465 469 $str = ""; … … 468 472 $link = $defaultlink; 469 473 getStateAndFaults($db, $thisLabel, $selectedState, "burntool", $str, $anyFaults); 470 create LabelTableCell($anyFaults, $link, $str, "red");474 createFormattedTableCell($anyFaults, $link, $str, $anyFaults); 471 475 472 476 $link = "failedChipProcessedImfile.php?pass=" . $pass . "&proj=" . $proj . "&chipRun.label=" . $thisLabel . "&chipRun.state=".$searchState; 473 477 getStateAndFaults($db, $thisLabel, $selectedState, "chip", $str, $anyFaults); 474 create LabelTableCell($anyFaults, $link, $str, "red");478 createFormattedTableCell($anyFaults, $link, $str, $anyFaults); 475 479 476 480 $link = "failedCamProcessedExp.php?pass=" . $pass . "&proj=" . $proj . "&camRun.label=" . $thisLabel . "&camRun.state=".$searchState; 477 481 getStateAndFaults($db, $thisLabel, $selectedState, "cam", $str, $anyFaults); 478 create LabelTableCell($anyFaults, $link, $str, "red");482 createFormattedTableCell($anyFaults, $link, $str, $anyFaults); 479 483 480 484 $link = "failedFakeProcessedImfile.php?pass=" . $pass . "&proj=" . $proj . "&fakeRun.label=" . $thisLabel . "&fakeRun.state=".$searchState; 481 485 getStateAndFaults($db, $thisLabel, $selectedState, "fake", $str, $anyFaults); 482 create LabelTableCell($anyFaults, $link, $str, "red");486 createFormattedTableCell($anyFaults, $link, $str, $anyFaults); 483 487 484 488 $link = "failedWarpSkyfiles.php?pass=" . $pass . "&proj=" . $proj . "&warpRun.label=" . $thisLabel . "&warpRun.state=".$searchState; 485 489 getStateAndFaults($db, $thisLabel, $selectedState, "warp", $str, $anyFaults); 486 create LabelTableCell($anyFaults, $link, $str, "red");490 createFormattedTableCell($anyFaults, $link, $str, $anyFaults); 487 491 488 492 $link = "failedStackSkyfile.php?pass=" . $pass . "&proj=" . $proj . "&stackRun.label=" . $thisLabel . "&stackRun.state=".$searchState; 489 493 getStateAndFaults($db, $thisLabel, $selectedState, "stack", $str, $anyFaults); 490 create LabelTableCell($anyFaults, $link, $str, "red");494 createFormattedTableCell($anyFaults, $link, $str, $anyFaults); 491 495 492 496 $link = "failedDiffSkyfile.php?pass=" . $pass . "&proj=" . $proj . "&diffRun.label=" . $thisLabel . "&diffRun.state=".$searchState; 493 497 getStateAndFaults($db, $thisLabel, $selectedState, "diff", $str, $anyFaults); 494 create LabelTableCell($anyFaults, $link, $str, "red");498 createFormattedTableCell($anyFaults, $link, $str, $anyFaults); 495 499 496 500 $link = $defaultlink; 497 501 getStateAndFaults($db, $thisLabel, $selectedState, "magic", $str, $anyFaults); 498 create LabelTableCell($anyFaults, $link, $str, "red");502 createFormattedTableCell($anyFaults, $link, $str, $anyFaults); 499 503 500 504 $link = $defaultlink; 501 505 getStateAndFaults($db, $thisLabel, $selectedState, "magicDS", $str, $anyFaults); 502 create LabelTableCell($anyFaults, $link, $str, "red");506 createFormattedTableCell($anyFaults, $link, $str, $anyFaults); 503 507 504 508 $link = $defaultlink; 505 509 getStateAndFaults($db, $thisLabel, $selectedState, "dist", $str, $anyFaults); 506 create LabelTableCell($anyFaults, $link, $str, "red");510 createFormattedTableCell($anyFaults, $link, $str, $anyFaults); 507 511 508 512 $link = "publishDone.php?pass=" . $pass . "&proj=" . $proj . "&publishRun.label=" . $thisLabel . "&publishRun.state=".$searchState; 509 513 getStateAndFaults($db, $thisLabel, $selectedState, "pub", $str, $anyFaults); 510 create LabelTableCell($anyFaults, $link, $str, "red");514 createFormattedTableCell($anyFaults, $link, $str, $anyFaults); 511 515 512 516 echo "</tr>\n"; … … 524 528 ########################################################################### 525 529 # 526 # Creates table cell for lable table 527 # 528 ########################################################################### 529 function createLabelTableCell($showLink, $link, $str, $color) { 530 531 if ($showLink) echo "<td><a href=\"$link\"><font color=\"$color\">$str</font></td>"; 532 else if ($str) echo "<td>$str</td>"; 533 else echo "<td> </td>"; 530 # Creates table cell with a red background if an error 531 # 532 ########################################################################### 533 function createFormattedTableCell($showLink, $link, $str, $error) { 534 535 $fontColor = $error ? "black" : "blue"; 536 537 if ($error) echo "<td bgcolor=\"red\">"; 538 else echo "<td>"; 539 if ($showLink) echo "<a href=\"$link\"><font color=\"$fontColor\">$str</font></td>"; 540 else if ($str) echo "$str</td>"; 541 else echo " </td>"; 534 542 } 535 543 … … 739 747 //write_table_cell($class, '%s', "", $alive ? "yes" : "NO"); 740 748 echo "<td>$server</td>"; 741 $yesNo = $alive ? "yes" : "NO"; 742 $color = $alive ? "" : "red"; 743 echo "<td bgcolor=\"$color\">$yesNo</td>"; 744 $yesNo = $running ? "yes" : "NO"; 745 $color = $running ? "" : "red"; 746 echo "<td bgcolor=\"$color\">$yesNo</td>"; 749 createFormattedTableCell(0, "", $alive ? "yes" : "NO", !$alive); 750 createFormattedTableCell(0, "", $running ? "yes" : "NO", !$running); 747 751 748 752 //if ($alive) {
Note:
See TracChangeset
for help on using the changeset viewer.
