Merge "Make it possible to sort on simple custom columns"
[ninja.git] / modules / reports / views / summary / toplist.php
blob54d92e83871ad31bffc877de9eb420283af54d76
1 <?php defined('SYSPATH') OR die("No direct access allowed"); ?>
2 <div class="report-block">
3 <table>
4 <tr>
5 <th><?php echo _('Rank'); ?></th>
6 <th><?php echo _('Producer Type'); ?></th>
7 <th><?php echo _('Host'); ?></th>
8 <th><?php echo _('Service'); ?></th>
9 <th><?php echo _('Total Alerts'); ?></th>
10 </tr>
11 <?php
12 $i=0;
13 if (count($result)>0 && !empty($result)) {
14 foreach ($result as $rank => $ary) {
15 $i++;
16 echo '<tr class="'.($i%2 == 0 ? 'odd' : 'even').'">';
17 if (empty($ary['service_description'])) {
18 $producer = _('Host');
19 $ary['service_description'] = 'N/A';
20 } else {
21 $producer = _('Service');
22 $ary['service_description'] = html::anchor(base_url::get().'extinfo/details/?type=service&host='.urlencode($ary['host_name']).'&service='.urlencode($ary['service_description']), $ary['service_description']);
25 <td class="icon"><?php echo $rank; ?></td>
26 <td><?php echo $producer; ?></td>
27 <td><?php echo html::anchor(base_url::get().'extinfo/details/?type=host&host='.urlencode($ary['host_name']), $ary['host_name']) ?></td>
28 <td><?php echo $ary['service_description']; ?></td>
29 <td><?php echo $ary['total_alerts']; ?></td>
30 </tr>
31 <?php }
32 }?>
33 </table>
34 </div>