Merge branch 'maint/7.0'
[ninja.git] / application / widgets / tac_problems / tac_problems.php
blobd6e5a09256e5fd978b835249fcf40302b1c34eac
1 <?php defined('SYSPATH') OR die('No direct access allowed.');
2 /**
3 * Hosts widget for tactical overview
5 * @author op5 AB
6 */
7 class Tac_problems_Widget extends gridstat_Widget {
8 public function __construct($widget_model) {
9 widget_Base::__construct($widget_model);
12 $this->settings = array(
13 array(
14 'title' => _('Network outages'),
15 'icon' => 'shield-outages',
16 'fields' => array(
17 array(
18 'text' => _('%d network outages'),
19 'filter' => '[hosts] state != 0 and has_been_checked = 1 and childs != ""'
23 array(
24 'title' => _('Hosts down'),
25 'icon' => 'shield-down',
26 'fields' => array(
27 array(
28 // TODO: Passive as active
29 'text' => _('%d unhandled problems'),
30 'filter' => '[hosts] state = 1 and has_been_checked = 1 and scheduled_downtime_depth = 0 and acknowledged = 0 and checks_enabled = 1'
34 array(
35 'title' => _('Services Critical'),
36 'icon' => 'shield-critical',
37 'fields' => array(
38 array(
39 // TODO: Passive as active
40 'text' => _('%d unhandled problems'),
41 'filter' => '[services] state = 2 and has_been_checked = 1 and scheduled_downtime_depth = 0 and acknowledged = 0 and checks_enabled = 1 and host.state = 0 and host.has_been_checked = 1'
43 array(
44 // TODO: Passive as active
45 'text' => _('%d on problem hosts'),
46 'filter' => '[services] state = 2 and has_been_checked = 1 and scheduled_downtime_depth = 0 and acknowledged = 0 and checks_enabled = 1 and (host.state != 0 or host.has_been_checked = 0)'
50 array(
51 'title' => _('Services Warning'),
52 'icon' => 'shield-warning',
53 'fields' => array(
54 array(
55 // TODO: Passive as active
56 'text' => _('%d unhandled problems'),
57 'filter' => '[services] state = 1 and has_been_checked = 1 and scheduled_downtime_depth = 0 and acknowledged = 0 and checks_enabled = 1 and host.state = 0 and host.has_been_checked = 1'
59 array(
60 // TODO: Passive as active
61 'text' => _('%d on problem hosts'),
62 'filter' => '[services] state = 1 and has_been_checked = 1 and scheduled_downtime_depth = 0 and acknowledged = 0 and checks_enabled = 1 and (host.state != 0 or host.has_been_checked = 0)'
66 array(
67 'title' => _('Services Unknown'),
68 'icon' => 'shield-unknown',
69 'fields' => array(
70 array(
71 // TODO: Passive as active
72 'text' => _('%d unhandled problems'),
73 'filter' => '[services] state = 3 and has_been_checked = 1 and scheduled_downtime_depth = 0 and acknowledged = 0 and checks_enabled = 1 and host.state = 0 and host.has_been_checked = 1'
75 array(
76 // TODO: Passive as active
77 'text' => _('%d on problem hosts'),
78 'filter' => '[services] state = 3 and has_been_checked = 1 and scheduled_downtime_depth = 0 and acknowledged = 0 and checks_enabled = 1 and (host.state != 0 or host.has_been_checked = 0)'