Merge branch 'maint/7.0'
[ninja.git] / application / widgets / tac_monfeat / view.php
blob0a060a7d632ad6da875e1f8ea0de7484f9517199
1 <?php defined('SYSPATH') OR die('No direct access allowed.'); ?>
2 <table class="tablestat-widget" id="mmm">
3 <colgroup>
4 <col style="width: 20%" />
5 <col style="width: 20%" />
6 <col style="width: 20%" />
7 <col style="width: 20%" />
8 <col style="width: 20%" />
9 </colgroup>
10 <tr>
11 <th class="<?php echo $cmd_flap_status ?>">
12 <strong><?php echo $flap_detect_header_label ?></strong>
13 <?php $current = str_replace('_monfeat','',$cmd_flap_status); ?>
14 <a title="Click to <?php echo ( $current == "enabled" ) ? "disable" : "enable" ?>" href="<?php echo $cmd_flap_link ?>">
15 <?php echo $current; ?>
16 </a>
17 </th>
18 <th class="<?php echo $cmd_notification_status ?>">
19 <strong><?php echo $notifications_header_label ?></strong>
20 <?php $current = str_replace('_monfeat','',$cmd_notification_status); ?>
21 <a title="Click to <?php echo ( $current == "enabled" ) ? "disable" : "enable" ?>" href="<?php echo $cmd_notification_link ?>">
22 <?php
23 echo $current;
25 </a>
26 </th>
27 <th class="<?php echo $cmd_event_status ?>">
28 <strong><?php echo $eventhandler_header_label ?></strong>
29 <?php $current = str_replace('_monfeat','',$cmd_event_status); ?>
30 <a title="Click to <?php echo ( $current == "enabled" ) ? "disable" : "enable" ?>" href="<?php echo $cmd_event_link ?>">
31 <?php echo $current; ?>
32 </a>
33 </th>
34 <th class="<?php echo $cmd_activecheck_status ?>">
35 <strong><?php echo $activechecks_header_label ?></strong>
36 <?php $current = str_replace('_monfeat','',$cmd_activecheck_status); ?>
37 <a title="Click to <?php echo ( $current == "enabled" ) ? "disable" : "enable" ?>" href="<?php echo $cmd_activecheck_link ?>">
38 <?php echo $current; ?>
39 </a>
40 </th>
41 <th class="<?php echo $cmd_passivecheck_status ?>">
42 <strong><?php echo $passivechecks_header_label ?></strong>
43 <?php $current = str_replace('_monfeat','',$cmd_passivecheck_status); ?>
44 <a title="Click to <?php echo ( $current == "enabled" ) ? "disable" : "enable" ?>" href="<?php echo $cmd_passivecheck_link ?>">
45 <?php echo $current; ?>
46 </a>
47 </th>
48 </tr>
49 <tr>
50 <td>
51 <table class="no_border">
52 <?php if ($enable_flap_detection) { ?>
53 <?php if ($flap_disabled_services > 0) {?>
54 <tr>
55 <td class="icon"><span class="icon-16 x16-shield-disabled" title="<?php echo _('Disabled'); ?>"></span></td>
56 <td style="white-space: normal">
57 <?php echo $flap_disabled_services.' '.($flap_disabled_services==1 ? $lable_service_singular : $lable_service_plural).' '.$lable_disabled ?>
58 </td>
59 </tr>
60 <?php } else { ?>
61 <tr>
62 <td class="icon"><span class="icon-16 x16-shield-ok" title="<?php echo _('Enabled'); ?>"></span></td>
63 <td style="white-space: normal"><?php echo $lable_all_services.' '.$lable_enabled ?></td>
64 </tr>
65 <?php } if ($flapping_services > 0) {?>
66 <tr>
67 <td class="icon"><span class="icon-16 x16-shield-disabled" title="<?php echo _('Disabled'); ?>"></span></td>
68 <td style="white-space: normal"><?php echo html::anchor('/status/service/?service_props='.nagstat::SERVICE_IS_FLAPPING ,$flapping_services.' '.($flapping_services==1 ? $lable_service_singular : $lable_service_plural).' '.$lable_flapping) ?></td>
69 </tr>
70 <?php } else { ?>
71 <tr>
72 <td class="icon"><span class="icon-16 x16-shield-ok" title="<?php echo _('Enabled'); ?>"></span></td>
73 <td style="white-space: normal"><?php echo $lable_no_services.' '.$lable_flapping ?></td>
74 </tr>
75 <?php } if ($flap_disabled_hosts > 0) {?>
76 <tr>
77 <td class="icon"><span class="icon-16 x16-shield-disabled" title="<?php echo _('Disabled'); ?>"></span></td>
78 <td style="white-space: normal"><?php echo $flap_disabled_hosts.' '.($flap_disabled_hosts==1 ? $lable_host_singular : $lable_host_plural).' '.$lable_disabled ?></td>
79 </tr>
80 <?php } else { ?>
81 <tr>
82 <td class="icon"><span class="icon-16 x16-shield-ok" title="<?php echo _('Enabled'); ?>"></span></td>
83 <td style="white-space: normal"><?php echo $lable_all_hosts.' '.$lable_enabled ?></td>
84 </tr>
85 <?php } if ($flapping_hosts > 0) {?>
86 <tr>
87 <td class="icon"><span class="icon-16 x16-shield-disabled" title="<?php echo _('Disabled'); ?>"></span></td>
88 <td style="white-space: normal"><?php echo html::anchor('/status/host/?hostprops='.nagstat::HOST_IS_FLAPPING ,$flapping_hosts.' '.($flapping_hosts==1 ? $lable_host_singular : $lable_host_plural).' '.$lable_flapping) ?></td>
89 </tr>
90 <?php } else { ?>
91 <tr>
92 <td class="icon"><span class="icon-16 x16-shield-ok" title="<?php echo _('Enabled'); ?>"></span></td>
93 <td style="white-space: normal"><?php echo $lable_no_hosts.' '.$lable_flapping ?></td>
94 </tr>
95 <?php } } else { ?>
96 <tr>
97 <td style="padding: 6.5px"><?php echo _('N/A') ?></td>
98 </tr>
99 <?php } ?>
100 </table>
101 </td>
102 <td>
103 <table class="no_border">
104 <?php if ($enable_notifications) { ?>
105 <?php if ($notification_disabled_services > 0) { ?>
106 <tr>
107 <td class="icon icon"><span class="icon-16 x16-shield-disabled" title="<?php echo _('Disabled'); ?>"></span></td>
108 <td style="white-space: normal"><?php echo html::anchor('/status/service/?service_props='.nagstat::SERVICE_NOTIFICATIONS_DISABLED, $notification_disabled_services.' '.($notification_disabled_services==1 ? $lable_service_singular : $lable_service_plural).' '.$lable_disabled) ?></td>
109 </tr>
110 <?php } else { ?>
111 <tr>
112 <td class="icon icon"><span class="icon-16 x16-shield-ok" title="<?php echo _('Enabled'); ?>"></span></td>
113 <td style="white-space: normal"><?php echo $lable_all_services.' '.$lable_enabled ?></td>
114 </tr>
115 <?php } ?>
116 <?php if ($notification_disabled_hosts > 0) { ?>
117 <tr>
118 <td class="icon icon"><span class="icon-16 x16-shield-disabled" title="<?php echo _('Disabled'); ?>"></span></td>
119 <td style="white-space: normal"><?php echo html::anchor('/status/host/?hostprops='.nagstat::HOST_NOTIFICATIONS_DISABLED, $notification_disabled_hosts.' '.($notification_disabled_hosts==1 ? $lable_host_singular : $lable_host_plural).' '.$lable_disabled) ?></td>
120 </tr>
121 <?php } else { ?>
122 <tr>
123 <td class="icon icon"><span class="icon-16 x16-shield-ok" title="<?php echo _('Enabled'); ?>"></span></td>
124 <td style="white-space: normal"><?php echo $lable_all_hosts.' '.$lable_enabled ?></td>
125 </tr>
126 <?php } ?>
127 <?php } else { ?>
128 <tr>
129 <td style="padding: 6.5px"><?php echo _('N/A') ?></td>
130 </tr>
131 <?php } ?>
132 </table>
133 </td>
134 <td>
135 <table class="no_border">
136 <?php if ($enable_event_handlers) { ?>
137 <?php if ($event_handler_disabled_svcs > 0) { ?>
138 <tr>
139 <td class="icon"><span class="icon-16 x16-shield-disabled" title="<?php echo _('Disabled'); ?>"></span></td>
140 <td style="white-space: normal"><?php echo html::anchor('/status/service/?service_props='.nagstat::SERVICE_EVENT_HANDLER_DISABLED, $event_handler_disabled_svcs.' '.($event_handler_disabled_svcs==1 ? $lable_service_singular : $lable_service_plural).' '.$lable_disabled) ?></td>
141 </tr>
142 <?php } else { ?>
143 <tr>
144 <td class="icon"><span class="icon-16 x16-shield-ok" title="<?php echo _('Enabled'); ?>"></span></td>
145 <td style="white-space: normal"><?php echo $lable_all_services.' '.$lable_enabled ?></td>
146 </tr>
147 <?php } ?>
148 <?php if ($event_handler_disabled_hosts > 0) { ?>
149 <tr>
150 <td class="icon"><span class="icon-16 x16-shield-disabled" title="<?php echo _('Disabled'); ?>"></span></td>
151 <td style="white-space: normal"><?php echo html::anchor('/status/host/?hostprops='.nagstat::HOST_EVENT_HANDLER_DISABLED, $event_handler_disabled_hosts.' '.($event_handler_disabled_hosts==1 ? $lable_host_singular : $lable_host_plural).' '.$lable_disabled) ?></td>
152 </tr>
153 <?php } else { ?>
154 <tr>
155 <td class="icon"><span class="icon-16 x16-shield-ok" title="<?php echo _('Enabled'); ?>"></span></td>
156 <td style="white-space: normal"><?php echo $lable_all_hosts.' '.$lable_enabled ?></td>
157 </tr>
158 <?php } ?>
159 <?php } else { ?>
160 <tr>
161 <td style="padding: 6.5px"><?php echo _('N/A') ?></td>
162 </tr>
163 <?php } ?>
164 </table>
165 </td>
167 <td>
168 <table class="no_border">
169 <?php if ($execute_service_checks) { ?>
170 <?php if ($active_checks_disabled_svcs > 0) { ?>
171 <tr>
172 <td class="icon"><span class="icon-16 x16-shield-disabled" title="<?php echo _('Disabled'); ?>"></span></td>
173 <td style="white-space: normal"><?php echo html::anchor('/status/service/?service_props='.nagstat::SERVICE_CHECKS_DISABLED, $active_checks_disabled_svcs.' '.($active_checks_disabled_svcs==1 ? $lable_service_singular : $lable_service_plural).' '.$lable_disabled) ?></td>
174 </tr>
175 <?php } else { ?>
176 <tr>
177 <td class="icon"><span class="icon-16 x16-shield-ok" title="<?php echo _('Enabled'); ?>"></span></td>
178 <td style="white-space: normal"><?php echo $lable_all_services.' '.$lable_enabled ?></td>
179 </tr>
180 <?php } ?>
181 <?php if ($active_checks_disabled_hosts > 0) { ?>
182 <tr>
183 <td class="icon"><span class="icon-16 x16-shield-disabled" title="<?php echo _('Disabled'); ?>"></span></td>
184 <td style="white-space: normal"><?php echo html::anchor('/status/host/?hostprops='.nagstat::HOST_CHECKS_DISABLED, $active_checks_disabled_hosts.' '.($active_checks_disabled_hosts==1 ? $lable_host_singular : $lable_host_plural).' '.$lable_disabled) ?></td>
185 </tr>
186 <?php } else { ?>
187 <tr>
188 <td class="icon"><span class="icon-16 x16-shield-ok" title="<?php echo _('Enabled'); ?>"></span></td>
189 <td style="white-space: normal"><?php echo $lable_all_hosts.' '.$lable_enabled ?></td>
190 </tr>
191 <?php } ?>
192 <?php } else { ?>
193 <tr>
194 <td style="padding: 6.5px"><?php echo _('N/A') ?></td>
195 </tr>
196 <?php } ?>
197 </table>
198 </td>
199 <td>
200 <table class="no_border">
201 <?php if ($accept_passive_service_checks) { ?>
202 <?php if ($passive_checks_disabled_svcs > 0) { ?>
203 <tr>
204 <td class="icon"><span class="icon-16 x16-shield-disabled" title="<?php echo _('Disabled'); ?>"></span></td>
205 <td style="white-space: normal"><?php echo html::anchor('/status/service/?service_props='.nagstat::SERVICE_PASSIVE_CHECKS_DISABLED, $passive_checks_disabled_svcs.' '.($passive_checks_disabled_svcs==1 ? $lable_service_singular : $lable_service_plural).' '.$lable_disabled) ?></td>
206 </tr>
207 <?php } else { ?>
208 <tr>
209 <td class="icon"><span class="icon-16 x16-shield-ok" title="<?php echo _('Enabled'); ?>"></span></td>
210 <td style="white-space: normal"><?php echo $lable_all_services.' '.$lable_enabled ?></td>
211 </tr>
212 <?php } ?>
213 <?php if ($passive_checks_disabled_hosts > 0) { ?>
214 <tr>
215 <td class="icon"><span class="icon-16 x16-shield-disabled" title="<?php echo _('Disabled'); ?>"></span></td>
216 <td style="white-space: normal"><?php echo html::anchor('/status/host/?hostprops='.nagstat::HOST_PASSIVE_CHECKS_DISABLED, $passive_checks_disabled_hosts.' '.($passive_checks_disabled_hosts==1 ? $lable_host_singular : $lable_host_plural).' '.$lable_disabled) ?></td>
217 </tr>
218 <?php } else { ?>
219 <tr>
220 <td class="icon"><span class="icon-16 x16-shield-ok" title="<?php echo _('Enabled'); ?>"></span></td>
221 <td style="white-space: normal"><?php echo $lable_all_hosts.' '.$lable_enabled ?></td>
222 </tr>
223 <?php } ?>
224 <?php } else { ?>
225 <tr>
226 <td style="padding: 6.5px"><?php echo _('N/A') ?></td>
227 </tr>
228 <?php } ?>
229 </table>
230 </td>
231 </tr>
232 </table>