Saved_reports_Model Class Reference

Saved reports model Responsible for fetching data for saved reports. More...

Static Public Member Functions

static get_saved_reports ($type='avail')
 Return all saved reports for a given report type.
static edit_report_info ($type, $id, Report_options $options)
 Save changes to a report, or save a new report.
static save_period_info ($sla_id=false, $months=false)
 Handle info on SLA period values (monthly) Remove old values and enter the new ones.
static save_config_objects ($type= 'avail', $id=false, $objects=false)
 Save information on what objects are related to this report (hosts/services/-groups) and stores the name of the objects.
static delete_report ($type='avail', $id)
 Delete info on a saved report.
static get_all_report_names ($type='avail')
 Fetches all info names from {avail,sla}_config.
static get_report_info ($type='avail', $id)
 Fetch info on single saved report.
static adjust_sla_periods ($num=false, &$arr, $is_quarter=false)
 Make monthly SLA values dynamic.
static get_period_info ($sla_id=false)
 Fetch saved SLA values and month info from db.
static get_config_objects ($type='avail', $id=false)
 Get config objects.

Data Fields

const USERFIELD = 'username'
 Name of the user field in database.

Detailed Description

Saved reports model Responsible for fetching data for saved reports.


Member Function Documentation

static Saved_reports_Model::delete_report ( type = 'avail',
id 
) [static]

Delete info on a saved report.

Parameters:
$type string: Report type { avail, sla, summary }
$id Id of the report to delete.
Returns:
true on success, false on errors
static Saved_reports_Model::edit_report_info ( type,
id,
Report_options options 
) [static]

Save changes to a report, or save a new report.

Parameters:
$type The report type ('avail', 'summary' or 'sla')
$id The report id, or false to create a new one.
$options The new options to save. For summary reports, this will first unset any old options and then set these, for other report types only the options that are set will be overwritten.
Returns:
false on error, or the id of the saved report
static Saved_reports_Model::get_all_report_names ( type = 'avail'  )  [static]

Fetches all info names from {avail,sla}_config.

Note: you get the exact same info from get_saved_reports

Parameters:
$type string: Report type. { avail, sla }
Returns:
false on errors. Array of all names on success
static Saved_reports_Model::get_config_objects ( type = 'avail',
id = false 
) [static]

Get config objects.

Parameters:
$type string: Report type { avail, sla }
$id int: Report id
Returns:
false on errors, database result array on success.
static Saved_reports_Model::get_period_info ( sla_id = false  )  [static]

Fetch saved SLA values and month info from db.

Parameters:
$sla_id int: Id of the report schedule
Returns:
false on errors. Database result array on success.
static Saved_reports_Model::get_report_info ( type = 'avail',
id 
) [static]

Fetch info on single saved report.

Parameters:
$type string: Report type { avail, sla }
$id int Id of the report.
Returns:
Report info as array on success, empty array when no info was found.
static Saved_reports_Model::get_saved_reports ( type = 'avail'  )  [static]

Return all saved reports for a given report type.

Note: you get the exact same info from get_all_report_names

Parameters:
$type The report type ('avail', 'sla' or 'summary')
static Saved_reports_Model::save_config_objects ( type = 'avail',
id = false,
objects = false 
) [static]

Save information on what objects are related to this report (hosts/services/-groups) and stores the name of the objects.

Parameters:
$type string: Type of report {avail, sla, summary}
$id Id of the schedule.
$objects Objects this scheduled report concerns
Returns:
true on success, false on errors.

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

Generated on 4 Apr 2014 for ninja by  doxygen 1.6.1