Changeset 10012 for trunk


Ignore:
Timestamp:
10/18/10 17:14:38 (14 years ago)
Author:
Daniela Dorner
Message:
added 'done and avail' as status option
Location:
trunk/Mars/datacenter/db
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/datacenter/db/include.php

    r9599 r10012  
    6363        $txt .= " ";
    6464        break;
    65     case 1://done
     65    case 1://done and avail
    6666        $txt .= " NOT ISNULL(" . $name . "Status.fStartTime) AND "
    6767            ." NOT ISNULL(" . $name . "Status.fStopTime) AND "
     68            ." NOT ISNULL(" . $name . "Status.fAvailable) AND "
    6869            ." ISNULL(" . $name . "Status.fReturnCode) AND ";
    6970        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
    7178        $txt .= " ISNULL(" . $name . "Status.fStartTime) AND "
    7279            ." ISNULL(" . $name . "Status.fStopTime) AND "
    7380            ." ISNULL(" . $name . "Status.fReturnCode) AND ";
    7481        break;
    75     case 3://not to be done
     82    case 4://not to be done
    7683        $txt .= $name ."Status.fStartTime='1970-01-01 00:00:00' AND "
    7784            . $name ."Status.fStopTime='1970-01-01 00:00:00' AND ";
    7885        break;
    79     case 4://running
     86    case 5://running
    8087        $txt .= " NOT ISNULL(" . $name . "Status.fStartTime) AND "
    8188            ." DATE_SUB(Now(),INTERVAL " . $timelimit . " HOUR) < " . $name . "Status.fStartTime AND "
     
    8390            ." ISNULL(" . $name . "Status.fReturnCode) AND ";
    8491        break;
    85     case 5://failed
     92    case 6://failed
    8693        $txt .= " NOT ISNULL(" . $name . "Status.fStartTime) AND "
    8794            ." NOT ISNULL(" . $name . "Status.fStopTime) AND "
    8895            ." NOT ISNULL(" . $name . "Status.fReturnCode) AND ";
    8996        break;
    90     case 6://crashed
     97    case 7://crashed
    9198        $txt .= " NOT ISNULL(" . $name . "Status.fStartTime) AND "
    9299            ." DATE_SUB(Now(),INTERVAL " . $timelimit . " HOUR) > " . $name . "Status.fStartTime AND "
     
    94101            ." ISNULL(" . $name . "Status.fReturnCode) AND ";
    95102        break;
    96     case 7://group by
     103    case 8://group by
    97104        $txt .= "";
    98105        break;
     
    117124    $status = array
    118125        ( 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",
    126134        );
    127135
    128136    $stat=$_GET[$var];
    129     for ($i=0; $i<8; $i++)
     137    for ($i=0; $i<9; $i++)
    130138    {
    131139        if ($stat==$i)
     
    347355    foreach ($_GET as $key => $element)
    348356        if ($key==$column."Status")
    349             if ($element==7)
     357            if ($element==8)
    350358                return -1;
    351359    return 0;
  • trunk/Mars/datacenter/db/mcinfo.php

    r9895 r10012  
    3333                            ." AND ISNULL(" . $key . "Status.fStopTime) "
    3434                            ." AND ISNULL(" . $key . "Status.fReturnCode), 'not done', "
     35                            //crashed
    3536                            ." IF (NOT ISNULL(" . $key . "Status.fStartTime) "
    3637                            ." AND DATE_SUB(Now(),INTERVAL " . $timelimits[$key] . " HOUR) > " . $key . "Status.fStartTime "
    3738                            ." AND ISNULL(" . $key . "Status.fStopTime) "
    3839                            ." AND ISNULL(" . $key . "Status.fReturnCode), 'crashed', "
     40                            //running
    3941                            ." IF (NOT ISNULL(" . $key . "Status.fStartTime) "
    4042                            ." AND DATE_SUB(Now(),INTERVAL " . $timelimits[$key] . " HOUR) < " . $key . "Status.fStartTime "
    4143                            ." AND ISNULL(" . $key . "Status.fStopTime) "
    4244                            ." AND ISNULL(" . $key . "Status.fReturnCode), 'running', "
     45                            //failed
    4346                            ." IF (NOT ISNULL(" . $key . "Status.fStartTime) "
    4447                            ." 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 . "', ";
    4755            }
    4856            $query0 .= " COUNT(*) as '# Files' ";
    4957            $query0 .= ", SUM(fNumEvents) as '" . $alias["SUM(fNumEvents)"] . "' ";
     58            $query0 .= ", SUM(fNumEvents*fNumReUseShowers) as '" . $alias["SUM(fNumEvents*fNumReUseShowers)"] . "' ";
    5059        }
    5160        else
Note: See TracChangeset for help on using the changeset viewer.