Added filterable to summary and histogram controllers
[ninja.git] / modules / reports / views / alert_history / options.php
blob32e4432b85955a1f17ca7ca9fc47aedd2a1d32f9
1 <?php defined('SYSPATH') or die('No direct access allowed.'); ?>
2 <div class="report_block">
3 <h2><?php echo _('Report Mode'); ?></h2>
4 <hr/>
5 <table class="setup-tbl"><!--id="main_table"-->
6 <tr>
7 <td colspan="3">
8 <input type="checkbox" name="host_name" id="show_all" value="<?php echo Report_options::ALL_AUTHORIZED ?>" <?php echo $options['objects'] === Report_options::ALL_AUTHORIZED?'checked="checked"':''?>/>
9 <label for="show_all">Show all</label>
10 </td>
11 </tr>
12 </table>
13 <?php echo new View('reports/objselector'); ?>
14 </div>
15 <div class="report_block">
16 <h2><?php echo _('Report Options'); ?></h2>
17 <hr/>
18 <table class="setup-tbl">
19 <tr>
20 <td>
21 <?php echo _('Alert Types') ?><br />
22 <?php echo form::dropdown('alert_types', $options->get_alternatives('alert_types'), $options['alert_types']) ?>
23 </td>
24 <td>&nbsp;</td>
25 <td>
26 <?php echo _('State Types') ?><br />
27 <?php echo form::dropdown('state_types', $options->get_alternatives('state_types'), $options['state_types']) ?>
28 </td>
29 </tr>
30 <tr>
31 <td>
32 <?php echo help::render('host_states') ?>
33 <?php echo _('Host states to include'); ?><br>
34 <?php
35 foreach ($options->get_alternatives('host_states') as $id => $name) {
36 echo "<input type=\"checkbox\" name=\"host_states[$id]\" id=\"host_states[$id]\" value=\"$id\" ".($options['host_states'] & $id?'checked="checked"':'')." style=\"margin-top: 4px; margin-left: 14px\"> <label for=\"host_states[$id]\">".ucfirst($name)."</label>\n";
37 } ?>
38 </td>
39 <td></td>
40 <td>
41 <?php echo help::render('service_states') ?>
42 <?php echo _('Service states to include'); ?><br>
43 <?php
44 foreach ($options->get_alternatives('service_states') as $id => $name) {
45 if ($name === 'excluded')
46 continue;
47 echo "<input type=\"checkbox\" name=\"service_states[$id]\" id=\"service_states[$id]\" value=\"$id\" ".($options['service_states'] & $id?'checked="checked" ':'')." style=\"margin-top: 4px; margin-left: 14px\"> <label for=\"service_states[$id]\">".ucfirst($name)."</label>\n";
48 } ?>
49 </td>
50 </tr>
51 <tr>
52 <td><?php echo '<label>'.form::checkbox('include_downtime', 1, $options['include_downtime']).' '._('Show downtime alerts'); ?></label></td>
53 <td>&nbsp;</td>
54 <td><?php echo '<label>'.form::checkbox('include_process', 1, $options['include_process']).' '._('Show process messages').'</label>'; ?></td>
55 </td>
56 </tr>
57 <tr>
58 <td>
59 <?php echo help::render('include_long_output') ?>
60 <input type="checkbox" name="include_long_output" id="include_long_output" <?php echo $options['include_long_output'] ? 'checked="checked"' : null ?> />
61 <label for="include_long_output"><?php echo _('Include full output') ?></label>
62 </td>
63 <td>&nbsp;</td>
64 <td>
65 <?php echo '<label>'.form::checkbox('oldest_first', 1, $options['oldest_first']).' '._('Older entries first').'</label>'; ?>
66 </td>
67 </tr>
68 <tr>
69 <td>
70 <?php echo _('Report Period') ?><br />
71 <?php echo form::dropdown('report_period', $options->get_alternatives('report_period'), $options['report_period']); ?>
72 </td>
73 <td>&nbsp;</td>
74 <td>
75 <label for="filter_output"><?php echo _('Filter output') ?></label><br />
76 <input type="text" name="filter_output" id="filter_output" value="<?php echo $options['filter_output'] ?>" />
77 </td>
78 </tr>
79 <tr id="custom_time" style="display: none; clear: both;">
80 <td><?php echo help::render('start-date', 'reports').' '._('Start date') ?> (<em id="start_time_tmp"><?php echo _('Click calendar to select date') ?></em>)<br />
81 <input type="text" id="cal_start" name="cal_start" maxlength="10" autocomplete="off" class="date-pick datepick-start" title="<?php echo _('Date Start selector') ?>" value="<?php echo $options->get_date('start_time') ?>" />
82 <input type="text" maxlength="5" name="time_start" id="time_start" class="time_start" value="<?php echo $options->get_time('start_time') ?>">
83 </td>
84 <td>&nbsp;</td>
85 <td><?php echo help::render('end-date', 'reports').' '._('End date') ?> (<em id="end_time_tmp"><?php echo _('Click calendar to select date') ?></em>)<br />
86 <input type="text" id="cal_end" name="cal_end" maxlength="10" autocomplete="off" class="date-pick datepick-end" title="<?php echo _('Date End selector') ?>" value="<?php echo $options->get_date('end_time') ?>" />
87 <input type="text" maxlength="5" name="time_end" id="time_end" class="time_end" value="<?php echo $options->get_time('end_time') ?>" />
88 </td>
89 </tr>
90 <tr>
91 <td>
92 <label for="summary_items"><?php echo _('Items to show') ?></label>
93 <input type="text" name="summary_items" id="summary_items" value="<?php echo $options['summary_items'] ?>" />
94 </td>
95 </tr>
96 <tr>
97 <td colspan="3">
98 <?php echo form::submit('Update', 'Update'); ?>
99 </td>
100 </tr>
101 </table>
102 </div>