Added filterable to summary and histogram controllers
[ninja.git] / modules / reports / libraries / Histogram_options.php
blobdc06c05f614f1e22b2f9095c5b908f82012ac883
1 <?php defined('SYSPATH') OR die('No direct access allowed.');
3 /**
4 * Report options for histogram reports
5 */
6 class Histogram_options extends Summary_options
8 public static $type = 'histogram';
10 public function __construct($options=false)
12 $this->properties['breakdown'] = array('type' => 'enum', 'default' => 'hourly', 'options' => array(
13 "monthly" => _('Monthly'),
14 "dayofmonth" => _('Day of month'),
15 "dayofweek" => _('Day of week'),
16 "hourly" => _('Hourly')));
17 $this->properties['newstatesonly'] = array('type' => 'bool', 'default' => false);
18 parent::__construct($options);
20 protected function update_value($name, $value)
22 parent::update_value($name, $value);
23 switch ($name) {
24 case 'report_type':
25 $this['alert_types'] = 1 + ($value == 'services' || $value == 'servicegroups');
26 break;