Ignore:
Timestamp:
10/18/10 17:14:38 (14 years ago)
Author:
Daniela Dorner
Message:
added 'done and avail' as status option
File:
1 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;
Note: See TracChangeset for help on using the changeset viewer.