- Timestamp:
- 10/18/10 17:14:38 (14 years ago)
- Location:
- trunk/Mars/datacenter/db
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/datacenter/db/include.php
r9599 r10012 63 63 $txt .= " "; 64 64 break; 65 case 1://done 65 case 1://done and avail 66 66 $txt .= " NOT ISNULL(" . $name . "Status.fStartTime) AND " 67 67 ." NOT ISNULL(" . $name . "Status.fStopTime) AND " 68 ." NOT ISNULL(" . $name . "Status.fAvailable) AND " 68 69 ." ISNULL(" . $name . "Status.fReturnCode) AND "; 69 70 break; 70 case 2://not done 71 case 2://done 72 $txt .= " NOT ISNULL(" . $name . "Status.fStartTime) AND " 73 ." NOT ISNULL(" . $name . "Status.fStopTime) AND " 74 ." ISNULL(" . $name . "Status.fAvailable) AND " 75 ." ISNULL(" . $name . "Status.fReturnCode) AND "; 76 break; 77 case 3://not done 71 78 $txt .= " ISNULL(" . $name . "Status.fStartTime) AND " 72 79 ." ISNULL(" . $name . "Status.fStopTime) AND " 73 80 ." ISNULL(" . $name . "Status.fReturnCode) AND "; 74 81 break; 75 case 3://not to be done82 case 4://not to be done 76 83 $txt .= $name ."Status.fStartTime='1970-01-01 00:00:00' AND " 77 84 . $name ."Status.fStopTime='1970-01-01 00:00:00' AND "; 78 85 break; 79 case 4://running86 case 5://running 80 87 $txt .= " NOT ISNULL(" . $name . "Status.fStartTime) AND " 81 88 ." DATE_SUB(Now(),INTERVAL " . $timelimit . " HOUR) < " . $name . "Status.fStartTime AND " … … 83 90 ." ISNULL(" . $name . "Status.fReturnCode) AND "; 84 91 break; 85 case 5://failed92 case 6://failed 86 93 $txt .= " NOT ISNULL(" . $name . "Status.fStartTime) AND " 87 94 ." NOT ISNULL(" . $name . "Status.fStopTime) AND " 88 95 ." NOT ISNULL(" . $name . "Status.fReturnCode) AND "; 89 96 break; 90 case 6://crashed97 case 7://crashed 91 98 $txt .= " NOT ISNULL(" . $name . "Status.fStartTime) AND " 92 99 ." DATE_SUB(Now(),INTERVAL " . $timelimit . " HOUR) > " . $name . "Status.fStartTime AND " … … 94 101 ." ISNULL(" . $name . "Status.fReturnCode) AND "; 95 102 break; 96 case 7://group by103 case 8://group by 97 104 $txt .= ""; 98 105 break; … … 117 124 $status = array 118 125 ( 0 => "ALL", 119 1 => "done", 120 2 => "not done", 121 3 => "not to be done", 122 4 => "running", 123 5 => "failed", 124 6 => "crashed", 125 7 => "GROUP BY", 126 1 => "done and avail", 127 2 => "done", 128 3 => "not done", 129 4 => "not to be done", 130 5 => "running", 131 6 => "failed", 132 7 => "crashed", 133 8 => "GROUP BY", 126 134 ); 127 135 128 136 $stat=$_GET[$var]; 129 for ($i=0; $i< 8; $i++)137 for ($i=0; $i<9; $i++) 130 138 { 131 139 if ($stat==$i) … … 347 355 foreach ($_GET as $key => $element) 348 356 if ($key==$column."Status") 349 if ($element== 7)357 if ($element==8) 350 358 return -1; 351 359 return 0; -
trunk/Mars/datacenter/db/mcinfo.php
r9895 r10012 33 33 ." AND ISNULL(" . $key . "Status.fStopTime) " 34 34 ." AND ISNULL(" . $key . "Status.fReturnCode), 'not done', " 35 //crashed 35 36 ." IF (NOT ISNULL(" . $key . "Status.fStartTime) " 36 37 ." AND DATE_SUB(Now(),INTERVAL " . $timelimits[$key] . " HOUR) > " . $key . "Status.fStartTime " 37 38 ." AND ISNULL(" . $key . "Status.fStopTime) " 38 39 ." AND ISNULL(" . $key . "Status.fReturnCode), 'crashed', " 40 //running 39 41 ." IF (NOT ISNULL(" . $key . "Status.fStartTime) " 40 42 ." AND DATE_SUB(Now(),INTERVAL " . $timelimits[$key] . " HOUR) < " . $key . "Status.fStartTime " 41 43 ." AND ISNULL(" . $key . "Status.fStopTime) " 42 44 ." AND ISNULL(" . $key . "Status.fReturnCode), 'running', " 45 //failed 43 46 ." IF (NOT ISNULL(" . $key . "Status.fStartTime) " 44 47 ." AND NOT ISNULL(" . $key . "Status.fStopTime) " 45 ." AND ISNULL(" . $key . "Status.fReturnCode), 'done', 'failed' " 46 ." )))) AS '". $key . "', "; 48 ." AND NOT ISNULL(" . $key . "Status.fReturnCode), 'failed', " 49 //done or done and avail 50 ." IF (NOT ISNULL(" . $key . "Status.fStartTime) " 51 ." AND NOT ISNULL(" . $key . "Status.fStopTime) " 52 ." AND ISNULL(" . $key . "Status.fReturnCode)" 53 ." AND ISNULL(" . $key . "Status.fAvailable), 'done', 'done and avail' " 54 ." ))))) AS '". $key . "', "; 47 55 } 48 56 $query0 .= " COUNT(*) as '# Files' "; 49 57 $query0 .= ", SUM(fNumEvents) as '" . $alias["SUM(fNumEvents)"] . "' "; 58 $query0 .= ", SUM(fNumEvents*fNumReUseShowers) as '" . $alias["SUM(fNumEvents*fNumReUseShowers)"] . "' "; 50 59 } 51 60 else
Note:
See TracChangeset
for help on using the changeset viewer.