Changeset 6223

Show
Ignore:
Timestamp:
08/21/08 14:22:28 (3 months ago)
Author:
jmathis
Message:

improve downtime display and request

Location:
trunk/centreon/www/include/monitoring/downtime
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/centreon/www/include/monitoring/downtime/template/downtime.ihtml

    r6211 r6223  
    1919                        <td class="ListColPicker"><input type="checkbox" name='select[{$tdh.host_name};{$tdh.internal_downtime_id}]'></td> 
    2020                        <td class="ListColLeft">{$tdh.host_name}</td> 
    21                         <td class="ListColRight">{$tdh.scheduled_start_time}</td> 
    22                         <td class="ListColRight">{$tdh.scheduled_end_time}</td> 
    23                         <td class="ListColRight">{$tdh.duration}</td> 
     21                        <td class="ListColRight" width="120">{$tdh.scheduled_start_time}</td> 
     22                        <td class="ListColRight" width="120">{$tdh.scheduled_end_time}</td> 
     23                        <td class="ListColRight" width="60">{$tdh.duration}</td> 
    2424                        <td class="ListColCenter">{$tdh.author_name}</td> 
    2525                        <td class="ListColLeft">{$tdh.comment_data}</td> 
    26                         <td class="ListColLeft">{$tdh.is_fixed}</td> 
     26                        <td class="ListColCenter" width="50">{$tdh.is_fixed}</td> 
    2727                </tr> 
    2828                {/foreach} 
     
    5959                        <td class="ListColLeft">{$tds.host_name}</td> 
    6060                        <td class="ListColLeft">{$tds.service_description}</td> 
    61                         <td class="ListColRight">{$tds.scheduled_start_time}</td> 
    62                         <td class="ListColRight">{$tds.scheduled_end_time}</td> 
     61                        <td class="ListColRight" width="120">{$tds.scheduled_start_time}</td> 
     62                        <td class="ListColRight" width="120">{$tds.scheduled_end_time}</td> 
    6363                        <td class="ListColRight">{$tds.duration}</td> 
    6464                        <td class="ListColCenter">{$tds.author_name}</td> 
    6565                        <td class="ListColLeft">{$tds.comment_data}</td> 
    66                         <td class="ListColLeft">{$tds.is_fixed}</td> 
     66                        <td class="ListColCenter" width="50">{$tds.is_fixed}</td> 
    6767                </tr> 
    6868                {/foreach} 
  • trunk/centreon/www/include/monitoring/downtime/viewDowntime.php

    r6211 r6223  
    4949         * Hosts Comments 
    5050         */ 
    51         $rq2 =  " SELECT dtm.internal_downtime_id, dtm.entry_time,dtm.duration, dtm.author_name, dtm.comment_data, dtm.is_fixed, dtm.scheduled_start_time, dtm.scheduled_end_time, obj.name1 host_name, obj.name2 service_description " . 
     51        $rq2 =  " SELECT dtm.internal_downtime_id, dtm.entry_time, dtm.duration, dtm.author_name, dtm.comment_data, dtm.is_fixed, dtm.scheduled_start_time, dtm.scheduled_end_time, obj.name1 host_name, obj.name2 service_description " . 
    5252                        " FROM ".$ndo_base_prefix."downtimehistory dtm, ".$ndo_base_prefix."objects obj " . 
    53                         " WHERE obj.name1 IS NOT NULL AND obj.name2 IS  NULL AND obj.object_id = dtm.object_id AND dtm.was_cancelled = '0' ORDER BY dtm.actual_start_time"; 
     53                        " WHERE obj.name1 IS NOT NULL AND obj.name2 IS  NULL AND obj.object_id = dtm.object_id AND dtm.was_cancelled = '0' AND dtm.scheduled_end_time > '".date("Y-m-d G:i:s", time())."' ORDER BY dtm.actual_start_time"; 
    5454        $DBRESULT_NDO =& $pearDBndo->query($rq2); 
    5555        if (PEAR::isError($DBRESULT_NDO)) 
     
    5757        for ($i = 0; $data =& $DBRESULT_NDO->fetchRow(); $i++){ 
    5858                $tab_downtime_host[$i] = $data; 
     59                $tab_downtime_host[$i]["duration"] .= " "._("s"); 
    5960        } 
    6061        unset($data);    
     
    7071        $rq2 =  " SELECT dtm.internal_downtime_id, dtm.entry_time, dtm.duration, dtm.author_name, dtm.comment_data, dtm.is_fixed, dtm.scheduled_start_time, dtm.scheduled_end_time, obj.name1 host_name, obj.name2 service_description " . 
    7172                        " FROM ".$ndo_base_prefix."downtimehistory dtm, ".$ndo_base_prefix."objects obj " . 
    72                         " WHERE obj.name1 IS NOT NULL AND obj.name2 IS NOT NULL AND obj.object_id = dtm.object_id AND dtm.was_cancelled = '0' ORDER BY dtm.actual_start_time"; 
     73                        " WHERE obj.name1 IS NOT NULL AND obj.name2 IS NOT NULL AND obj.object_id = dtm.object_id AND dtm.was_cancelled = '0' AND dtm.scheduled_end_time > '".date("Y-m-d G:i:s", time())."' ORDER BY dtm.actual_start_time"; 
    7374        $DBRESULT_NDO =& $pearDBndo->query($rq2); 
    7475        if (PEAR::isError($DBRESULT_NDO))