Changeset 30558
- Timestamp:
- Feb 10, 2011, 12:31:04 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippMonitor/raw/czartool_exposures.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippMonitor/raw/czartool_exposures.php
r30547 r30558 101 101 102 102 $class = "list"; 103 echo "<table class=$class >\n"; 103 //echo "<table class=$class >\n"; 104 echo "<table border=\"1\" cellspacing=\"0\" cellpadding=\"4\" >\n"; 105 104 106 echo "<tr><td></td>\n"; 105 write_header_cell($class, "");106 write_header_cell($class, "");107 write_header_cell($class, "");108 write_header_cell($class, "");109 write_header_cell($class, "Raw");110 write_header_cell($class, "Chip");111 write_header_cell($class, "Camera");112 write_header_cell($class, "Warp");113 write_header_cell($class, "Stack");114 write_header_cell($class, "Warp-Stack Diff");115 write_header_cell($class, "Warp-Warp1 Diff");116 write_header_cell($class, "Warp-Warp2 Diff");117 write_header_cell($class, "Stack-Stack Diff");107 echo "<th></th>"; 108 echo "<th></th>"; 109 echo "<th></th>"; 110 echo "<th></th>"; 111 echo "<th>Raw</th>"; 112 echo "<th>Chip</th>"; 113 echo "<th>Camera</th>"; 114 echo "<th>Warp</th>"; 115 echo "<th>Stack</th>"; 116 echo "<th>Warp-Stack Diff</th>"; 117 echo "<th>Warp-Warp1 Diff</th>"; 118 echo "<th>Warp-Warp2 Diff</th>"; 119 echo "<th>Stack-Stack Diff</th>"; 118 120 echo "<tr><td></td>\n"; 119 write_header_cell($class, "Exp ID");120 write_header_cell($class, "Exp Name");121 write_header_cell($class, "Filter");122 write_header_cell($class, "Comment");123 write_header_cell($class, "state");124 write_header_cell($class, "state/dist?");125 write_header_cell($class, "state/dist?");126 write_header_cell($class, "state/dist?");127 write_header_cell($class, "total/dist");128 write_header_cell($class, "total/dist");129 write_header_cell($class, "total/dist");130 write_header_cell($class, "total/dist");131 write_header_cell($class, "total/dist");121 echo "<th>Exp ID</th>"; 122 echo "<th>Exp Name</th>"; 123 echo "<th>Filter</th>"; 124 echo "<th>Comment</th>"; 125 echo "<th>state</th>"; 126 echo "<th>state/dist?</th>"; 127 echo "<th>state/dist?</th>"; 128 echo "<th>state/dist?</th>"; 129 echo "<th>total/dist</th>"; 130 echo "<th>total/dist</th>"; 131 echo "<th>total/dist</th>"; 132 echo "<th>total/dist</th>"; 133 echo "<th>total/dist</th>"; 132 134 133 135 $sql = … … 164 166 echo "<tr><td></td>\n"; 165 167 168 echo "<TD>$exp_id</td>"; 169 echo "<TD>$exp_name</td>"; 170 echo "<TD>$filter</td>"; 171 echo "<TD>$comment</td>"; 172 echo "<TD>$rawExp</td>"; 173 166 174 // chip 167 175 if (!$chipDist[$exp_id]) $chipDistStr = "N"; 168 176 else $chipDistStr = $chipDist[$exp_id]; 169 177 178 if ($chipDistStr == "N") $color = "red"; else $color = ""; 179 echo "<TD bgcolor=\"$color\" >$chipState/$chipDistStr</td>"; 180 170 181 // cam 171 182 if (!$camDist[$exp_id]) $camDistStr = "N"; 172 183 else $camDistStr = $camDist[$exp_id]; 184 if ($camDistStr == "N") $color = "red"; else $color = ""; 185 echo "<TD bgcolor=\"$color\" >$camState/$camDistStr</td>"; 173 186 174 187 // warp 175 188 if (!$warpDist[$exp_id]) $warpDistStr = "N"; 176 189 else $warpDistStr = $warpDist[$exp_id]; 190 if ($warpDistStr == "N") $color = "red"; else $color = ""; 191 echo "<TD bgcolor=\"$color\" >$warpState/$warpDistStr</td>"; 177 192 178 193 // stack 179 if (!$stack_hash[$exp_id] && !$stackDist[$exp_id]) $stackDistStr = " ";194 if (!$stack_hash[$exp_id] && !$stackDist[$exp_id]) $stackDistStr = " "; 180 195 else $stackDistStr = $stack_hash[$exp_id] . "/" . $stackDist[$exp_id]; 196 $color = getColour($stack_hash[$exp_id], $stackDist[$exp_id]); 197 echo "<TD bgcolor=\"$color\" >$stackDistStr</td>"; 181 198 182 199 // WS diff 183 if (!$wsDiffProduced[$exp_id] && !$wsDiffDist[$exp_id]) $wsDistStr = " ";200 if (!$wsDiffProduced[$exp_id] && !$wsDiffDist[$exp_id]) $wsDistStr = " "; 184 201 else $wsDistStr = $wsDiffProduced[$exp_id] . "/" . $wsDiffDist[$exp_id]; 202 $color = getColour($wsDiffProduced[$exp_id], $wsDiffDist[$exp_id]); 203 echo "<TD bgcolor=\"$color\" >$wsDistStr</td>"; 185 204 186 205 // WW1 diff 187 if (!$ww1DiffProduced[$exp_id] && !$ww1DiffDist[$exp_id]) $ww1DistStr = " ";206 if (!$ww1DiffProduced[$exp_id] && !$ww1DiffDist[$exp_id]) $ww1DistStr = " "; 188 207 else $ww1DistStr = $ww1DiffProduced[$exp_id] . "/" . $ww1DiffDist[$exp_id]; 208 $color = getColour($ww1DiffProduced[$exp_id], $ww1DiffDist[$exp_id]); 209 echo "<TD bgcolor=\"$color\" >$ww1DistStr</td>"; 189 210 190 211 // WW2 dist 191 if (!$ww2DiffProduced[$exp_id] && !$ww2DiffDist[$exp_id]) $ww2DistStr = " ";212 if (!$ww2DiffProduced[$exp_id] && !$ww2DiffDist[$exp_id]) $ww2DistStr = " "; 192 213 else $ww2DistStr = $ww2DiffProduced[$exp_id] . "/" . $ww2DiffDist[$exp_id]; 214 $color = getColour($ww2DiffProduced[$exp_id], $ww2DiffDist[$exp_id]); 215 echo "<TD bgcolor=\"$color\" >$ww2DistStr</td>"; 193 216 194 217 // SS dist 195 if (!$ssDiffProduced[$exp_id] && !$ssDiffDist[$exp_id]) $ssDistStr = " ";218 if (!$ssDiffProduced[$exp_id] && !$ssDiffDist[$exp_id]) $ssDistStr = " "; 196 219 else $ssDistStr = $ssDiffProduced[$exp_id] . "/" . $ssDiffDist[$exp_id]; 197 198 write_table_cell($class, '%s', "", $exp_id); 199 write_table_cell($class, '%s', "", $exp_name); 200 write_table_cell($class, '%s', "", $filter); 201 write_table_cell($class, '%s', "", $comment); 202 write_table_cell($class, '%s', "", $rawExp); 203 write_table_cell($class, '%s', "", "$chipState/$chipDistStr"); 204 write_table_cell($class, '%s', "", "$camState/$camDistStr"); 205 write_table_cell($class, '%s', "", "$warpState/$warpDistStr"); 206 write_table_cell($class, '%s', "", $stackDistStr); 207 write_table_cell($class, '%s', "", $wsDistStr); 208 write_table_cell($class, '%s', "", $ww1DistStr); 209 write_table_cell($class, '%s', "", $ww2DistStr); 210 write_table_cell($class, '%s', "", $ssDistStr); 220 $color = getColour($ssDiffProduced[$exp_id], $ssDiffDist[$exp_id]); 221 echo "<TD bgcolor=\"$color\" >$ssDistStr</td>"; 211 222 212 223 echo "</tr>\n"; … … 216 227 } 217 228 229 ########################################################################### 230 # 231 # Gets the right cell colour provided number created and distributed 232 # 233 ########################################################################### 234 function getColour($created, $distributed) { 235 236 if ($distributed > 0 && $created > 0 && $distributed % $created != 0) return "red"; 237 return ""; 238 } 218 239 219 240 ###########################################################################
Note:
See TracChangeset
for help on using the changeset viewer.
