1 <?php
defined('SYSPATH') or die('No direct access allowed.');
2 $date_format = cal
::get_calendar_format(true); ?
>
3 <h1
><?php
echo _('Event Log'); ?
></h1
>
4 <?php
echo form
::open('showlog/'.Router
::$method, array('id' => 'summary_form', 'method' => 'get')); ?
>
6 <table
class="showlog no-borders">
8 <td
class="showlog_options">
9 <h3
><?php
echo _('State type options'); ?
></h3
>
10 <label
><?php
echo form
::checkbox('state_type[soft]', 1, isset($options['state_type']['soft'])).' '._('Soft states'); ?
></label
><br
/>
11 <label
><?php
echo form
::checkbox('state_type[hard]', 1, isset($options['state_type']['hard'])).' '._('Hard states'); ?
></label
>
13 <td
class="showlog_options">
14 <h3
><?php
echo _('Host state options'); ?
></h3
>
17 foreach ($host_state_options as $k => $v) {
19 $set = isset($options['host_state_options'][$v]);
20 $name = 'host_state_options[' . $v . ']';
21 //echo ($i%2 == 0) ? '': '<tr>';
22 echo "<label>".form
::checkbox($name, 1, $set).' '.$k.'</label><br />';
23 //echo ($i%2 == 0) ? '</tr>': ''."\n";
26 </td
><td
class="showlog_options">
27 <h3
><?php
echo _('Service state options'); ?
></h3
>
30 foreach ($service_state_options as $k => $v) {
31 $set = isset($options['service_state_options'][$v]);
33 $name = 'service_state_options[' . $v . ']';
34 //echo ($i%2 == 0) ? '': '<tr>';
35 echo '<label>'.form
::checkbox($name,1, $set).' '.$k.'</label><br />';
36 //echo ($i%2 == 0) ? '</tr>': ''."\n";
39 </td
><td
class="showlog_options">
40 <h3
><?php
echo _('General options'); ?
></h3
>
41 <label
><?php
echo form
::checkbox('hide_flapping', 1, isset($options['hide_flapping'])).' '._('Hide flapping alerts'); ?
></label
><br
/>
42 <label
><?php
echo form
::checkbox('hide_downtime', 1, isset($options['hide_downtime'])).' '._('Hide downtime alerts'); ?
></label
><br
/>
43 <?php
echo $is_authorized ?
'<label>'.form
::checkbox('hide_process', 1, isset($options['hide_process'])).' '._('Hide process messages').'</label><br />' : ''; ?
>
44 <label
><?php
echo form
::checkbox('hide_initial', 1, isset($options['hide_initial'])).' '._('Hide initial and current states'); ?
></label
><br
/>
45 <label
><?php
echo form
::checkbox('hide_logrotation', 1, isset($options['hide_logrotation'])).' '._('Hide logrotation messages'); ?
></label
><br
/>
46 <?php
echo $is_authorized ?
'<label>'.form
::checkbox('hide_commands', 1, isset($options['hide_commands'])).' '._('Hide external commands').'</label><br />' : ''; ?
>
47 <label
><?php
echo form
::checkbox('parse_forward', 1, isset($options['parse_forward'])).' '._('Older entries first'); ?
>
52 <table style
="width: 50%">
55 <h3
><?php
echo _('First time') ?
></h3
> (<em id
="start_time_tmp"><?php
echo _('Click calendar to select date') ?
></em
>)<br
/>
56 <input type
="text" value
="<?php echo isset($options['first']) && !empty($options['first']) ? date($date_format, $options['first']) : ''; ?>" id
="cal_start" name
="cal_start" maxlength
="10" autocomplete
="off" class="date-pick datepick-start" title
="<?php echo _('Start date') ?>" />
57 <input type
="text" maxlength
="5" name
="time_start" id
="time_start" class="time_start" value
="<?php echo isset($options['first']) && !empty($options['first']) ? date('H:i', $options['first']) : ''; ?>">
60 <h3
><?php
echo _('Last time') ?
></h3
> (<em id
="end_time_tmp"><?php
echo _('Click calendar to select date') ?
></em
>)<br
/>
61 <input type
="text" value
="<?php echo isset($options['last']) && !empty($options['last']) ? date($date_format, $options['last']) : ''; ?>" id
="cal_end" name
="cal_end" maxlength
="10" autocomplete
="off" class="date-pick datepick-end" title
="<?php echo _('Start date') ?>" />
62 <input type
="text" maxlength
="5" name
="time_end" id
="time_end" class="time_end" value
="<?php echo isset($options['last']) && !empty($options['last']) ? date('H:i', $options['last']) : ''; ?>">
71 echo form
::hidden('first', '');
72 echo form
::hidden('last', '');
73 if (isset($options['host'])) {
74 foreach ($options['host'] as $h)
75 echo form
::hidden('host[]', $h);
77 if (isset($options['service'])) {
78 foreach ($options['service'] as $s) {
79 echo form
::hidden('service[]', $s);
82 echo form
::submit('Update', 'Update');
87 <?php
echo form
::close(); ?
>
89 <div
class="long_output">
91 # this hidden thing marks "no options chosen" as a chosen set of options
92 # so we avoid overriding "no options" with the default ones
94 $this->_show_log_entries();