Changeset 32337 for branches/eam_branches/ipp-20110710/ippMonitor
- Timestamp:
- Sep 6, 2011, 11:00:22 AM (15 years ago)
- Location:
- branches/eam_branches/ipp-20110710/ippMonitor
- Files:
-
- 16 edited
- 22 copied
-
. (modified) (1 prop)
-
INSTALL (modified) (1 diff)
-
czartool (copied) (copied from trunk/ippMonitor/czartool )
-
czartool/czarclean.pl (copied) (copied from trunk/ippMonitor/czartool/czarclean.pl )
-
czartool/czarmetrics.pl (copied) (copied from trunk/ippMonitor/czartool/czarmetrics.pl )
-
czartool/czarplot.pl (copied) (copied from trunk/ippMonitor/czartool/czarplot.pl )
-
czartool/czarpoll.pl (copied) (copied from trunk/ippMonitor/czartool/czarpoll.pl )
-
czartool/czartool (copied) (copied from trunk/ippMonitor/czartool/czartool )
-
czartool/czartool.pl (copied) (copied from trunk/ippMonitor/czartool/czartool.pl )
-
czartool/czartool/Burntool.pm (copied) (copied from trunk/ippMonitor/czartool/czartool/Burntool.pm )
-
czartool/czartool/Config.pm (copied) (copied from trunk/ippMonitor/czartool/czartool/Config.pm )
-
czartool/czartool/CzarDb.pm (copied) (copied from trunk/ippMonitor/czartool/czartool/CzarDb.pm )
-
czartool/czartool/DayMetrics.pm (copied) (copied from trunk/ippMonitor/czartool/czartool/DayMetrics.pm )
-
czartool/czartool/Gpc1Db.pm (copied) (copied from trunk/ippMonitor/czartool/czartool/Gpc1Db.pm )
-
czartool/czartool/Metrics.pm (copied) (copied from trunk/ippMonitor/czartool/czartool/Metrics.pm )
-
czartool/czartool/MetricsIndex.pm (copied) (copied from trunk/ippMonitor/czartool/czartool/MetricsIndex.pm )
-
czartool/czartool/MultiDayMetrics.pm (copied) (copied from trunk/ippMonitor/czartool/czartool/MultiDayMetrics.pm )
-
czartool/czartool/MySQLDb.pm (copied) (copied from trunk/ippMonitor/czartool/czartool/MySQLDb.pm )
-
czartool/czartool/Nebulous.pm (copied) (copied from trunk/ippMonitor/czartool/czartool/Nebulous.pm )
-
czartool/czartool/Pantasks.pm (copied) (copied from trunk/ippMonitor/czartool/czartool/Pantasks.pm )
-
czartool/czartool/Plotter.pm (copied) (copied from trunk/ippMonitor/czartool/czartool/Plotter.pm )
-
czartool/czartool/StageMetrics.pm (copied) (copied from trunk/ippMonitor/czartool/czartool/StageMetrics.pm )
-
czartool/czartool/czarconfig.xml (copied) (copied from trunk/ippMonitor/czartool/czartool/czarconfig.xml )
-
czartool/roboczar.pl (copied) (copied from trunk/ippMonitor/czartool/roboczar.pl )
-
def/failedCamProcessedExp.d (modified) (1 diff)
-
def/failedChipProcessedImfile.d (modified) (1 diff)
-
def/failedDiffSkyfile.d (modified) (1 diff)
-
def/failedFakeProcessedImfile.d (modified) (1 diff)
-
def/failedMagicMasks.d (modified) (1 diff)
-
def/failedMagicNodes.d (modified) (1 diff)
-
def/failedMagicTrees.d (modified) (1 diff)
-
def/failedStackSkyfile.d (modified) (1 diff)
-
def/failedWarpSkyfiles.d (modified) (1 diff)
-
def/mopsStatus.d (modified) (1 diff)
-
def/publishDone.d (modified) (2 diffs)
-
raw/czartool_getplot.php (modified) (2 diffs)
-
raw/czartool_labels.php (modified) (26 diffs)
-
raw/warpProcessedExp.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110710/ippMonitor
- Property svn:mergeinfo changed
/trunk/ippMonitor (added) merged: 31876,31891-31892,31895-31896,32025,32028,32060,32093-32098,32101-32102,32172-32173,32178,32186,32212-32214,32224-32226,32278,32325
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20110710/ippMonitor/INSTALL
r27029 r32337 13 13 psconfigure --dbhost alala --dbuser ipp --dbpass ipp --htdocs /var/www/kiawe 14 14 15 ipp004 / ipp017 example: 16 psconfigure --dbhost ipp017 --dbuser ipp --dbpass ipp --htdocs ~ipp/htdocs 15 # note that we have a special version for ippmonitor without $PSCONFIG/$PSCONFDIR values: 16 ipp@ippdb01 / ippdb01 example: 17 psconfigure --dbhost ippdb01 --dbuser ipp --dbpass ipp --htdocs /var/www/localhost/htdocs --site ~/ippconfig/ippmonitor.config 17 18 18 ipp004 / ipp004 example:19 psconfigure --dbhost ipp004 --dbuser ipp --dbpass ipp --htdocs ~ipp/htdocs20 21 # note that we have a special version for ippmonitor without $PSCONFIG/$PSCONFDIR values:22 ipp@ipp004 / ippdb01 example:23 psconfigure --dbhost ippdb01 --dbuser ipp --dbpass ipp --htdocs ~/htdocs --site ~/ippconfig/ippmonitor.config24 -
branches/eam_branches/ipp-20110710/ippMonitor/def/failedCamProcessedExp.d
r28969 r32337 31 31 FIELD camRun.dist_group, 5, %s, dist grp 32 32 FIELD camProcessedExp.fault, 2, %d, Fault 33 FIELD *, 50, %s, Command <blink>(Experimental)</blink>, op=OP133 FIELD *, 50, %s, Revert Command, op=OP1 34 34 35 35 FIELD camProcessedExp.path_base, 5, %s, path_base, none -
branches/eam_branches/ipp-20110710/ippMonitor/def/failedChipProcessedImfile.d
r28969 r32337 32 32 FIELD chipRun.dist_group, 7, %s, dist grp 33 33 FIELD chipProcessedImfile.fault, 2, %d, Fault 34 FIELD *, 50, %s, Command <blink>Experimental</blink>, op=OP134 FIELD *, 50, %s, Revert Command, op=OP1 35 35 36 36 # FIELD rawExp.telescope, 10, %s, Telescope -
branches/eam_branches/ipp-20110710/ippMonitor/def/failedDiffSkyfile.d
r28969 r32337 24 24 FIELD diffRun.state, 7, %s, State, value, diffProcessedSkyfile.php, ARG7 25 25 FIELD diffSkyfile.fault, 5, %d, Fault 26 FIELD *, 50, %s, Command <blink>(Experimental)</blink>, op=OP126 FIELD *, 50, %s, Revert Command, op=OP1 27 27 28 28 FIELD diffSkyfile.path_base, 5, %s, path_base, none -
branches/eam_branches/ipp-20110710/ippMonitor/def/failedFakeProcessedImfile.d
r28969 r32337 34 34 FIELD fakeRun.label, 7, %s, Label 35 35 FIELD fakeProcessedImfile.fault, 2, %d, Fault 36 FIELD *, 50, %s, Command <blink>(Experimental/Not tested)</blink>, op=OP136 FIELD *, 50, %s, Revert Command, op=OP1 37 37 38 38 FIELD fakeProcessedImfile.path_base, 5, %s, path_base, none -
branches/eam_branches/ipp-20110710/ippMonitor/def/failedMagicMasks.d
r28969 r32337 19 19 FIELD magicMask.streaks, 5, %d, Streaks 20 20 FIELD magicMask.fault, 5, %d, Fault 21 FIELD *, 50, %s, Command <blink>(Experimental)</blink>, op=OP121 FIELD *, 50, %s, Revert Command, op=OP1 -
branches/eam_branches/ipp-20110710/ippMonitor/def/failedMagicNodes.d
r28969 r32337 22 22 FIELD magicTree.dep, 5, %s, Parent 23 23 FIELD magicNodeResult.fault, 5, %d, Fault 24 FIELD *, 50, %s, Command <blink>(Experimental)</blink>, op=OP124 FIELD *, 50, %s, Revert Command, op=OP1 -
branches/eam_branches/ipp-20110710/ippMonitor/def/failedMagicTrees.d
r28969 r32337 17 17 FIELD state, 5, %s, State 18 18 FIELD fault, 5, %d, Fault 19 FIELD *, 50, %s, Command <blink>(Experimental)</blink>, op=OP119 FIELD *, 50, %s, Revert Command, op=OP1 -
branches/eam_branches/ipp-20110710/ippMonitor/def/failedStackSkyfile.d
r28969 r32337 25 25 FIELD stackSumSkyfile.fault, 2, %d, Fault 26 26 27 FIELD *, 50, %s, Command you should try to run as the ipp user? <blink>(Experimental feature)</blink>, op=OP127 FIELD *, 50, %s, Revert Command, op=OP1 28 28 29 29 FIELD stackSumSkyfile.path_base, 5, %s, path_base, none -
branches/eam_branches/ipp-20110710/ippMonitor/def/failedWarpSkyfiles.d
r28969 r32337 36 36 FIELD warpRun.label, 7, %s, Label 37 37 FIELD warpSkyfile.fault, 2, %d, Fault 38 FIELD *, 50, %s, Command <blink>(Experimental)</blink>, op=OP138 FIELD *, 50, %s, Revert Command, op=OP1 39 39 40 40 FIELD warpSkyfile.path_base, 5, %s, path_base, none -
branches/eam_branches/ipp-20110710/ippMonitor/def/mopsStatus.d
r31707 r32337 5 5 #WHERE rawExp.obs_mode!='ENGINEERING' 6 6 7 UNRESTRICTED WHERE 0=17 UNRESTRICTED WHERE dateobs>=DATE(NOW()) AND rawExp.obs_mode!='ENGINEERING' AND rawExp.obs_mode!='STS' AND rawExp.obs_mode!='M31' AND rawExp.obs_mode!='CNP' 8 8 9 9 # OP OP1 ($ddiff_id > 0 ? $ddiff_id : $tdiff_id) -
branches/eam_branches/ipp-20110710/ippMonitor/def/publishDone.d
r31803 r32337 13 13 OP OP1 ($row[10] . ".log") 14 14 15 OP OP2 "pubtool -revert -fault $publishDone.fault -label $publishRun.label -dbname ". $ID['proj'] 16 15 17 # field size format name show link to extras 16 18 FIELD publishRun.pub_id, 5, %d, Publish ID … … 26 28 FIELD publishDone.path_base, 5, %s, PathBase, none 27 29 FIELD *, 60, %s, Log filename, op=OP1, show_log.php, ARG1 30 FIELD *, 50, %s, Revert Command, op=OP2 -
branches/eam_branches/ipp-20110710/ippMonitor/raw/czartool_getplot.php
r30950 r32337 12 12 } 13 13 14 $mode = $_GET[mode]; 14 15 $type = $_GET[type]; 15 16 $label = $_GET[label]; … … 17 18 $plottype = $_GET[plottype]; 18 19 20 $path = "/data/ipp009.0/czartool_plots"; # TODO horrible hard-coded path - read from config 21 22 if ($label == "all") $label = "all_".$mode."_labels"; 23 19 24 if ($type=="t" || $type=="r" || $type=="rt" || $type=="rh") 20 $filePath = " /tmp/czarplot_".$plottype."_".$label."_".$stage."_".$type.".png";25 $filePath = "$path/czarplot_".$plottype."_".$label."_".$stage."_".$type.".png"; 21 26 else if ($type=="h") 22 $filePath = " /tmp/czarplot_".$plottype."_".$label."_all_stages_".$type.".png";27 $filePath = "$path/czarplot_".$plottype."_".$label."_all_stages_".$type.".png"; 23 28 else if ($type=="s") 24 $filePath = " /tmp/czarplot_hosts_space.png";29 $filePath = "$path/czarplot_hosts_space.png"; 25 30 else if ($type=="st") 26 $filePath = " /tmp/czarplot_cluster.png";31 $filePath = "$path/czarplot_cluster.png"; 27 32 28 33 -
branches/eam_branches/ipp-20110710/ippMonitor/raw/czartool_labels.php
r31834 r32337 31 31 $servers=array( 32 32 "addstar", 33 "addstarlap", 33 34 "cleanup", 34 35 "detrend", … … 39 40 "registration", 40 41 "replication", 42 "stack", 41 43 "stdscience", 42 44 "summitcopy"); … … 46 48 $menu = $ID['menu']; 47 49 50 $selectedMode = $_GET[mode]; 48 51 $selectedStage = $_GET[stage]; 49 52 $selectedLabel = $_GET[label]; … … 55 58 $allServerCmd = $_GET[allservercmd]; 56 59 57 if ($selectedLabel == "") { $selectedLabel = "all_stdscience_labels"; } 60 $headerColor = "#0080c0"; 61 $columnHeaderColor = "lavender"; 62 63 if ($selectedMode == "") { $selectedMode = "stdscience"; } 64 if ($selectedLabel == "") { $selectedLabel = "all"; } 58 65 if ($selectedStage == "") { $selectedStage = "all_stages"; } 59 66 if ($plotType == "") { $plotType = "linear"; } … … 73 80 74 81 $debug = 0; 75 76 $stdsLabels = getLabels($czardb, "stdscience"); 82 $table = "<table bgcolor=\"#FFFFFF\" width=\"700\" align=\"middle\" border=\"1\" cellspacing=\"0\" cellpadding=\"4\" style=\"font-size:80%\">\n"; 83 84 $labels = getLabels($czardb, $selectedMode); 77 85 $distLabels = getLabels($czardb, "distribution"); 78 86 $pubLabels = getLabels($czardb, "publishing"); 79 $updateLabels = getLabels($czardb, "update");80 87 81 88 if ($debug) { … … 86 93 } 87 94 95 $isUpdate = ($selectedMode == "update"); 96 $modeText = $isUpdate ? "Showing update processing" : "Showing standard processing"; 97 $modeLinkText = $isUpdate ? "standard" : "update"; 98 $modeLink = $isUpdate ? "stdscience" : "update"; 99 $link = "czartool_labels.php?pass=".$pass."&proj=".$proj."&mode=".$modeLink."&label=all&stage=" . $selectedStage . "&revertstage=" . $stage . "&plottype=$plotType"; 88 100 89 101 // set up the form … … 98 110 99 111 echo "<tr>"; 100 echo "<td colspan=\" 2\" style=\"background-color:#0080c0;\">";112 echo "<td colspan=\"3\" style=\"background-color:#0080c0;\">"; 101 113 echo "<h1 align=\"middle\">Czartool</h1>"; 114 echo "<h4 align=\"middle\">$modeText (change to <a href=\"$link\"><font color=\"blue\">$modeLinkText</font></a>)</h4>"; 102 115 echo "</td>"; 103 116 echo "</tr>"; 104 117 105 118 echo "<tr valign=\"top\">"; 106 echo "<td style= \"background-color:#EEEEEE;width:100px;text-align:top;\">";119 echo "<td style=width:100px;text-align:top;\">"; 107 120 # time series plot 108 echo "<img src=\"czartool_getplot.php?type=t&label=$selectedLabel&stage=$selectedStage&plottype=$plotType\"><br>"; 121 echo "<br>"; 122 echo "<img src=\"czartool_getplot.php?mode=$selectedMode&type=t&label=$selectedLabel&stage=$selectedStage&plottype=$plotType\"><br>"; 109 123 # rate time series plot 110 echo "<img src=\"czartool_getplot.php?type=rt&label=$selectedLabel&stage=$selectedStage&plottype=linear\"><br>"; 124 echo "<br>"; 125 echo "<img src=\"czartool_getplot.php?mode=$selectedMode&type=rt&label=$selectedLabel&stage=$selectedStage&plottype=linear\"><br>"; 111 126 # rate stacked histo plot 112 echo "<img src=\"czartool_getplot.php?type=rh&label=$selectedLabel&stage=$selectedStage&plottype=linear\"><br>";127 #echo "<img src=\"czartool_getplot.php?mode=$selectedMode&type=rh&label=$selectedLabel&stage=$selectedStage&plottype=linear\"><br>"; 113 128 # histogram plot 114 echo "<img src=\"czartool_getplot.php?type=h&label=$selectedLabel&stage=$selectedStage&plottype=linear\"><br>"; 129 #echo "<img src=\"czartool_getplot.php?mode=$selectedMode&type=h&label=$selectedLabel&stage=$selectedStage&plottype=linear\"><br>"; 130 # storage plot 131 echo "<br>"; 132 echo "<img src=\"czartool_getplot.php?type=s\"><br>"; 115 133 # 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>"; 134 echo "<br>"; 135 echo "<img src=\"czartool_getplot.php?type=st\"><br>"; 119 136 # pantasks server status, if requested 137 echo "<br>"; 120 138 if ($selectedServer && !$serverCmd) showServerStatus($selectedServer); 121 139 echo "</td>"; 122 echo "<td style=\"background-color:#EEEEEE;height:200px;width:400px;text-align:top;\">"; 123 124 echo "<br><br>"; 140 echo "<td style=height:200px;width:10px;text-align:top;\">"; 141 echo "<td style=height:200px;width:400px;text-align:top;\">"; 142 143 #echo "<br>"; 125 144 126 145 // status table at top … … 128 147 $plotTypeLink = ($plotType == "linear") ? "log" : "linear"; 129 148 $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=" . $selectedLabel . "&stage=" . $selectedStage . "&revertstage=" . $stage . "&plottype=$plotTypeLink"; 130 echo "<table align=\"middle\" border=\"1\" cellspacing=\"0\" cellpadding=\"4\" style=\"font-size:80%\">\n"; 149 echo "<br>"; 150 echo $table; 151 #"<table width=\"$width\" align=\"middle\" border=\"1\" cellspacing=\"0\" cellpadding=\"4\" style=\"font-size:80%\">\n"; 152 createTableTitle("Status and links", 3); 131 153 echo "<tr>\n"; 132 154 echo "<tr><td>Time of last update</td><td>$lastUpdateTime</td></tr>"; … … 136 158 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>"; 137 159 echo "<tr><td>Cluster load</td><td><a href=\"http://ganglia.pan-starrs.ifa.hawaii.edu/?r=hour&s=descending&hc=6&c=IPP%2520Production\"><font color=\"blue\">here</font></a></td></tr>"; 138 echo "<tr><td>Who's using the cluster?</td><td><a href=\"http://ipp 004.ifa.hawaii.edu/clusterMonitor/top.html\"><font color=\"blue\">here</font></a></td></tr>";139 echo "<tr><td>IPP metrics</td><td><a href=\"http://ipp00 4.ifa.hawaii.edu/ippMetrics\"><font color=\"blue\">here</font></a></td></tr>";160 echo "<tr><td>Who's using the cluster?</td><td><a href=\"http://ippdb01.ifa.hawaii.edu/clusterMonitor/top.html\"><font color=\"blue\">here</font></a></td></tr>"; 161 echo "<tr><td>IPP metrics</td><td><a href=\"http://ipp0022.ifa.hawaii.edu/ps1sc/ippMetrics\"><font color=\"blue\">here</font></a></td></tr>"; 140 162 echo "<tr><td>Czar log pages</td><td><a href=\"http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/PS1_IPP_CzarLogs\"><font color=\"blue\">here</font></a></td></tr>"; 141 163 echo "<tr><td>Exposure summary</td><td><a href=\"czartool_exposures.php?pass=$pass&proj=$proj\"><font color=\"blue\">here</font></a></td></tr>"; 164 165 $plotTypeLink = ($plotType == "linear") ? "log" : "linear"; 166 $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&mode=" . $selectedMode . "&label=" . $selectedLabel . "&stage=" . $selectedStage . "&revertstage=" . $stage . "&plottype=$plotTypeLink"; 167 168 142 169 echo "</table>\n"; 143 170 144 echo "<br> <br>";171 echo "<br>"; 145 172 146 173 createLabelsTable($pass, 147 174 $proj, 148 175 $czardb, 149 "stdscience",150 $ stdsLabels,176 $selectedMode, 177 $labels, 151 178 $distLabels, 152 179 $pubLabels, … … 158 185 $plotType); 159 186 160 echo "<br><br>"; 161 createLabelsTable($pass, 162 $proj, 163 $czardb, 164 "update", 165 $updateLabels, 166 $distLabels, 167 $pubLabels, 168 $stages, 169 $states, 170 "new", 171 $selectedLabel, 172 $selectedStage, 173 $plotType); 174 echo "<br><br>"; 175 createServersTable($pass, $proj,$czardb, $servers, $selectedLabel, $selectedStage, $plotType); 176 echo "<br><br>"; 187 if ($selectedMode == "update") {echo "<br>"; createPStampDataTable();} 188 echo "<br>"; 189 createServersTable($pass, $proj,$selectedMode,$czardb, $servers, $selectedLabel, $selectedStage, $plotType); 190 echo "<br>"; 177 191 createSummitDataTable($gpc1db); 178 echo "<br> <br>";192 echo "<br>"; 179 193 createDatesTable($czardb); 180 echo "<br><br>"; 181 createPStampDataTable(); 182 echo "<br><br>"; 194 echo "<br>"; 183 195 # This is awful 184 echo "<table align=\"middle\" border=\"1\" cellspacing=\"0\" cellpadding=\"4\" style=\"font-size:80%\">\n";196 echo $table; 185 197 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>"; 198 createTableTitle("Database replication status (update fix log <a href=\"http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/Replication_Issues\">here</a>)", 2); 199 # echo "<th colspan=\"2\"><h2>Database replication status (update fix log <a href=\"http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/Replication_Issues\">here</a>)</h2></th>"; 187 200 echo "<tr>"; 188 echo "<th>Database</th>";189 echo "<th>Status</th>";201 createTableColumnHeader("Database"); 202 createTableColumnHeader("Status"); 190 203 showReplicationsStatus($REPL_HOST_GPC1, $REPL_USER_GPC1, $REPL_PASSWORD_GPC1, $REPL_DBNAME_GPC1); 191 204 showReplicationsStatus($REPL_HOST_NEBULOUS, $REPL_USER_NEBULOUS, $REPL_PASSWORD_NEBULOUS, $REPL_DBNAME_NEBULOUS); … … 217 230 218 231 // set up the table 219 echo "<table align=\"middle\" border=\"1\" cellspacing=\"0\" cellpadding=\"4\" style=\"font-size:80%\">\n"; 232 global $table; 233 echo $table; 234 235 #echo "<table width=\"$width\" align=\"middle\" border=\"1\" cellspacing=\"0\" cellpadding=\"4\" style=\"font-size:80%\">\n"; 220 236 echo "<tr>"; 221 echo "<th colspan=\"3\">Postage stamp requests</th>";237 createTableTitle("Postage stamp requests", 3); 222 238 echo "<tr>"; 223 echo "<th>Label</th>";224 echo "<th>Unfinished jobs</th>";225 echo "<th>Priority</th>";239 createTableColumnHeader("Label"); 240 createTableColumnHeader("Unfinished jobs"); 241 createTableColumnHeader("Priority"); 226 242 227 243 // list the results … … 259 275 260 276 // set up the table 261 echo "<table align=\"middle\" border=\"1\" cellspacing=\"0\" cellpadding=\"4\" style=\"font-size:80%\">\n"; 277 global $table; 278 echo $table; 262 279 echo "<tr>"; 263 echo "<th colspan=\"3\">Status of last night's data</th>";280 createTableTitle("Status of last night's data", 3); 264 281 echo "<tr>"; 265 echo "<th>Exposure type</th>";266 echo "<th>At summit</th>";267 echo "<th>Registered at MHPCC</th>";282 createTableColumnHeader("Exposure type"); 283 createTableColumnHeader("At summit"); 284 createTableColumnHeader("Registered at MHPCC"); 268 285 269 286 $msg = "No science images taken since $date"; … … 281 298 echo "<tr>"; 282 299 283 if ($summit[0] == $mhpcc[0]) { 284 285 if ($expType[0] == "OBJECT") $msg = "All science exposures taken since $date<br>have been registered at MHPCC"; 286 $error = 0; 287 } 288 else { 289 if ($expType[0] == "OBJECT") $msg = "<font color=\"red\">Warning: Not all science exposures taken since $date<br>have been registered at MHPCC</a>"; 290 $error = 1; 291 } 300 if ($summit[0] == $mhpcc[0]) $error = 0; 301 else $error = 1; 292 302 293 303 echo "<td>$expType[0]</td>"; 294 304 echo "<td>$summit[0]</td>"; 295 305 296 297 298 #echo "<td bgcolor=\"$color\">$mhpcc[0]</td>"; 299 createFormattedTableCell("", "", $mhpcc[0], $error); 306 createFormattedTableCell("", "", $mhpcc[0], $error, 0); 300 307 301 308 echo "</tr>"; 302 309 } 303 310 304 echo "<td colspan=\"3\">$msg</td>";305 311 echo "</table>\n"; 306 312 … … 337 343 $proj, 338 344 $db, 339 $se rver,345 $selectedMode, 340 346 $labels, 341 347 $distLabels, … … 346 352 $selectedLabel, $selectedStage, $plotType) { 347 353 354 $isUpdate = ($selectedMode == "update"); 355 global $headerColor; 356 global $columnHeaderColor; 357 348 358 // setup table 349 echo "<table align=\"middle\" border=\"1\" cellspacing=\"0\" cellpadding=\"4\" style=\"font-size:80%\">\n"; 359 global $table; 360 echo $table; 361 createTableTitle("Label status", 13); 362 350 363 echo "<tr>\n"; 351 echo "<th colspan=\"13\">";352 353 364 $link = "czartool_labels.php?pass=".$pass 354 365 ."&proj=".$proj 366 ."&mode=".$selectedMode 355 367 ."&label=".$selectedLabel 356 368 ."&stage=all_stages" 357 369 ."&plottype=".$plotType; 358 if ($selectedStage != "all_stages") echo "<a href=\"$link\"><font color=\"blue\">"; 359 else echo "<a><font color=\"black\">"; 360 echo "Plot all stages</font></a> | "; 361 $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=all_".$server."_labels&stage=".$selectedStage."&plottype=".$plotType; 362 echo "<a "; 363 if ($selectedLabel != "all_".$server."_labels") echo "<a href=\"$link\"><font color=\"blue\">"; 364 else echo "<a><font color=\"black\">"; 365 echo "Plot all ".$server."_labels</a> | "; 366 $plotTypeLink = ($plotType == "linear") ? "log" : "linear"; 367 $plotTypeText = ($plotType == "linear") ? "Use log plots" : "Use linear plots"; 368 $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=" . $selectedLabel . "&stage=" . $selectedStage . "&revertstage=" . $stage . "&plottype=$plotTypeLink"; 369 echo "<a href=\"$link\"><font color=\"blue\">$plotTypeText</font></a>"; 370 371 372 echo "</th>"; 373 echo "</tr>\n"; 374 375 echo "<tr>\n"; 376 //echo "<th></th>"; 377 echo "<th colspan=\"2\">$server server</th>"; 378 echo "<th>Reverts:</th>"; 379 380 foreach ($stages as &$stage) { 381 382 if ($stage == "burntool") continue; 383 $reverting = getRevertStatus($db, $stage); 384 $link = 385 "czartool_labels.php?pass=".$pass 386 ."&proj=".$proj 387 ."&label=".$selectedLabel 388 ."&stage=".$selectedStage 389 ."&plottype=".$plotType 390 ."&revertstage=".$stage 391 ."&revertmode="; 392 393 if(!$reverting) {$label = "Start";$link = $link . "on";} 394 if($reverting) {$label = "Stop";$link = $link . "off";} 395 unset($reverting); 396 echo "<td><a href=\"$link\"><font color=\"blue\">$label</font></td>"; 397 398 } 399 400 echo "</tr>\n"; 401 echo "<tr>\n"; 402 //echo "<th> </th>"; 403 echo "<th colspan=\"2\">Label (in order of priority)</th>"; 370 createFormattedTableCell(($selectedStage != "all_stages"), $link, "All stages", 0, "$columnHeaderColor"); 371 372 #echo "<th>Label (in order of priority)</th>"; 404 373 foreach ($stages as &$stage) { 405 374 … … 409 378 "czartool_labels.php?pass=".$pass 410 379 ."&proj=".$proj 380 ."&mode=" .$selectedMode 411 381 ."&label=".$selectedLabel 412 382 ."&stage=".$stage 413 383 ."&plottype=".$plotType; 414 384 415 createFormattedTableCell($showLink, $link, $stage, 0 );416 } 417 385 createFormattedTableCell($showLink, $link, $stage, 0, "$columnHeaderColor"); 386 # createTableColumnHeader("Dates"); 387 } 418 388 419 389 // setup default link … … 421 391 "czartool_labels.php?pass=".$pass 422 392 ."&proj=".$proj 393 ."&mode=" .$selectedMode 423 394 ."&label=".$selectedLabel 424 395 ."&stage=".$selectedStage … … 426 397 427 398 $searchState = "new"; 428 if ($se rver== "update") $searchState = "update";399 if ($selectedMode == "update") $searchState = "update"; 429 400 430 401 // write rows … … 444 415 // show distribution/publishing status 445 416 echo "<tr>\n"; 446 $distPub = " ";447 if ($distributing) $distPub = "D";448 if ($publishing) $distPub = $distPub . "P";449 echo "<td>$distPub</td>";450 417 451 418 // create link to label summary page for each label … … 455 422 "czartool_labels.php?pass=".$pass 456 423 ."&proj=".$proj 424 ."&mode=" .$selectedMode 457 425 ."&label=".$thisLabel 458 426 ."&stage=".$selectedStage 459 427 ."&plottype=".$plotType; 460 createFormattedTableCell($showLink, $link, $thisLabel, 0 );428 createFormattedTableCell($showLink, $link, $thisLabel, 0, null); 461 429 462 430 $str = ""; … … 465 433 $link = $defaultlink; 466 434 getStateAndFaults($db, $thisLabel, $selectedState, "burntool", $str, $anyFaults); 467 createFormattedTableCell($anyFaults, $link, $str, $anyFaults );435 createFormattedTableCell($anyFaults, $link, $str, $anyFaults, 0); 468 436 469 437 $link = "failedChipProcessedImfile.php?pass=" . $pass . "&proj=" . $proj . "&chipRun.label=" . $thisLabel . "&chipRun.state=".$searchState; 470 438 getStateAndFaults($db, $thisLabel, $selectedState, "chip", $str, $anyFaults); 471 createFormattedTableCell($anyFaults, $link, $str, $anyFaults );439 createFormattedTableCell($anyFaults, $link, $str, $anyFaults, 0); 472 440 473 441 $link = "failedCamProcessedExp.php?pass=" . $pass . "&proj=" . $proj . "&camRun.label=" . $thisLabel . "&camRun.state=".$searchState; 474 442 getStateAndFaults($db, $thisLabel, $selectedState, "cam", $str, $anyFaults); 475 createFormattedTableCell($anyFaults, $link, $str, $anyFaults );443 createFormattedTableCell($anyFaults, $link, $str, $anyFaults, 0); 476 444 477 445 $link = "failedFakeProcessedImfile.php?pass=" . $pass . "&proj=" . $proj . "&fakeRun.label=" . $thisLabel . "&fakeRun.state=".$searchState; 478 446 getStateAndFaults($db, $thisLabel, $selectedState, "fake", $str, $anyFaults); 479 createFormattedTableCell($anyFaults, $link, $str, $anyFaults );447 createFormattedTableCell($anyFaults, $link, $str, $anyFaults, 0); 480 448 481 449 $link = "failedWarpSkyfiles.php?pass=" . $pass . "&proj=" . $proj . "&warpRun.label=" . $thisLabel . "&warpRun.state=".$searchState; 482 450 getStateAndFaults($db, $thisLabel, $selectedState, "warp", $str, $anyFaults); 483 createFormattedTableCell($anyFaults, $link, $str, $anyFaults );451 createFormattedTableCell($anyFaults, $link, $str, $anyFaults, 0); 484 452 485 453 $link = "failedStackSkyfile.php?pass=" . $pass . "&proj=" . $proj . "&stackRun.label=" . $thisLabel . "&stackRun.state=".$searchState; 486 454 getStateAndFaults($db, $thisLabel, $selectedState, "stack", $str, $anyFaults); 487 createFormattedTableCell($anyFaults, $link, $str, $anyFaults );455 createFormattedTableCell($anyFaults, $link, $str, $anyFaults, 0); 488 456 489 457 $link = "failedDiffSkyfile.php?pass=" . $pass . "&proj=" . $proj . "&diffRun.label=" . $thisLabel . "&diffRun.state=".$searchState; 490 458 getStateAndFaults($db, $thisLabel, $selectedState, "diff", $str, $anyFaults); 491 createFormattedTableCell($anyFaults, $link, $str, $anyFaults );459 createFormattedTableCell($anyFaults, $link, $str, $anyFaults, 0); 492 460 493 461 $link = $defaultlink; 494 462 getStateAndFaults($db, $thisLabel, $selectedState, "magic", $str, $anyFaults); 495 createFormattedTableCell($anyFaults, $link, $str, $anyFaults );463 createFormattedTableCell($anyFaults, $link, $str, $anyFaults, (!$isUpdate && !$distributing) ? "gray" : null); 496 464 497 465 $link = $defaultlink; 498 466 getStateAndFaults($db, $thisLabel, $selectedState, "magicDS", $str, $anyFaults); 499 createFormattedTableCell($anyFaults, $link, $str, $anyFaults );467 createFormattedTableCell($anyFaults, $link, $str, $anyFaults, (!$isUpdate && !$distributing) ? "gray" : null); 500 468 501 469 $link = $defaultlink; 502 470 getStateAndFaults($db, $thisLabel, $selectedState, "dist", $str, $anyFaults); 503 createFormattedTableCell($anyFaults, $link, $str, $anyFaults );471 createFormattedTableCell($anyFaults, $link, $str, $anyFaults, (!$isUpdate && !$distributing) ? "gray" : null); 504 472 505 473 $link = "publishDone.php?pass=" . $pass . "&proj=" . $proj . "&publishRun.label=" . $thisLabel . "&publishRun.state=".$searchState; 506 474 getStateAndFaults($db, $thisLabel, $selectedState, "pub", $str, $anyFaults); 507 createFormattedTableCell($anyFaults, $link, $str, $anyFaults );475 createFormattedTableCell($anyFaults, $link, $str, $anyFaults, (!$isUpdate && !$publishing) ? "gray" : null); 508 476 509 477 echo "</tr>\n"; 510 478 } 511 479 512 if ($selectedLabel == "all_".$server."_labels") $showLink = 0; 480 echo "<tr>\n"; 481 $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&mode=" . $selectedMode . "&label=all&stage=".$selectedStage."&plottype=".$plotType; 482 createFormattedTableCell(($selectedLabel != "all"), $link, "All labels", 0, null); 483 484 createFormattedTableCell(0, null, "Reverts:", 0, "$columnHeaderColor"); 485 486 foreach ($stages as &$stage) { 487 488 if ($stage == "burntool") continue; 489 $reverting = getRevertStatus($db, $stage); 490 $link = 491 "czartool_labels.php?pass=".$pass 492 ."&proj=".$proj 493 ."&mode=" .$selectedMode 494 ."&label=".$selectedLabel 495 ."&stage=".$selectedStage 496 ."&plottype=".$plotType 497 ."&revertstage=".$stage 498 ."&revertmode="; 499 500 if(!$reverting) {$label = "Start";$link = $link . "on";} 501 if($reverting) {$label = "Stop";$link = $link . "off";} 502 unset($reverting); 503 createFormattedTableCell(1, $link, $label, 0, "$columnHeaderColor"); 504 #echo "<td><a href=\"$link\"><font color=\"blue\">$label</font></td>"; 505 506 } 507 508 echo "</tr>\n"; 509 if ($selectedLabel == "all") $showLink = 0; 513 510 else $showLink = 1; 514 $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&label=all_".$server."_labels&stage=".$selectedStage."&plottype=".$plotType;511 $link = "czartool_labels.php?pass=".$pass."&proj=".$proj."&mode=".$selectedMode."&label=all&stage=".$selectedStage."&plottype=".$plotType; 515 512 516 513 echo "</tr>\n"; … … 521 518 ########################################################################### 522 519 # 520 # Creates a table title 521 # 522 ########################################################################### 523 function createTableTitle($str, $colSpan) { 524 525 global $headerColor; 526 echo "<th colspan=\"$colSpan\"bgcolor=\"$headerColor\"><h2>$str</h2></th>"; 527 } 528 529 ########################################################################### 530 # 531 # Creates a table header cell 532 # 533 ########################################################################### 534 function createTableColumnHeader($str) { 535 536 global $columnHeaderColor; 537 echo "<th bgcolor=\"$columnHeaderColor\"><h3>$str</h3></th>"; 538 } 539 540 ########################################################################### 541 # 523 542 # Creates table cell with a red background if an error 524 543 # 525 544 ########################################################################### 526 function createFormattedTableCell($showLink, $link, $str, $error ) {545 function createFormattedTableCell($showLink, $link, $str, $error, $color) { 527 546 528 547 $fontColor = $error ? "black" : "blue"; 529 548 530 549 if ($error) echo "<td bgcolor=\"red\">"; 550 else if ($color) echo "<td bgcolor=\"$color\">"; 531 551 else echo "<td>"; 532 552 if ($showLink) echo "<a href=\"$link\"><font color=\"$fontColor\">$str</font></td>"; … … 640 660 function createDatesTable($db) { 641 661 642 echo "<table align=\"middle\" border=\"1\" cellspacing=\"0\" cellpadding=\"4\" style=\"font-size:80%\">\n"; 662 global $table; 663 echo $table; 643 664 echo "<tr>\n"; 644 echo "<th colspan=\"3\">Current dates for selected pantasks servers</th>";665 createTableTitle("Current dates for selected pantasks servers", 3); 645 666 echo "<tr>\n"; 646 echo "<th>Server</th>";647 echo "<th>Dates</th>";667 createTableColumnHeader("Server"); 668 createTableColumnHeader("Dates"); 648 669 echo "</tr>\n"; 649 670 … … 691 712 # 692 713 ########################################################################### 693 function createServersTable($pass, $proj, $ db, $servers, $selectedLabel, $selectedStage, $plotType) {714 function createServersTable($pass, $proj, $selectedMode, $db, $servers, $selectedLabel, $selectedStage, $plotType) { 694 715 695 716 // set up table columns 696 echo "<table align=\"middle\" border=\"1\" cellspacing=\"0\" cellpadding=\"4\" style=\"font-size:80%\">\n"; 717 global $table; 718 echo $table; 697 719 echo "<tr>"; 698 echo "<th colspan=\"3\">Pantasks server status</th>";720 createTableTitle("Pantasks server status", 3); 699 721 echo "<tr>"; 700 echo "<th>Server</th>";701 echo "<th>Alive?</th>";702 echo "<th>Running?</th>";722 createTableColumnHeader("Server"); 723 createTableColumnHeader("Alive?"); 724 createTableColumnHeader("Running?"); 703 725 704 726 //write_header_cell($class, "Server"); … … 731 753 $link = "czartool_labels.php?pass=".$pass 732 754 ."&proj=".$proj 755 ."&mode=".$selectedMode 733 756 ."&server=".$server 734 757 ."&label=".$selectedLabel … … 740 763 //write_table_cell($class, '%s', "", $alive ? "yes" : "NO"); 741 764 //echo "<td>$server</td>"; 742 createFormattedTableCell(1, $link, $server, 0 );743 createFormattedTableCell(0, "", $alive ? "yes" : "NO", !$alive );744 createFormattedTableCell(0, "", $running ? "yes" : "NO", !$running );765 createFormattedTableCell(1, $link, $server, 0, 0); 766 createFormattedTableCell(0, "", $alive ? "yes" : "NO", !$alive, 0); 767 createFormattedTableCell(0, "", $running ? "yes" : "NO", !$running, 0); 745 768 746 769 //if ($alive) { -
branches/eam_branches/ipp-20110710/ippMonitor/raw/warpProcessedExp.php
r28688 r32337 27 27 // define restrictiosn to the queries 28 28 // ** TABLE RESTRICTIONS ** 29 $WHERE = "WHERE warpRun.fake_id = fakeRun.fake_id AND fakeRun.cam_id = camRun.cam_id AND camRun.chip_id = chipRun.chip_id AND chipRun.exp_id = rawExp.exp_id"; 29 // $WHERE = "WHERE warpRun.fake_id = fakeRun.fake_id AND fakeRun.cam_id = camRun.cam_id AND camRun.chip_id = chipRun.chip_id AND chipRun.exp_id = rawExp.exp_id"; 30 $WHERE = ""; 30 31 $WHERE = check_restrict ('rawExp.exp_name', $WHERE, 'string', 1.0); 31 32 $WHERE = check_restrict ('rawExp.exp_id', $WHERE, 'string', 1.0); … … 82 83 } 83 84 85 # WHERE warpRun.fake_id = fakeRun.fake_id AND fakeRun.cam_id = camRun.cam_id AND camRun.chip_id = chipRun.chip_id AND chipRun.exp_id = rawExp.exp_id" 86 84 87 // get the result table count 85 88 if (basic == "basic") { 86 $sql = "SELECT count(*) FROM warpRun , fakeRun, camRun, chipRun, rawExp, warpSummary$WHERE";89 $sql = "SELECT count(*) FROM warpRun JOIN fakeRun USING(fake_id) JOIN camRun USING(cam_id) JOIN chipRun USING(chip_id) JOIN rawExp USING(exp_id) JOIN warpSummary USING(warp_id) $WHERE"; 87 90 } 88 91 if (basic == "summary") {
Note:
See TracChangeset
for help on using the changeset viewer.
