Changeset 28724
- Timestamp:
- Jul 27, 2010, 4:20:53 PM (16 years ago)
- Location:
- trunk/ippMonitor
- Files:
-
- 1 added
- 2 edited
-
Makefile.in (modified) (2 diffs)
-
raw/czartool_getplot.php (added)
-
raw/czartool_labels.php (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippMonitor/Makefile.in
r28688 r28724 14 14 PROGRAMS = \ 15 15 $(DESTBIN)/skyplot.dvo \ 16 $(DESTBIN)/czartool_getLabels.pl \17 $(DESTBIN)/czartool_checkServer.pl \18 16 $(DESTBIN)/czartool_getServerStatus.pl \ 19 17 $(DESTBIN)/czartool_revert.pl \ … … 55 53 $(DESTWWW)/ipp.czartool.dat \ 56 54 $(DESTWWW)/czartool_labels.php \ 57 $(DESTWWW)/czartool_servers.php \ 58 $(DESTWWW)/czartool_summit.php \ 55 $(DESTWWW)/czartool_getplot.php \ 59 56 $(DESTWWW)/histogram.php \ 60 57 $(DESTWWW)/show_and_delete_image.php \ -
trunk/ippMonitor/raw/czartool_labels.php
r28708 r28724 28 28 $menu = $ID['menu']; 29 29 30 $ userSelection = $_GET[selection];30 $selectedLabel = $_GET[label]; 31 31 $selectedServer = $_GET[server]; 32 33 if ($userSelection == "") {$userSelection = $_POST['state'];} 34 if ($userSelection == "") {$userSelection = "new";} 35 36 // anything to revert? 37 $revertServer = $_GET[server]; 38 $revertStage = $_GET[stage]; 32 $revertServer = $_GET[revertserver]; 33 $revertStage = $_GET[revertstage]; 39 34 $revertMode = $_GET[revert]; 35 36 if ($selectedLabel == "") $selectedLabel = "all_labels"; 40 37 41 38 if ($revertStage != "" && $revertMode != "" && $revertServer != "" ) … … 81 78 echo "NOTE: This data is good as of: $lastUpdateTime </p>"; 82 79 83 createLabelsTable($pass, $proj, $czardb, $stdsLabels, $distLabels, $pubLabels, $stages, $states, "new");84 85 80 echo "<table>\n"; 86 echo "<tr>\n"; 87 echo "<td style=\"width: 50%;\">\n"; 88 89 $today = date("Y-m-d"); // 03.10.01 90 showSummitData($gpc1db, $today); 91 92 echo "</td>\n"; 93 echo "<td> \n"; 94 95 createServersTable($pass, $proj,$czardb, $servers); 96 97 echo "</td?\n"; 98 echo "</tr>\n"; 81 echo "<tr>\n"; 82 83 echo "<td> \n"; 84 echo "<img src=\"czartool_getplot.php?type=t&label=$selectedLabel\"><br>\n"; 85 echo "</td>\n"; 86 87 echo "<td> \n"; 88 createLabelsTable($pass, $proj, $czardb, $stdsLabels, $distLabels, $pubLabels, $stages, $states, "new", $selectedLabel); 89 echo "</td>\n"; 90 91 echo "</tr>\n"; 92 echo "<tr>\n"; 93 94 echo "<table>\n"; 95 echo "<tr valign=top>\n"; 96 echo "<td> \n"; 97 echo "<img src=\"czartool_getplot.php?type=h&label=$selectedLabel\"><br>\n"; 98 echo "</td>\n"; 99 echo "<td> \n"; 100 createServersTable($pass, $proj,$czardb, $servers); 101 echo "</td>\n"; 102 103 echo "<td> \n"; 104 $today = date("Y-m-d"); // 03.10.01 105 showSummitData($gpc1db, $today); 106 echo "</td>\n"; 107 echo "</tr>\n"; 99 108 echo "</table>\n"; 100 101 109 if ($selectedServer) showServerStatus($selectedServer); 110 111 echo "</tr>\n"; 112 echo "</table>\n"; 113 102 114 103 115 menu_end(); … … 143 155 144 156 if ($expType[0] == "OBJECT") { 145 if ($summit[0] == $mhpcc[0]) $msg = "All science exposures taken since $date have been registered at MHPCC";146 else $msg = "Warning: Not all science exposures taken since $date have been registered at MHPCC";157 if ($summit[0] == $mhpcc[0]) $msg = "All science exposures taken since $date<br>have been registered at MHPCC"; 158 else $msg = "Warning: Not all science exposures taken since $date<br>have been registered at MHPCC"; 147 159 } 148 160 … … 166 178 function getLabels($db, $server) { 167 179 168 $sql = "SELECT label FROM current_labels WHERE server LIKE '$server'"; 180 # order by descending priority as set in gpc1 database 181 $sql = "SELECT label FROM current_labels WHERE server LIKE '$server' ORDER BY priority DESC"; 169 182 if ($debug) {echo "$sql<br>";} 170 183 … … 184 197 # 185 198 ########################################################################### 186 function createLabelsTable($pass, $proj, $db, $stdsLabels, $distLabels, $pubLabels, $stages, $states, $selectedState ) {199 function createLabelsTable($pass, $proj, $db, $stdsLabels, $distLabels, $pubLabels, $stages, $states, $selectedState, $selectedLabel) { 187 200 188 201 // set up table columns … … 200 213 else $server = "stdscience"; 201 214 $reverting = getRevertStatus($db, $stage); 202 $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "& server=" . $server . "&stage=" . $stage . "&revert=";215 $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&revertserver=" . $server . "&revertstage=" . $stage . "&revert="; 203 216 if(!$reverting) {$label = "Start";$link = $link . "on";} 204 217 if($reverting) {$label = "Stop";$link = $link . "off";} … … 209 222 echo "</tr>\n"; 210 223 echo "<tr><td></td>\n"; 211 write_header_cell($class, " label");212 write_header_cell($class, " distributing?");213 write_header_cell($class, " publishing?");224 write_header_cell($class, "Label (in order of priority)"); 225 write_header_cell($class, "Distributing?"); 226 write_header_cell($class, "Publishing?"); 214 227 foreach ($stages as &$stage) write_header_cell($class, $stage); 215 228 216 229 echo "</tr>\n"; 217 230 echo "<tr><td></td>\n"; 231 232 $defaultlink = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj; 218 233 219 234 // write rows … … 232 247 233 248 // create link to label summary page for each label 234 //$link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&selection=" . $stdsLabel; 235 $link = ""; 236 $defaultlink = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj; 249 if ($stdsLabel == $selectedLabel) $link = ""; 250 else $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=" . $stdsLabel; 237 251 238 252 echo "<tr><td></td>\n"; … … 283 297 } 284 298 299 if ($selectedLabel == "all_labels") $link = ""; 300 else $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=all_labels"; 301 302 echo "<tr><td></td>\n"; 303 write_table_cell($class, '%s', $link, "All labels:"); 304 write_table_cell($class, '%s', "", "-"); 305 write_table_cell($class, '%s', "", "-"); 306 307 $str = ""; 308 $anyFaults = false; 309 310 $link = "chipProcessedImfile_failure.php?pass=" . $pass . "&proj=" . $proj . "&chipRun.state=new"; 311 getStateAndFaults($db, "all_labels", $selectedState, "chip", $str, $anyFaults); 312 write_table_cell($class, '%s', $anyFaults ? $link : "", $str); 313 314 $link = "camProcessedExp_failure.php?pass=" . $pass . "&proj=" . $proj . "&camRun.state=new"; 315 getStateAndFaults($db, "all_labels", $selectedState, "cam", $str, $anyFaults); 316 write_table_cell($class, '%s', $anyFaults ? $link : "", $str); 317 318 $link = $defaultlink; 319 getStateAndFaults($db, "all_labels", $selectedState, "fake", $str, $anyFaults); 320 write_table_cell($class, '%s', $anyFaults ? $link : "", $str); 321 322 $link = "warpFailedSkyfiles.php?pass=" . $pass . "&proj=" . $proj . "&warpRun.state=new"; 323 getStateAndFaults($db, "all_labels", $selectedState, "warp", $str, $anyFaults); 324 write_table_cell($class, '%s', $anyFaults ? $link : "", $str); 325 326 $link = "stackFailedSkyfile.php?pass=" . $pass . "&proj=" . $proj . "&stackRun.state=new"; 327 getStateAndFaults($db, "all_labels", $selectedState, "stack", $str, $anyFaults); 328 write_table_cell($class, '%s', $anyFaults ? $link : "", $str); 329 330 $link = "diffFailedSkyfile.php?pass=" . $pass . "&proj=" . $proj . "&diffRun.state=new"; 331 getStateAndFaults($db, "all_labels", $selectedState, "diff", $str, $anyFaults); 332 write_table_cell($class, '%s', $anyFaults ? $link : "", $str); 333 334 $link = $defaultlink; 335 getStateAndFaults($db, "all_labels", $selectedState, "magic", $str, $anyFaults); 336 write_table_cell($class, '%s', $anyFaults ? $link : "", $str); 337 338 $link = $defaultlink; 339 getStateAndFaults($db, "all_labels", $selectedState, "magicDS", $str, $anyFaults); 340 write_table_cell($class, '%s', $anyFaults ? $link : "", $str); 341 342 $link = $defaultlink; 343 getStateAndFaults($db, "all_labels", $selectedState, "dist", $str, $anyFaults); 344 write_table_cell($class, '%s', $anyFaults ? $link : "", $str); 345 346 285 347 echo "</tr>\n"; 286 348 echo "</table>\n"; 287 288 echo "<p> - Click on a fault to find logfile<br>";289 echo "- Click on column header to turn reverts on or off </p>";290 349 } 291 350 … … 357 416 358 417 $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&server=" . $server; 359 // $link = "";418 // $link = ""; 360 419 361 420 getServerStatus($db, $server, $alive, $running);
Note:
See TracChangeset
for help on using the changeset viewer.
