- Timestamp:
- Aug 26, 2010, 9:18:39 AM (16 years ago)
- Location:
- branches/sc_branches/trunkTest
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippMonitor/raw/czartool_labels.php (modified) (15 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/sc_branches/trunkTest
- Property svn:mergeinfo changed
-
branches/sc_branches/trunkTest/ippMonitor/raw/czartool_labels.php
r28861 r29060 10 10 //$db = dbconnect($ID['proj']); 11 11 $czardb = dbconnect("czardb"); // HACK to connect to czarDb 12 $lastUpdateTime = getLastUpdateTime($czardb); 13 12 14 $gpc1db = dbconnect($ID['proj']); 13 15 … … 22 24 else {$myMenu = "ipp.imfiles.dat";} 23 25 24 menu($myMenu, 'Czartool ', 'ipp.css', $ID['link'], $ID['proj']);26 menu($myMenu, 'Czartool on '.$lastUpdateTime, 'ipp.css', $ID['link'], $ID['proj']); 25 27 26 28 $pass = $ID['pass']; … … 34 36 $selectedRevertMode = $_GET[revertmode]; 35 37 36 if ($selectedLabel == "") $selectedLabel = "all_labels"; 37 if ($selectedStage == "") $selectedStage = "all_stages"; 38 if ($selectedLabel == "") { $selectedLabel = "all_stdscience_labels"; } 39 if ($selectedStage == "") { $selectedStage = "all_stages"; } 40 41 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></p>"; 38 42 39 43 // deal with reverts: turn on or off if requested and pass current revert state for this stage onto labels table later … … 52 56 $distLabels = getLabels($czardb, "distribution"); 53 57 $pubLabels = getLabels($czardb, "publishing"); 58 $updateLabels = getLabels($czardb, "update"); 54 59 55 60 if ($debug) { … … 61 66 62 67 $states=array("full","new","drop","wait"); 63 $stages=array(" chip","cam","fake","warp","stack","diff","magic","magicDS","dist");68 $stages=array("burntool", "chip","cam","fake","warp","stack","diff","magic","magicDS","dist"); 64 69 $servers=array( 65 70 "addstar", … … 82 87 echo "<input type=\"hidden\" name=\"menu\" value=\"$menu\">\n"; 83 88 echo "</form>\n"; 84 $lastUpdateTime = getLastUpdateTime($czardb);85 echo "<p align=\"center\"> Current status of IPP (any faults are shown in parentheses). NOTE: This data is good as of: $lastUpdateTime </p>";86 89 87 90 echo "<table>\n"; … … 92 95 93 96 echo "<td> \n"; 94 createLabelsTable($pass, $proj, $czardb, $stdsLabels, $distLabels, $pubLabels, $stages, $states, "new", $selectedLabel, $selectedStage); 97 createLabelsTable($pass, $proj, $czardb, "stdscience", $stdsLabels, $distLabels, $pubLabels, $stages, $states, "new", $selectedLabel, $selectedStage); 98 echo "</td>\n"; 99 echo "</tr>\n"; 100 101 echo "<tr>\n"; 102 echo "<td>\n"; 103 echo "<img src=\"czartool_getplot.php?type=h&label=$selectedLabel&stage=$selectedStage\"><br>"; 104 echo "</td>\n"; 105 106 echo "<td> \n"; 107 createLabelsTable($pass, $proj, $czardb, "update", $updateLabels, $distLabels, $pubLabels, $stages, $states, "new", $selectedLabel, $selectedStage); 95 108 echo "</td>\n"; 96 109 echo "</tr>\n"; … … 100 113 echo "<tr valign=top>\n"; 101 114 echo "<td> \n"; 102 echo "<img src=\"czartool_getplot.php?type= h&label=$selectedLabel&stage=$selectedStage\"><br>";115 echo "<img src=\"czartool_getplot.php?type=s\"><br>"; 103 116 echo "</td>\n"; 104 117 echo "<td>\n"; … … 116 129 echo "<tr valign=top>\n"; 117 130 echo "<td> \n"; 118 echo "<img src=\"czartool_getplot.php?type=s\"><br>";119 131 echo "</td>\n"; 120 132 echo "<td>\n"; … … 211 223 # 212 224 ########################################################################### 213 function createLabelsTable($pass, $proj, $db, $s tdsLabels, $distLabels, $pubLabels, $stages, $states, $selectedState, $selectedLabel, $selectedStage) {225 function createLabelsTable($pass, $proj, $db, $server, $labels, $distLabels, $pubLabels, $stages, $states, $selectedState, $selectedLabel, $selectedStage) { 214 226 215 227 // set up table columns … … 218 230 echo "<tr><td></td>\n"; 219 231 232 echo "<p align=\"center\"> Current labels for $server server (D=distributing, P=publishing)</p>"; 233 220 234 write_header_cell($class, ""); 221 235 write_header_cell($class, ""); … … 223 237 foreach ($stages as &$stage) { 224 238 239 if ($stage == "burntool") continue; 225 240 $reverting = getRevertStatus($db, $stage); 226 241 $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=" . $selectedLabel . "&stage=" . $selectedStage . "&revertstage=" . $stage . "&revertmode="; … … 234 249 echo "</tr>\n"; 235 250 echo "<tr><td></td>\n"; 251 write_header_cell($class, " "); 236 252 write_header_cell($class, "Label (in order of priority)"); 237 write_header_cell($class, "Distributing?");238 write_header_cell($class, "Publishing?");239 253 foreach ($stages as &$stage) { 240 254 … … 254 268 255 269 // write rows 256 foreach ($ stdsLabels as &$stdsLabel) {270 foreach ($labels as &$thisLabel) { 257 271 258 272 $distributing = false; … … 260 274 foreach ($distLabels as &$distLabel) { 261 275 262 if ($ stdsLabel == $distLabel) { $distributing = true; break;}276 if ($thisLabel == $distLabel) { $distributing = true; break;} 263 277 } 264 278 foreach ($pubLabels as &$pubLabel) { 265 279 266 if ($ stdsLabel == $pubLabel) { $publishing = true; break;}280 if ($thisLabel == $pubLabel) { $publishing = true; break;} 267 281 } 268 282 269 283 // create link to label summary page for each label 270 if ($ stdsLabel == $selectedLabel) $link = "";271 else $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=" . $ stdsLabel . "&stage=" . $selectedStage;284 if ($thisLabel == $selectedLabel) $link = ""; 285 else $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=" . $thisLabel . "&stage=" . $selectedStage; 272 286 273 287 echo "<tr><td></td>\n"; 274 write_table_cell($class, '%s', $link, $stdsLabel); 275 write_table_cell($class, '%s', "", $distributing ? "yes" : "NO"); 276 write_table_cell($class, '%s', "", $publishing ? "yes" : "NO"); 288 $distPub = " "; 289 if ($distributing) $distPub = "D"; 290 if ($publishing) $distPub = $distPub . "P"; 291 write_table_cell($class, '%s', "", $distPub); 292 293 write_table_cell($class, '%s', $link, $thisLabel); 277 294 278 295 $str = ""; 279 296 $anyFaults = false; 280 297 281 $link = "chipProcessedImfile_failure.php?pass=" . $pass . "&proj=" . $proj . "&chipRun.label=" . $stdsLabel . "&chipRun.state=new";282 getStateAndFaults($db, $ stdsLabel, $selectedState, "chip", $str, $anyFaults);298 $link = $defaultlink; 299 getStateAndFaults($db, $thisLabel, $selectedState, "burntool", $str, $anyFaults); 283 300 write_table_cell($class, '%s', $anyFaults ? $link : "", $str); 284 301 285 $link = "camProcessedExp_failure.php?pass=" . $pass . "&proj=" . $proj . "&camRun.label=" . $stdsLabel . "&camRun.state=new"; 286 getStateAndFaults($db, $stdsLabel, $selectedState, "cam", $str, $anyFaults); 302 $link = "failedChipProcessedImfile.php?pass=" . $pass . "&proj=" . $proj . "&chipRun.label=" . $thisLabel . "&chipRun.state=new"; 303 getStateAndFaults($db, $thisLabel, $selectedState, "chip", $str, $anyFaults); 304 write_table_cell($class, '%s', $anyFaults ? $link : "", $str); 305 306 $link = "failedCamProcessedExp.php?pass=" . $pass . "&proj=" . $proj . "&camRun.label=" . $thisLabel . "&camRun.state=new"; 307 getStateAndFaults($db, $thisLabel, $selectedState, "cam", $str, $anyFaults); 287 308 write_table_cell($class, '%s', $anyFaults ? $link : "", $str); 288 309 310 $link = "failedFakeProcessedImfile.php?pass=" . $pass . "&proj=" . $proj . "&fakeRun.label=" . $thisLabel . "&fakeRun.state=new"; 311 getStateAndFaults($db, $thisLabel, $selectedState, "fake", $str, $anyFaults); 312 write_table_cell($class, '%s', $anyFaults ? $link : "", $str); 313 314 $link = "failedWarpSkyfiles.php?pass=" . $pass . "&proj=" . $proj . "&warpRun.label=" . $thisLabel . "&warpRun.state=new"; 315 getStateAndFaults($db, $thisLabel, $selectedState, "warp", $str, $anyFaults); 316 write_table_cell($class, '%s', $anyFaults ? $link : "", $str); 317 318 $link = "failedStackSkyfile.php?pass=" . $pass . "&proj=" . $proj . "&stackRun.label=" . $thisLabel . "&stackRun.state=new"; 319 getStateAndFaults($db, $thisLabel, $selectedState, "stack", $str, $anyFaults); 320 write_table_cell($class, '%s', $anyFaults ? $link : "", $str); 321 322 $link = "failedDiffSkyfile.php?pass=" . $pass . "&proj=" . $proj . "&diffRun.label=" . $thisLabel . "&diffRun.state=new"; 323 getStateAndFaults($db, $thisLabel, $selectedState, "diff", $str, $anyFaults); 324 write_table_cell($class, '%s', $anyFaults ? $link : "", $str); 325 289 326 $link = $defaultlink; 290 getStateAndFaults($db, $ stdsLabel, $selectedState, "fake", $str, $anyFaults);327 getStateAndFaults($db, $thisLabel, $selectedState, "magic", $str, $anyFaults); 291 328 write_table_cell($class, '%s', $anyFaults ? $link : "", $str); 292 329 293 $link = "warpFailedSkyfiles.php?pass=" . $pass . "&proj=" . $proj . "&warpRun.label=" . $stdsLabel . "&warpRun.state=new"; 294 getStateAndFaults($db, $stdsLabel, $selectedState, "warp", $str, $anyFaults); 295 write_table_cell($class, '%s', $anyFaults ? $link : "", $str); 296 297 $link = "stackFailedSkyfile.php?pass=" . $pass . "&proj=" . $proj . "&stackRun.label=" . $stdsLabel . "&stackRun.state=new"; 298 getStateAndFaults($db, $stdsLabel, $selectedState, "stack", $str, $anyFaults); 330 $link = $defaultlink; 331 getStateAndFaults($db, $thisLabel, $selectedState, "magicDS", $str, $anyFaults); 299 332 write_table_cell($class, '%s', $anyFaults ? $link : "", $str); 300 333 301 $link = "diffFailedSkyfile.php?pass=" . $pass . "&proj=" . $proj . "&diffRun.label=" . $stdsLabel . "&diffRun.state=new";302 getStateAndFaults($db, $stdsLabel, $selectedState, "diff", $str, $anyFaults);303 write_table_cell($class, '%s', $anyFaults ? $link : "", $str);304 305 334 $link = $defaultlink; 306 getStateAndFaults($db, $ stdsLabel, $selectedState, "magic", $str, $anyFaults);335 getStateAndFaults($db, $thisLabel, $selectedState, "dist", $str, $anyFaults); 307 336 write_table_cell($class, '%s', $anyFaults ? $link : "", $str); 308 337 309 $link = $defaultlink;310 getStateAndFaults($db, $stdsLabel, $selectedState, "magicDS", $str, $anyFaults);311 write_table_cell($class, '%s', $anyFaults ? $link : "", $str);312 313 $link = $defaultlink;314 getStateAndFaults($db, $stdsLabel, $selectedState, "dist", $str, $anyFaults);315 write_table_cell($class, '%s', $anyFaults ? $link : "", $str);316 317 338 echo "</tr>\n"; 318 339 } 319 340 320 if ($selectedLabel == "all_ labels") $link = "";321 else $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=all_ labels&stage=".$selectedStage;341 if ($selectedLabel == "all_".$server."_labels") $link = ""; 342 else $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=all_".$server."_labels&stage=".$selectedStage; 322 343 323 344 echo "<tr><td></td>\n"; 324 write_table_cell($class, '%s', $link, "All labels"); 345 write_table_cell($class, '%s', "", " "); 346 write_table_cell($class, '%s', $link, "All $server labels"); 325 347 326 348 echo "</tr>\n";
Note:
See TracChangeset
for help on using the changeset viewer.
