histogram: Make histograms crash less
[ninja.git] / application / views / showlog / showlog.php
blob3bf15a5d71201d62f8f8a86cd4e1bf47c6214801
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')); ?>
5 <div>
6 <table class="showlog no-borders">
7 <tr>
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>
12 </td>
13 <td class="showlog_options">
14 <h3><?php echo _('Host state options'); ?></h3>
15 <?php
16 $i = 0;
17 foreach ($host_state_options as $k => $v) {
18 $i++;
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>
28 <?php
29 $i = 0;
30 foreach ($service_state_options as $k => $v) {
31 $set = isset($options['service_state_options'][$v]);
32 $i++;
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'); ?>
48 </td>
49 </tr>
50 <tr>
51 <td colspan="4">
52 <table style="width: 50%">
53 <tr>
54 <td>
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']) : ''; ?>">
58 </td>
59 <td>
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']) : ''; ?>">
63 </td>
64 </tr>
65 </table>
66 </td>
67 </tr>
68 <tr>
69 <td colspan="4">
70 <?php
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');
84 </td>
85 </tr>
86 </table>
87 <?php echo form::close(); ?>
88 </div>
89 <div class="long_output">
90 <?php
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();
96 </div>