3 defined('SYSPATH') or die('No direct access allowed.');
5 * Hosts widget for tactical overview
7 * We use the gridstat_Widget from the module lsfilter as template, with just a
8 * simple configuraiton. That widget just needs a configuration to work.
12 class Tac_scheduled_Widget
extends gridstat_Widget
{
13 public function __construct($widget_model) {
14 parent
::__construct($widget_model);
15 $this->settings
= array (
18 'icon' => 'scheduled-downtime',
21 'filter' => '[hosts] (has_been_checked = 1 and state = 1) and scheduled_downtime_depth > 0',
22 'text' => '%d '._('Scheduled hosts')
27 'title' => _('Unreachable'),
28 'icon' => 'scheduled-downtime',
31 'filter' => '[hosts] (has_been_checked = 1 and state = 2) and scheduled_downtime_depth > 0',
32 'text' => '%d '._('Scheduled hosts')
38 'icon' => 'scheduled-downtime',
41 'filter' => '[hosts] (has_been_checked = 1 and state = 0) and scheduled_downtime_depth > 0',
42 'text' => '%d '._('Scheduled hosts')
47 'title' => _('Pending'),
48 'icon' => 'scheduled-downtime',
51 'filter' => '[hosts] has_been_checked = 0 and scheduled_downtime_depth > 0',
52 'text' => '%d '._('Scheduled hosts')
57 'title' => _('Critical'),
58 'icon' => 'scheduled-downtime',
61 'filter' => '[services] (has_been_checked = 1 and state = 2) and scheduled_downtime_depth > 0',
62 'text' => '%d '._('Scheduled services')
67 'title' => _('Warning'),
68 'icon' => 'scheduled-downtime',
71 'filter' => '[services] (has_been_checked = 1 and state = 1) and scheduled_downtime_depth > 0',
72 'text' => '%d '._('Scheduled services')
77 'title' => _('Unknown'),
78 'icon' => 'scheduled-downtime',
81 'filter' => '[services] (has_been_checked = 1 and state = 3) and scheduled_downtime_depth > 0',
82 'text' => '%d '._('Scheduled services')
88 'icon' => 'scheduled-downtime',
91 'filter' => '[services] (has_been_checked = 1 and state = 0) and scheduled_downtime_depth > 0',
92 'text' => '%d '._('Scheduled services')
97 'title' => _('Pending'),
98 'icon' => 'scheduled-downtime',
101 'filter' => '[services] has_been_checked = 0 and scheduled_downtime_depth > 0',
102 'text' => '%d '._('Scheduled services')