Ignore:
Timestamp:
02/23/12 16:39:10 (13 years ago)
Author:
Daniela Dorner
Message:
added new variables, adapted initial menu settings
File:
1 edited

Legend:

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

    r12777 r12930  
    1919            //don't put a '#' at the beginning of the alias, else SortBy won't work anymore
    2020            $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' ";
    2627
    2728            foreach ($_GET as $key => $element)
     
    3334            if (!empty($_GET["fComments"]))
    3435            {
    35                 $query0 .= ", if (Count(fComment)>0, Concat('<a&ws;id=\'commentcell', fRunNUmber, 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?fRunNumber=',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>'), ' ') ";
    3738                $query0 .= " as 'Comments'";
    3839            }
     
    4546            if (($_GET[$key]=="On" || $groups>0))// && !empty($joins[$key]))
    4647                $query0 .= GetJoin($fromtable, $key);
    47         $query0 .= " LEFT JOIN RunComments USING (fRunNumber, fFileNumber) ";
     48        $query0 .= " LEFT JOIN RunComments USING (fNight, fRunID) ";
    4849
    4950        foreach ($checkwhere as $key => $element)
     
    7172        {
    7273            $startdate=substr($_GET["fStartDate"], 0, 10);
    73             if ($startdate=="0000-00-00")
    74                 $query0 .=" fRunNumber >= " . $startdate . " ";
    75             else
    76                 $query0 .= " fRunNumber >= " . $startdate . " - 1 ";
     74//            if ($startdate=="0000-00-00")
     75                $query0 .=" fNight >= " . $startdate . " ";
     76//            else
     77//                $query0 .= " fNight >= " . $startdate . " - 1 ";
    7778        }
    7879
     
    8384
    8485            $stopdate=substr($_GET["fStopDate"], 0, 10);
    85             $query0 .= " AND fRunNumber <= " . $stopdate . "  ";
     86            $query0 .= " AND fNight <= " . $stopdate . "  ";
    8687        }
    8788
     
    99100        }
    100101        else
    101             $query0 .= " GROUP BY fRunNumber, fFileNumber ";
     102            $query0 .= " GROUP BY fNight, fRunID ";
    102103
    103104
     
    128129
    129130        if (empty($_GET["fNumResults"]))
    130             $_GET["fNumResults"]="20";
     131            $_GET["fNumResults"]="200";
    131132           
    132133        if (empty($_GET["fNumEvents"]))
     
    181182            $_GET["fFitsFileErrors"]=$first?"Off":"";
    182183
    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":"";
    185192
    186193        if (empty($_GET["fMd5sumRaw"]))
     
    197204
    198205        if (empty($_GET["fThresholdMedian"]))
    199             $_GET["fThresholdMedian"]=$first?"Off":"";
     206            $_GET["fThresholdMedian"]=$first?"On":"";
    200207
    201208        if (empty($_GET["fBiasVoltageMedian"]))
     
    207214        if (empty($_GET["fDeclination"]))
    208215            $_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":"";
    209222
    210223    }
     
    255268        CheckBox("fROITimeMarker",    "roi-tm");
    256269        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");
    258274        CheckBox("fMd5sumRaw",         "md5");
    259275        CheckBox("fMd5sumRawZip",      "md5(gz)");
     
    267283        CheckBox("fRightAscension",    "RA");
    268284        CheckBox("fDeclination",    "Dec");
     285        CheckBox("fZenithDistanceMean",    "ZdMean");
     286        CheckBox("fAzimuthMean",    "AzMean");
    269287
    270288        printf("  </tr>\n");
     
    273291
    274292        if (empty($_GET["fStartDate"]))
    275             $timemin = GetMin("fRunNumber", "RunInfo", $host, $user, $pw, $db);
     293            $timemin = GetMin("fNight", "RunInfo", $host, $user, $pw, $db);
    276294        else
    277295            $timemin = $_GET["fStartDate"];
    278296
    279297        if (empty($_GET["fStopDate"]))
    280             $timemax = GetMax("fRunnumber", "RunInfo", $host, $user, $pw, $db);
     298            $timemax = GetMax("fNight", "RunInfo", $host, $user, $pw, $db);
    281299        else
    282300            $timemax = $_GET["fStopDate"];
Note: See TracChangeset for help on using the changeset viewer.