Merge "Make it possible to sort on simple custom columns"
[ninja.git] / modules / reports / views / summary / options.php
blobc38eef1992f56e692537eda740c0172dd6182494
1 <?php defined('SYSPATH') OR die('No direct access allowed.'); ?>
2 <form action="<?php echo url::base(true) ?>summary/generate" method="post" class="report_form">
3 <div class="standard setup-table">
4 <input type="hidden" name="report_id" value="<?php echo $options['report_id'] ?>" />
5 <table class="setup-tbl report_block auto_width">
6 <tr>
7 <td>
8 <?php echo help::render('standardreport') ?>
9 <label for="standardreport"><?php echo _('Standard type') ?></label>
10 </td>
11 <td></td>
12 <td>
13 <?php echo help::render('summary_items') ?>
14 <label for="summary_items"><?php echo _('Items to show') ?></label>
15 </td>
16 </tr>
17 <tr>
18 <td>
19 <?php echo form::dropdown(array('name' => 'standardreport'), $options->get_alternatives('standardreport'), $options['standardreport']); ?>
20 </td>
21 <td></td>
22 <td>
23 <?php echo form::input(array('name' => 'summary_items', 'maxlength' => 7), $options['summary_items']) ?>
24 </td>
25 </tr>
26 <tr>
27 <td colspan="3"><input id="reports_submit_button" type="submit" name="" value="<?php echo _('Show report') ?>" class="button create-report" /></td>
28 </tr>
29 </table>
30 </div>
31 </form>
32 <form action="<?php echo url::base(true) ?>summary/generate" method="post" class="report_form">
33 <div class="custom setup-table">
34 <input type="hidden" name="report_id" value="<?php echo $options['report_id'] ?>" />
35 <table class="setup-tbl custom report_block">
36 <tr>
37 <td colspan="3">
38 <label for="report_type"><?php echo help::render('report-type').' '._('Report type'); ?></label><br />
39 <select name="report_type" id="report_type">
40 <option value="hostgroups"><?php echo _('Hostgroups') ?></option>
41 <option value="hosts"><?php echo _('Hosts') ?></option>
42 <option value="servicegroups"><?php echo _('Servicegroups') ?></option>
43 <option value="services"><?php echo _('Services') ?></option>
44 </select>
45 <input type="button" id="sel_report_type" class="button select20" value="<?php echo _('Select') ?>" /><div id="progress"></div>
46 </td>
47 </tr>
48 <tr id="filter_row">
49 <td colspan="3">
50 <?php echo _('Filter:') ?><br />
51 <input type="text" name="filter_field" id="filter_field" autocomplete=off size="10" value="">
52 <input type="button" name="clear_filter" id="clear_filter" value="<?php echo _('Clear') ?>">
53 </td>
54 </tr>
55 <tr data-show-for="hostgroups">
56 <td colspan="3">
57 <div class="left" style="width: 40%">
58 <label for="hostgroup_tmp"><?php echo _('Available hostgroups') ?></label><br />
59 <select id="hostgroup_tmp" multiple="multiple" size='8' class="multiple" style="width: 100%">
60 </select>
61 </div>
62 <div class="left" style="padding-top: 40px;">
63 <input type="button" value="&gt;" id="mv_hg_r" class="button arrow-right" /><br />
64 <input type="button" value="&lt;" id="mv_hg_l" class="button arrow-left" />
65 </div>
66 <div class="left" style="width: 40%">
67 <label for="hostgroup"><?php echo _('Selected hostgroups') ?></label><br />
68 <select name="hostgroup[]" id="hostgroup" multiple="multiple" size="8" class="multiple" style="width: 100%">
69 </select>
70 </div>
71 </td>
72 </tr>
73 <tr data-show-for="servicegroups">
74 <td colspan="3">
75 <div class="left" style="width: 40%">
76 <label for="servicegroup_tmp"><?php echo _('Available servicegroups') ?></label><br />
77 <select id="servicegroup_tmp" multiple="multiple" size='8' class="multiple" style="width: 100%">
78 </select>
79 </div>
80 <div class="left" style="padding-top: 40px;">
81 <input type="button" value="&gt;" id="mv_sg_r" class="button arrow-right" /><br />
82 <input type="button" value="&lt;" id="mv_sg_l" class="button arrow-left" />
83 </div>
84 <div class="left" style="width: 40%">
85 <label for="servicegroup"><?php echo _('Selected servicegroups') ?></label><br />
86 <select name="servicegroup[]" id="servicegroup" multiple="multiple" size="8" class="multiple" style="width: 100%">
87 </select>
88 </div>
89 </td>
90 </tr>
91 <tr data-show-for="hosts">
92 <td colspan="3">
93 <div class="left" style="width: 40%">
94 <label for="host_tmp"><?php echo _('Available hosts') ?></label><br />
95 <select id="host_tmp" multiple="multiple" size="8" class="multiple" style="width: 100%">
96 </select>
97 </div>
98 <div class="left" style="padding-top: 40px;">
99 <input type="button" value="&gt;" id="mv_h_r" class="button arrow-right" /><br />
100 <input type="button" value="&lt;" id="mv_h_l" class="button arrow-left" />
101 </div>
102 <div class="left" style="width: 40%">
103 <label for="host_name"><?php echo _('Selected hosts') ?></label><br />
104 <select name="host_name[]" id="host_name" multiple="multiple" size="8" class="multiple" style="width: 100%">
105 </select>
106 </div>
107 </td>
108 </tr>
109 <tr data-show-for="services">
110 <td colspan="3">
111 <div class="left" style="width: 40%">
112 <label for="service_tmp"><?php echo _('Available services') ?></label><br />
113 <select id="service_tmp" multiple="multiple" size="8" class="multiple" style="width: 100%">
114 </select>
115 </div>
116 <div class="left" style="padding-top: 40px;">
117 <input type="button" value="&gt;" id="mv_s_r" class="button arrow-right" /><br />
118 <input type="button" value="&lt;" id="mv_s_l" class="button arrow-left" />
119 </div>
120 <div class="left" style="width: 40%">
121 <label for="service_description"><?php echo _('Selected services') ?></label><br />
122 <select name="service_description[]" id="service_description" multiple="multiple" size="8" class="multiple" style="width: 100%">
123 </select>
124 </div>
125 </td>
126 </tr>
127 </table>
128 <h2><?php echo _('Report Settings'); ?></h2>
129 <hr />
130 <table id="report" class="setup-tbl custom report_block">
131 <tr>
132 <td>
133 <label for="summary_type"><?php echo help::render('summary_type').' '._('Summary type') ?></label>
134 </td>
135 <td></td>
136 <td>
137 <?php echo help::render('summary_items') ?>
138 <label for="summary_items"><?php echo _('Items to show') ?></label>
139 </td>
140 </tr>
141 <tr>
142 <td><?php echo form::dropdown('summary_type', $options->get_alternatives('summary_type'), $options['summary_type']) ?></td>
143 <td style="width: 10px">&nbsp;</td>
144 <td>
145 <?php echo form::input(array('name' => 'summary_items', 'size' => 3, 'maxlength' => 3), $options['summary_items']) ?>
146 </td>
147 </tr>
148 <tr>
149 <td><label for="report_period"><?php echo help::render('reporting_period').' '._('Reporting period') ?></label></td>
150 <td style="width: 10px">&nbsp;</td>
151 <td><label for="rpttimeperiod"><?php echo help::render('report_time_period').' '._('Report time period') ?></label></td>
152 </tr>
153 <tr>
154 <td><?php echo form::dropdown('report_period', $options->get_alternatives('report_period'), $options['report_period']); ?></td>
155 <td style="width: 18px">&nbsp;</td>
156 <td><?php echo form::dropdown(array('name' => 'rpttimeperiod'), $options->get_alternatives('rpttimeperiod'), $options['rpttimeperiod']); ?></td>
157 </tr>
158 <tr id="display" style="display: none; clear: both;">
159 <td><label for="cal_start"><?php echo help::render('start-date', 'reports').' '._('Start date') ?></label> (<em id="start_time_tmp"><?php echo _('Click calendar to select date') ?></em>)<br />
160 <input type="text" id="cal_start" name="cal_start" maxlength="10" autocomplete="off" value="<?php echo $options->get_date('start_time') ?>" class="date-pick datepick-start" title="<?php echo _('Date Start selector') ?>" />
161 <input type="text" maxlength="5" name="time_start" id="time_start" class="time_start" value="<?php echo $options->get_time('start_time') ?>">
162 </td>
163 <td>&nbsp;</td>
164 <td><label for="cal_end"><?php echo help::render('end-date', 'reports').' '._('End date') ?></label> (<em id="end_time_tmp"><?php echo _('Click calendar to select date') ?></em>)<br />
165 <input type="text" id="cal_end" name="cal_end" maxlength="10" autocomplete="off" value="<?php echo $options->get_date('end_time') ?>" class="date-pick datepick-end" title="<?php echo _('Date End selector') ?>" />
166 <input type="text" maxlength="5" name="time_end" id="time_end" class="time_end" value="<?php echo $options->get_time('end_time') ?>">
167 </td>
168 </tr>
170 <tr>
171 <td>
172 <label for="alert_types"><?php echo help::render('alert_types').' '._('Alert types') ?></label><br />
173 <?php echo form::dropdown('alert_types', $options->get_alternatives('alert_types'), $options['alert_types']) ?>
174 </td>
175 <td>&nbsp;</td>
176 <td>
177 <label for="state_types"><?php echo help::render('state_types').' '._('State types') ?></label><br />
178 <?php echo form::dropdown('state_types', $options->get_alternatives('state_types'), $options['state_types']) ?>
179 </td>
180 </tr>
181 <tr>
182 <td>
183 <label for="host_states"><?php echo help::render('host_states').' '._('Host states') ?></label><br />
184 <?php echo form::dropdown('host_states', $options->get_alternatives('host_states'), $options['host_states']) ?>
185 </td>
186 <td>&nbsp;</td>
187 <td>
188 <label for="service_states"><?php echo help::render('service_states').' '._('Service states') ?></label><br />
189 <?php echo form::dropdown('service_states', $options->get_alternatives('service_states'), $options['service_states']) ?>
190 </td>
191 </tr>
192 <tr>
193 <td>
194 <?php echo help::render('include_long_output') ?>
195 <input type="checkbox" name="include_long_output" id="include_long_output" <?php echo $options['include_long_output'] ? 'checked="checked"' : null ?> />
196 <label for="include_long_output"><?php echo _('Include full output') ?></label>
197 </td>
198 <td></td>
199 <td>
200 </td>
201 </tr>
202 <tr>
203 <td>
204 <?php echo help::render('skin') ?>
205 <label for="skin" id="skin_lbl"><?php echo _('Skin') ?></label>
206 </td>
207 <td></td>
208 <td>
209 <?php echo help::render('description') ?>
210 <label for="description" id="descr_lbl"><?php echo _('Description') ?></label>
211 </td>
212 </tr>
213 <tr>
214 <td>
215 <?php echo form::dropdown(array('name' => 'skin'), ninja::get_skins(), $options['skin']); ?>
216 </td>
217 <td></td>
218 <td>
219 <?php echo form::textarea('description', $options['description']); ?>
220 </td>
221 </tr>
222 <tr>
223 <td colspan="3"><input id="reports_submit_button" type="submit" name="" value="<?php echo _('Show report') ?>" class="button create-report" /></td>
224 </tr>
225 </table>
226 </div>
227 </form>