sla: Stupid Rasmus and his needles and haystacks
[ninja.git] / application / widgets / tac_scheduled / tac_scheduled.php
blob2f969b4553ad4ea37f3a036b43e052d424803a4a
1 <?php
3 defined('SYSPATH') or die('No direct access allowed.');
4 /**
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.
10 * @author op5 AB
12 class Tac_scheduled_Widget extends gridstat_Widget {
13 public function __construct($widget_model) {
14 parent::__construct($widget_model);
15 $this->settings = array (
16 array (
17 'title' => _('Down'),
18 'icon' => 'scheduled-downtime',
19 'fields' => array(
20 array(
21 'filter' => '[hosts] (has_been_checked = 1 and state = 1) and scheduled_downtime_depth > 0',
22 'text' => '%d '._('Scheduled hosts')
26 array (
27 'title' => _('Unreachable'),
28 'icon' => 'scheduled-downtime',
29 'fields' => array(
30 array(
31 'filter' => '[hosts] (has_been_checked = 1 and state = 2) and scheduled_downtime_depth > 0',
32 'text' => '%d '._('Scheduled hosts')
36 array (
37 'title' => _('Up'),
38 'icon' => 'scheduled-downtime',
39 'fields' => array(
40 array(
41 'filter' => '[hosts] (has_been_checked = 1 and state = 0) and scheduled_downtime_depth > 0',
42 'text' => '%d '._('Scheduled hosts')
46 array (
47 'title' => _('Pending'),
48 'icon' => 'scheduled-downtime',
49 'fields' => array(
50 array(
51 'filter' => '[hosts] has_been_checked = 0 and scheduled_downtime_depth > 0',
52 'text' => '%d '._('Scheduled hosts')
56 array (
57 'title' => _('Critical'),
58 'icon' => 'scheduled-downtime',
59 'fields' => array(
60 array(
61 'filter' => '[services] (has_been_checked = 1 and state = 2) and scheduled_downtime_depth > 0',
62 'text' => '%d '._('Scheduled services')
66 array (
67 'title' => _('Warning'),
68 'icon' => 'scheduled-downtime',
69 'fields' => array(
70 array(
71 'filter' => '[services] (has_been_checked = 1 and state = 1) and scheduled_downtime_depth > 0',
72 'text' => '%d '._('Scheduled services')
76 array (
77 'title' => _('Unknown'),
78 'icon' => 'scheduled-downtime',
79 'fields' => array(
80 array(
81 'filter' => '[services] (has_been_checked = 1 and state = 3) and scheduled_downtime_depth > 0',
82 'text' => '%d '._('Scheduled services')
86 array (
87 'title' => _('Ok'),
88 'icon' => 'scheduled-downtime',
89 'fields' => array(
90 array(
91 'filter' => '[services] (has_been_checked = 1 and state = 0) and scheduled_downtime_depth > 0',
92 'text' => '%d '._('Scheduled services')
96 array (
97 'title' => _('Pending'),
98 'icon' => 'scheduled-downtime',
99 'fields' => array(
100 array(
101 'filter' => '[services] has_been_checked = 0 and scheduled_downtime_depth > 0',
102 'text' => '%d '._('Scheduled services')