Merge "Make it possible to sort on simple custom columns"
[ninja.git] / modules / reports / libraries / Histogram_options.php
blob99702e99b6b792f9fddf29a24837c560c5abd42e
1 <?php defined('SYSPATH') OR die('No direct access allowed.');
3 /**
4 * Report options for histogram reports
5 */
6 class Histogram_options_Core extends Report_options
8 public function __construct($options=false)
10 $this->properties['breakdown'] = array('type' => 'enum', 'default' => 'hourly', 'options' => array(
11 "monthly" => _('Monthly'),
12 "dayofmonth" => _('Day of month'),
13 "dayofweek" => _('Day of week'),
14 "hourly" => _('Hourly')));
15 $this->properties['newstatesonly'] = array('type' => 'bool', 'default' => false);
16 parent::__construct($options);
18 protected function update_value($name, $value)
20 parent::update_value($name, $value);
21 switch ($name) {
22 case 'report_type':
23 $this['alert_types'] = 1 + ($value == 'services' || $value == 'servicegroups');
24 break;