Changeset 30951
- Timestamp:
- Mar 17, 2011, 4:19:57 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippMonitor/raw/czartool_labels.php (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippMonitor/raw/czartool_labels.php
r30949 r30951 59 59 if ($plotType == "") { $plotType = "linear"; } 60 60 61 62 // header block 63 echo "<head>"; 61 // deal with reverts: turn on or off if requested and pass current revert state for this stage onto labels table later 62 if ($selectedRevertStage && $selectedRevertMode) turnRevertsOnOff($czardb, $selectedRevertStage, $selectedRevertMode); 63 64 // tell selected server to stop or run 65 if ($selectedServer && $serverCmd) serverStopRun($czardb, $selectedServer, $serverCmd); 66 67 // tell all servers to stop or run 68 if ($allServerCmd) { 69 70 foreach ($servers as &$server) serverStopRun($czardb, $server, $allServerCmd); 71 } 72 73 74 $debug = 0; 75 76 $stdsLabels = getLabels($czardb, "stdscience"); 77 $distLabels = getLabels($czardb, "distribution"); 78 $pubLabels = getLabels($czardb, "publishing"); 79 $updateLabels = getLabels($czardb, "update"); 80 81 if ($debug) { 82 echo "prog returned $status, and output:<br>"; 83 for ($i = 0; $i < count($distLabels); $i++) { 84 echo "$distLabels[$i]<br>"; 85 } 86 } 87 88 89 // set up the form 90 echo "<form action=\"czartool_labels.php\" method=\"POST\">\n"; 91 92 echo "<input type=\"hidden\" name=\"pass\" value=\"$pass\">\n"; 93 echo "<input type=\"hidden\" name=\"proj\" value=\"$proj\">\n"; 94 echo "<input type=\"hidden\" name=\"menu\" value=\"$menu\">\n"; 95 echo "</form>\n"; 96 97 echo "<table border=\"0\">"; 98 99 echo "<tr>"; 100 echo "<td colspan=\"2\" style=\"background-color:#0080c0;\">"; 64 101 echo "<h1 align=\"middle\">Czartool</h1>"; 65 echo "</head>"; 102 echo "</td>"; 103 echo "</tr>"; 104 105 echo "<tr valign=\"top\">"; 106 echo "<td style=\"background-color:#EEEEEE;width:100px;text-align:top;\">"; 107 # time series plot 108 echo "<img src=\"czartool_getplot.php?type=t&label=$selectedLabel&stage=$selectedStage&plottype=$plotType\"><br>"; 109 # rate time series plot 110 echo "<img src=\"czartool_getplot.php?type=rt&label=$selectedLabel&stage=$selectedStage&plottype=linear\"><br>"; 111 # rate stacked histo plot 112 echo "<img src=\"czartool_getplot.php?type=rh&label=$selectedLabel&stage=$selectedStage&plottype=linear\"><br>"; 113 # histogram plot 114 echo "<img src=\"czartool_getplot.php?type=h&label=$selectedLabel&stage=$selectedStage&plottype=linear\"><br>"; 115 # storage timeseries 116 echo "<img src=\"czartool_getplot.php?type=st\"><br>"; 117 # storage plot 118 echo "<img src=\"czartool_getplot.php?type=s\"><br>"; 119 # pantasks server status, if requested 120 if ($selectedServer && !$serverCmd) showServerStatus($selectedServer); 121 echo "</td>"; 122 echo "<td style=\"background-color:#EEEEEE;height:200px;width:400px;text-align:top;\">"; 123 124 echo "<br><br>"; 66 125 67 126 // status table at top … … 83 142 echo "</table>\n"; 84 143 85 // deal with reverts: turn on or off if requested and pass current revert state for this stage onto labels table later 86 if ($selectedRevertStage && $selectedRevertMode) turnRevertsOnOff($czardb, $selectedRevertStage, $selectedRevertMode); 87 88 // tell selected server to stop or run 89 if ($selectedServer && $serverCmd) serverStopRun($czardb, $selectedServer, $serverCmd); 90 91 // tell all servers to stop or run 92 if ($allServerCmd) { 93 94 foreach ($servers as &$server) serverStopRun($czardb, $server, $allServerCmd); 95 } 96 97 98 $debug = 0; 99 100 $stdsLabels = getLabels($czardb, "stdscience"); 101 $distLabels = getLabels($czardb, "distribution"); 102 $pubLabels = getLabels($czardb, "publishing"); 103 $updateLabels = getLabels($czardb, "update"); 104 105 if ($debug) { 106 echo "prog returned $status, and output:<br>"; 107 for ($i = 0; $i < count($distLabels); $i++) { 108 echo "$distLabels[$i]<br>"; 109 } 110 } 111 112 113 // set up the form 114 echo "<form action=\"czartool_labels.php\" method=\"POST\">\n"; 115 116 echo "<input type=\"hidden\" name=\"pass\" value=\"$pass\">\n"; 117 echo "<input type=\"hidden\" name=\"proj\" value=\"$proj\">\n"; 118 echo "<input type=\"hidden\" name=\"menu\" value=\"$menu\">\n"; 119 echo "</form>\n"; 120 121 echo "<table border="0">"; 122 123 echo "<tr>"; 124 echo "<td colspan=\"2\" style=\"background-color:#FFA500;\">"; 125 echo "<h1>Main Title of Web Page</h1>"; 126 echo "</td>"; 127 echo "</tr>"; 128 129 echo "<tr valign=\"top\">"; 130 echo "<td style=\"background-color:#FFD700;width:100px;text-align:top;\">"; 131 echo "<b>Menu</b><br />"; 132 echo "HTML<br/>"; 133 echo "CSS<br/>"; 134 echo "JavaScript"; 135 echo "</td>"; 136 echo "<td style=\"background-color:#EEEEEE;height:200px;width:400px;text-align:top;\">"; 137 echo "<table>\n"; 138 139 # 1st row 140 echo "<tr>\n"; 141 echo "<td> \n"; 142 echo "<table>\n"; 143 echo "<tr valign=center>\n"; 144 echo "<td> \n"; 145 # timeseries plot 146 echo "<img src=\"czartool_getplot.php?type=t&label=$selectedLabel&stage=$selectedStage&plottype=$plotType\"><br>"; 147 echo "</td>\n"; 148 echo "<td>\n"; 144 echo "<br><br>"; 145 149 146 createLabelsTable($pass, 150 147 $proj, … … 160 157 $selectedStage, 161 158 $plotType); 162 echo "</td>\n"; 163 echo "</tr>\n"; 164 echo "</table>\n"; 165 echo "</td> \n"; 166 echo "</tr>\n"; 167 168 # 2nd row 169 echo "<tr>\n"; 170 echo "<td> \n"; 171 echo "<table>\n"; 172 echo "<tr valign=center>\n"; 173 echo "<td> \n"; 174 # rate plot 175 echo "<img src=\"czartool_getplot.php?type=rt&label=$selectedLabel&stage=$selectedStage&plottype=linear\"><br>"; 176 echo "</td>\n"; 177 echo "<td>\n"; 159 160 echo "<br><br>"; 178 161 createLabelsTable($pass, 179 162 $proj, … … 189 172 $selectedStage, 190 173 $plotType); 191 echo "</td>\n"; 192 echo "</tr>\n"; 193 echo "</table>\n"; 194 echo "</td> \n"; 195 echo "</tr>\n"; 196 197 198 # 3rd row 199 echo "<tr>\n"; 200 echo "<td> \n"; 201 echo "<table>\n"; 202 echo "<tr valign=top>\n"; 203 echo "<td> \n"; 204 # histogram plot 205 echo "<img src=\"czartool_getplot.php?type=h&label=$selectedLabel&stage=$selectedStage&plottype=linear\"><br>"; 206 echo "</td>\n"; 207 echo "<td>\n"; 174 echo "<br><br>"; 208 175 createServersTable($pass, $proj,$czardb, $servers, $selectedLabel, $selectedStage, $plotType); 209 echo "</td>\n"; 210 211 echo "<td> \n"; 212 $today = date("Y-m-d"); 213 createSummitDataTable($gpc1db, $today); 214 echo "</td>\n"; 215 echo "</tr>\n"; 216 echo "</table>\n"; 217 echo "</td> \n"; 218 echo "</tr>\n"; 219 220 # 4th row 221 echo "<tr>\n"; 222 echo "<td> \n"; 223 echo "<table>\n"; 224 echo "<tr valign=top>\n"; 225 echo "<td> \n"; 226 # storage plot 227 echo "<img src=\"czartool_getplot.php?type=s\"><br>"; 228 echo "</td>\n"; 229 echo "<td>\n"; 230 231 echo "<table>\n"; 232 echo "<tr>\n"; 233 echo "<td>\n"; 234 createDatesTable($czardb); 235 echo "</td>\n"; 236 echo "</tr>\n"; 237 echo "<tr>\n"; 238 echo "<td>\n"; 239 createPStampDataTable(); 240 echo "</td>\n"; 241 echo "</tr>\n"; 242 echo "<tr>\n"; 243 echo "<td>\n"; 244 if ($selectedServer && !$serverCmd) showServerStatus($selectedServer); 245 echo "</td>\n"; 246 echo "</tr>\n"; 247 echo "<tr>\n"; 248 echo "<td>\n"; 249 # This is awful 250 echo "<table border=\"1\" cellspacing=\"0\" cellpadding=\"4\" style=\"font-size:80%\">\n"; 251 echo "<tr>"; 252 echo "<th colspan=\"2\">Database replication status (update fix log <a href=\"http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/Replication_Issues\">here</a>)</th>"; 253 echo "<tr>"; 254 echo "<th>Database</th>"; 255 echo "<th>Status</th>"; 256 showReplicationsStatus($REPL_HOST_GPC1, $REPL_USER_GPC1, $REPL_PASSWORD_GPC1, $REPL_DBNAME_GPC1); 257 showReplicationsStatus($REPL_HOST_NEBULOUS, $REPL_USER_NEBULOUS, $REPL_PASSWORD_NEBULOUS, $REPL_DBNAME_NEBULOUS); 258 showReplicationsStatus($REPL_HOST_PSTAMP, $REPL_USER_PSTAMP, $REPL_PASSWORD_PSTAMP, $REPL_DBNAME_PSTAMP); 259 echo "</table>"; 260 echo "</td>\n"; 261 echo "</tr>\n"; 262 echo "</table>\n"; 263 264 echo "</td>\n"; 265 echo "</tr>\n"; 266 echo "</table>\n"; 267 echo "</td> \n"; 268 echo "</tr>\n"; 269 270 echo "</td>"; 271 echo "</tr>"; 272 273 echo "<tr>"; 274 echo "<td colspan=\"2\" style=\"background-color:#FFA500;text-align:center;\">"; 275 echo "Copyright © 2011 W3Schools.com</td>"; 276 echo "</tr>"; 277 278 echo "</table>"; 176 echo "<br><br>"; 177 createSummitDataTable($gpc1db); 178 echo "<br><br>"; 179 createDatesTable($czardb); 180 echo "<br><br>"; 181 createPStampDataTable(); 182 echo "<br><br>"; 183 # This is awful 184 echo "<table align=\"middle\" border=\"1\" cellspacing=\"0\" cellpadding=\"4\" style=\"font-size:80%\">\n"; 185 echo "<tr>"; 186 echo "<th colspan=\"2\">Database replication status (update fix log <a href=\"http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/Replication_Issues\">here</a>)</th>"; 187 echo "<tr>"; 188 echo "<th>Database</th>"; 189 echo "<th>Status</th>"; 190 showReplicationsStatus($REPL_HOST_GPC1, $REPL_USER_GPC1, $REPL_PASSWORD_GPC1, $REPL_DBNAME_GPC1); 191 showReplicationsStatus($REPL_HOST_NEBULOUS, $REPL_USER_NEBULOUS, $REPL_PASSWORD_NEBULOUS, $REPL_DBNAME_NEBULOUS); 192 showReplicationsStatus($REPL_HOST_PSTAMP, $REPL_USER_PSTAMP, $REPL_PASSWORD_PSTAMP, $REPL_DBNAME_PSTAMP); 193 echo "</table>"; 194 279 195 echo "</table>"; 280 196 … … 300 216 301 217 // set up the table 302 echo "<table border=\"1\" cellspacing=\"0\" cellpadding=\"4\" style=\"font-size:80%\">\n";218 echo "<table align=\"middle\" border=\"1\" cellspacing=\"0\" cellpadding=\"4\" style=\"font-size:80%\">\n"; 303 219 echo "<tr>"; 304 220 echo "<th colspan=\"3\">Postage stamp requests</th>"; … … 329 245 # 330 246 ########################################################################### 331 function createSummitDataTable($gpc1db, $date) { 332 247 function createSummitDataTable($gpc1db) { 248 249 $date = date("Y-m-d"); 333 250 $sql = "SELECT DISTINCT exp_type FROM summitExp WHERE dateobs > '$date'"; 334 251 … … 341 258 342 259 // set up the table 343 echo "<table border=\"1\" cellspacing=\"0\" cellpadding=\"4\" style=\"font-size:80%\">\n";260 echo "<table align=\"middle\" border=\"1\" cellspacing=\"0\" cellpadding=\"4\" style=\"font-size:80%\">\n"; 344 261 echo "<tr>"; 345 262 echo "<th colspan=\"3\">Status of last night's data</th>"; … … 429 346 430 347 // setup table 431 echo "<table border=\"1\" cellspacing=\"0\" cellpadding=\"4\" style=\"font-size:80%\">\n";348 echo "<table align=\"middle\" border=\"1\" cellspacing=\"0\" cellpadding=\"4\" style=\"font-size:80%\">\n"; 432 349 echo "<tr>\n"; 433 350 echo "<th colspan=\"13\">"; … … 722 639 function createDatesTable($db) { 723 640 724 echo "<table border=\"1\" cellspacing=\"0\" cellpadding=\"4\" style=\"font-size:80%\">\n";641 echo "<table align=\"middle\" border=\"1\" cellspacing=\"0\" cellpadding=\"4\" style=\"font-size:80%\">\n"; 725 642 echo "<tr>\n"; 726 643 echo "<th colspan=\"3\">Current dates for selected pantasks servers</th>"; … … 776 693 777 694 // set up table columns 778 echo "<table border=\"1\" cellspacing=\"0\" cellpadding=\"4\" style=\"font-size:80%\">\n";695 echo "<table align=\"middle\" border=\"1\" cellspacing=\"0\" cellpadding=\"4\" style=\"font-size:80%\">\n"; 779 696 echo "<tr>"; 780 697 echo "<th colspan=\"3\">Pantasks server status</th>";
Note:
See TracChangeset
for help on using the changeset viewer.
