reports Class Reference

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.

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 format_report_value ($val)
 Format report value output.
static js_strings ()
 Create common translated javascript strings.
static _state_colors ($type='host', $state=false)
 Determine what color to assign to an event.
static _state_color_table ($type='host')
static format_multi_object_table ($data, $title, $rowdescriber, $type, $columns, $is_summary, $options, &$i=0)
 Given bunch of somewhat-magical parameters, return a whole multi-object report table.
static get_alias ($type, $name)
 Returns the alias for the specified object of the specified type, or false Liberated from the report controller.

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.

Detailed Description

Help class for reports.


Member Function Documentation

static reports::_state_color_table ( type = 'host'  )  [static]
Parameters:
$type string = 'host'
Returns:
array
static reports::percent ( dividend,
divisor 
) [static]

Generate a percentage easily.

Parameters:
$dividend The whole
$divisor The part
Returns:
The percentage

Field Documentation

reports::$colors [static]
Initial value:
 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::$valid_months [static]
Initial value:
 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.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables

Generated on 19 Dec 2018 for ninja by  doxygen 1.6.1