Help class for reports. More...
Public Member Functions | |
lib_reports_assert_handler ($filename, $line, $code) | |
Called by PHP as an assert callback to format errors usefully. | |
convert_hex_color ($color_str) | |
Converts an html hexadecimal color from the form "#rrggbb" to its separate components. | |
Static Public Member Functions | |
static | percent ($dividend, $divisor) |
Generate a percentage easily. | |
static | get_color_values ($labels=false) |
Assigns color to labels to be used in a piechart. | |
static | get_date_ranges () |
Fetch date ranges from reports class. | |
static | format_report_value ($val) |
Format report value output. | |
static | is_proper_report_item ($k, $data) |
Validate report item. | |
static | js_strings () |
Create common translated javascript strings. | |
static | get_included_states ($report_type, $options) |
Return a text string representing the included host or service states. | |
static | _state_colors ($type='host', $state=false) |
Determine what color to assign to an event. | |
static | _state_color_table ($type='host') |
Static Public Attributes | |
static | $colors |
Colors for status in trends graph and such. | |
static | $days_per_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31) |
Array of month_number => days_in_month. | |
static | $valid_weekdays = array('sunday','monday','tuesday','wednesday','thursday','friday','saturday') |
Array of weekday names. | |
static | $valid_months |
Array of month names. |
Help class for reports.
static reports_Core::_state_color_table | ( | $ | type = 'host' |
) | [static] |
$type | string = 'host' |
reports_Core::convert_hex_color | ( | $ | color_str | ) |
Converts an html hexadecimal color from the form "#rrggbb" to its separate components.
$color_str | string: Color in html hex |
static reports_Core::get_date_ranges | ( | ) | [static] |
static reports_Core::is_proper_report_item | ( | $ | k, | |
$ | data | |||
) | [static] |
Validate report item.
$k | Unused FIXME | |
$data | A data array that should have states return true if valid, false otherwise |
static reports_Core::percent | ( | $ | dividend, | |
$ | divisor | |||
) | [static] |
Generate a percentage easily.
$dividend | The whole | |
$divisor | The part |
reports_Core::$colors [static] |
array( 'green' => '#aade53', 'yellow' => '#ffd92f', 'orange' => '#ff9d08', 'red' => '#f7261b', 'grey' => '#a19e95', 'lightblue' => '#EAF0F2', # actual color is #ddeceb, but it is hardly visible 'white' => '#ffffff', 'transparent' => 'transparent' )
Colors for status in trends graph and such.
reports_Core::$valid_months [static] |
array ( 1 => 'january', 2 => 'february', 3 => 'march', 4 => 'april', 5 => 'may', 6 => 'june', 7 => 'july', 8 => 'august', 9 => 'september', 10 => 'october', 11 => 'november', 12 => 'december' )
Array of month names.