Changeset 30392 for trunk/ippMonitor/raw/czartool_labels.php
- Timestamp:
- Jan 27, 2011, 3:23:16 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
r30381 r30392 66 66 echo "<p align=\"center\"> Current status of the IPP as of $lastUpdateTime (faults are shown in parentheses). <br>Documentation can be found <a href=\"http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/Processing\">here</a> and cluster load monitored <a href=\"http://ganglia.pan-starrs.ifa.hawaii.edu/?r=hour&s=descending&c=IPP%2520Production\">here</a><br>Current nightly science status: $nsStatus<br>Use <a href=\"$link\"> $plotTypeLink</a> plots <br/><a href=\"http://ipp004.ifa.hawaii.edu/clusterMonitor/top.html\">Who uses the cluster?</a><br><a href=\"http://ipp004.ifa.hawaii.edu/ippMetrics\">IPP Metrics</a><br/><a href=\"http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/PS1_IPP_CzarLogs\">Czar log pages</a><br><a href=\"czartool_exposures.php?pass=$pass&proj=$proj\">Exposure summary</a></p>"; 67 67 68 69 68 // deal with reverts: turn on or off if requested and pass current revert state for this stage onto labels table later 70 69 if ($selectedRevertStage && $selectedRevertMode) turnRevertsOnOff($czardb, $selectedRevertStage, $selectedRevertMode); … … 182 181 echo "<td> \n"; 183 182 $today = date("Y-m-d"); 184 showSummitData($gpc1db, $today);183 createSummitDataTable($gpc1db, $today); 185 184 echo "</td>\n"; 186 185 echo "</tr>\n"; … … 189 188 echo "</tr>\n"; 190 189 191 192 190 # 4th row 191 echo "<tr>\n"; 192 echo "<td> \n"; 193 echo "<table>\n"; 194 echo "<tr valign=top>\n"; 195 echo "<td> \n"; 196 if ($selectedServer && !$serverCmd) showServerStatus($selectedServer); 197 echo "</td>\n"; 198 echo "<td>\n"; 199 createDatesTable($czardb); 200 echo "</td>\n"; 201 echo "</tr>\n"; 202 echo "</table>\n"; 203 echo "</td> \n"; 204 echo "</tr>\n"; 205 206 # 5th row 193 207 echo "<tr>\n"; 194 208 echo "<td>\n"; … … 206 220 showReplicationsStatus($REPL_HOST_GPC1, $REPL_USER_GPC1, $REPL_PASSWORD_GPC1, $REPL_DBNAME_GPC1); 207 221 showReplicationsStatus($REPL_HOST_NEBULOUS, $REPL_USER_NEBULOUS, $REPL_PASSWORD_NEBULOUS, $REPL_DBNAME_NEBULOUS); 222 208 223 echo "</table>"; 209 224 echo "</td>\n"; … … 213 228 echo "</tr>\n"; 214 229 215 # 5th row216 echo "<tr>\n";217 echo "<td> \n";218 echo "<table>\n";219 echo "<tr valign=top>\n";220 echo "<td> \n";221 # server output222 if ($selectedServer && !$serverCmd) showServerStatus($selectedServer);223 echo "</td>\n";224 echo "<td>\n";225 echo "</td>\n";226 echo "</tr>\n";227 echo "</table>\n";228 echo "</td> \n";229 echo "</tr>\n";230 231 230 echo "</table>\n"; 232 231 … … 236 235 ########################################################################### 237 236 # 238 # C hecks summitExp table agains rawExp table239 # 240 ########################################################################### 241 function showSummitData($gpc1db, $date) {237 # Creates a table of summitExp against rawExp 238 # 239 ########################################################################### 240 function createSummitDataTable($gpc1db, $date) { 242 241 243 242 $sql = "SELECT DISTINCT exp_type FROM summitExp WHERE dateobs > '$date'"; … … 590 589 ########################################################################### 591 590 # 591 # Populates a tables with the current dates listed in the server_dates table 592 # 593 ########################################################################### 594 function createDatesTable($db) { 595 596 $class = "list"; 597 echo "<table class=$class>\n"; 598 echo "<tr><td></td>\n"; 599 write_header_cell($class, "Server"); 600 write_header_cell($class, "Dates"); 601 echo "</tr>\n"; 602 603 createServerDateRow($db, "stdscience"); 604 createServerDateRow($db, "registration"); 605 606 echo "</table>\n"; 607 } 608 609 610 ########################################################################### 611 # 612 # Checks the status of all the pantasks servers 613 # 614 ########################################################################### 615 function createServerDateRow($db, $server) { 616 617 $sql = "SELECT date FROM server_dates WHERE server LIKE '$server' ORDER BY date"; 618 if ($debug) {echo "$sql<br>";} 619 620 $qry = $db->query($sql); 621 if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";} 622 $dates = ""; 623 $firstIn = true; 624 while ($qry->fetchInto($row)) { 625 626 if ($firstIn) { 627 628 $dates = $row[0]; 629 $firstIn = false; 630 } 631 else $dates = $dates . ", " . $row[0]; 632 } 633 634 $class = "list"; 635 echo "<tr><td></td>\n"; 636 write_table_cell($class, '%s', "", $server); 637 write_table_cell($class, '%s', "", $dates); 638 echo "</tr>\n"; 639 640 } 641 642 ########################################################################### 643 # 592 644 # Checks the status of all the pantasks servers 593 645 # … … 633 685 ."&plottype=".$plotType; 634 686 635 $link = ""; # TODO removed links temporarily636 write_table_cell($class, '%s', $link, $server);687 #$link = ""; # TODO removed links temporarily 688 write_table_cell($class, '%s', $link, $server); 637 689 write_table_cell($class, '%s', "", $alive ? "yes" : "NO"); 638 690
Note:
See TracChangeset
for help on using the changeset viewer.
