Changeset 12930 for trunk/Mars/datacenter
- Timestamp:
- 02/23/12 16:39:10 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/datacenter/db/fact_runinfo.php
r12777 r12930 19 19 //don't put a '#' at the beginning of the alias, else SortBy won't work anymore 20 20 $query0 .= " COUNT(*) as 'NumRuns', "; 21 $query0 .= " Round(Sum(TimeDiff(fRunStop,fRunStart))/60./60.,1) as 'Time [h]' "; 22 } 23 else 24 { 25 $query0 .= " Concat(fRunNumber,'_', LPAD(fFileNumber, 3, 0)) as 'Run' "; 21 //$query0 .= " Round(Sum(TimeDiff(fRunStop,fRunStart))/60./60.,2) as 'Time [h]' "; 22 $query0 .= " Sec_to_time(Sum(Time_to_sec(TimeDiff(fRunStop,fRunStart)))) as 'Time<br>[hh:mm:ss]' "; 23 } 24 else 25 { 26 $query0 .= " Concat(fNight,'_', LPAD(fRunID, 3, 0)) as 'Run' "; 26 27 27 28 foreach ($_GET as $key => $element) … … 33 34 if (!empty($_GET["fComments"])) 34 35 { 35 $query0 .= ", if (Count(fComment)>0, Concat('<a&ws;id=\'commentcell', f RunNUmber, fFileNumber, '\'&ws;href=\'run_comment.php?fRunNumber=',fRunNumber,'&fFileNumber=', fFileNumber, '\'&ws;onmouseover=\'get_comments(', fRunNumber, ',', fFileNumber, ')\'>', Count(fComment), '</a>'), ' ') ";36 //$query0 .= ", if (Count(fComment)>0, Concat('<a&ws;href=\'run_comment.php?f RunNumber=',fRunNumber,'&fFileNumber=', fFileNumber, '\'&ws;onmouseover=\'bla\'>', Count(fComment), '</a>'), ' ') ";36 $query0 .= ", if (Count(fComment)>0, Concat('<a&ws;id=\'commentcell', fNight, fRunID, '\'&ws;href=\'run_comment.php?fNight=',fNight,'&fRunID=', fRunID, '\'&ws;onmouseover=\'get_comments(', fNight, ',', fRunID, ')\'>', Count(fComment), '</a>'), ' ') "; 37 //$query0 .= ", if (Count(fComment)>0, Concat('<a&ws;href=\'run_comment.php?fNight=',fNight,'&fRunID=', fRunID, '\'&ws;onmouseover=\'bla\'>', Count(fComment), '</a>'), ' ') "; 37 38 $query0 .= " as 'Comments'"; 38 39 } … … 45 46 if (($_GET[$key]=="On" || $groups>0))// && !empty($joins[$key])) 46 47 $query0 .= GetJoin($fromtable, $key); 47 $query0 .= " LEFT JOIN RunComments USING (f RunNumber, fFileNumber) ";48 $query0 .= " LEFT JOIN RunComments USING (fNight, fRunID) "; 48 49 49 50 foreach ($checkwhere as $key => $element) … … 71 72 { 72 73 $startdate=substr($_GET["fStartDate"], 0, 10); 73 if ($startdate=="0000-00-00")74 $query0 .=" f RunNumber>= " . $startdate . " ";75 else76 $query0 .= " fRunNumber>= " . $startdate . " - 1 ";74 // if ($startdate=="0000-00-00") 75 $query0 .=" fNight >= " . $startdate . " "; 76 // else 77 // $query0 .= " fNight >= " . $startdate . " - 1 "; 77 78 } 78 79 … … 83 84 84 85 $stopdate=substr($_GET["fStopDate"], 0, 10); 85 $query0 .= " AND f RunNumber<= " . $stopdate . " ";86 $query0 .= " AND fNight <= " . $stopdate . " "; 86 87 } 87 88 … … 99 100 } 100 101 else 101 $query0 .= " GROUP BY f RunNumber, fFileNumber";102 $query0 .= " GROUP BY fNight, fRunID "; 102 103 103 104 … … 128 129 129 130 if (empty($_GET["fNumResults"])) 130 $_GET["fNumResults"]="20 ";131 $_GET["fNumResults"]="200"; 131 132 132 133 if (empty($_GET["fNumEvents"])) … … 181 182 $_GET["fFitsFileErrors"]=$first?"Off":""; 182 183 183 if (empty($_GET["fHasDrsFile"])) 184 $_GET["fHasDrsFile"]=$first?"Off":""; 184 if (empty($_GET["fCompileTime"])) 185 $_GET["fCompileTime"]=$first?"Off":""; 186 187 if (empty($_GET["fRevisionNumber"])) 188 $_GET["fRevisionNumber"]=$first?"Off":""; 189 190 if (empty($_GET["if(fHasDrsFile=0,\"N\",fDrsStep)"])) 191 $_GET["if(fHasDrsFile=0,\"N\",fDrsStep)"]=$first?"Off":""; 185 192 186 193 if (empty($_GET["fMd5sumRaw"])) … … 197 204 198 205 if (empty($_GET["fThresholdMedian"])) 199 $_GET["fThresholdMedian"]=$first?"O ff":"";206 $_GET["fThresholdMedian"]=$first?"On":""; 200 207 201 208 if (empty($_GET["fBiasVoltageMedian"])) … … 207 214 if (empty($_GET["fDeclination"])) 208 215 $_GET["fDeclination"]=$first?"Off":""; 216 217 if (empty($_GET["fZenithDistanceMean"])) 218 $_GET["fZenithDistanceMean"]=$first?"On":""; 219 220 if (empty($_GET["fAzimuthMean"])) 221 $_GET["fAzimuthMean"]=$first?"On":""; 209 222 210 223 } … … 255 268 CheckBox("fROITimeMarker", "roi-tm"); 256 269 CheckBox("fFitsFileErrors", "file err"); 257 CheckBox("fHasDrsFile", "num drs"); 270 CheckBox("fCompileTime", "compiled"); 271 CheckBox("fRevisionNumber", "rev#"); 272 //CheckBox("if(fHasDrsFile=0,\"N\",\"Y\")", "drs"); 273 CheckBox("if(fHasDrsFile=0,\"N\",fDrsStep)", "drs"); 258 274 CheckBox("fMd5sumRaw", "md5"); 259 275 CheckBox("fMd5sumRawZip", "md5(gz)"); … … 267 283 CheckBox("fRightAscension", "RA"); 268 284 CheckBox("fDeclination", "Dec"); 285 CheckBox("fZenithDistanceMean", "ZdMean"); 286 CheckBox("fAzimuthMean", "AzMean"); 269 287 270 288 printf(" </tr>\n"); … … 273 291 274 292 if (empty($_GET["fStartDate"])) 275 $timemin = GetMin("f RunNumber", "RunInfo", $host, $user, $pw, $db);293 $timemin = GetMin("fNight", "RunInfo", $host, $user, $pw, $db); 276 294 else 277 295 $timemin = $_GET["fStartDate"]; 278 296 279 297 if (empty($_GET["fStopDate"])) 280 $timemax = GetMax("f Runnumber", "RunInfo", $host, $user, $pw, $db);298 $timemax = GetMax("fNight", "RunInfo", $host, $user, $pw, $db); 281 299 else 282 300 $timemax = $_GET["fStopDate"];
Note:
See TracChangeset
for help on using the changeset viewer.