Base_reports_Controller Class Reference

Base-class that report controllers build on. More...

Inheritance diagram for Base_reports_Controller:
Histogram_Controller Reports_Controller Summary_Controller Avail_Controller Sla_Controller Alert_history_Controller

Public Member Functions

 __construct ()
 Sanity-checks.
 index ($input=false)
 Controller method that should render a form for creating a report.
 generate ($input=false)
 Controller method that should render a report.
 edit_settings ($input=false)
 Controller method that should render a form for editing a report in LightBox.
 save ($input=false)
 Save a report via ajax call Called from reports.js.
 delete ()
 Delete a saved report.
 set_options (Report_options $options)

Static Public Member Functions

static _helptexts ($id)
 So this static method that random code everywhere assumes exist doesn't even have a fallback defined? Yeah, that's good code.

Data Fields

 $type = false
 The type of this report.

Protected Member Functions

 generate_toolbar ()
 Fill the toolbar with appropriate things for the current report type.
 generate_pdf ()
 Generate PDF instead of normal rendering.
 setup_options_obj ($input=false, $type=false)
 Helper that makes sure a Report_options object is setup and available.
 format_report_time ($date_format)
 All reports must display the time range they cover, and this helper helps them do so with some amount of consistency.

Protected Attributes

 $histogram_link = "histogram/generate"
 Useless base variable jay.
 $options = false
 A report_option object.

Detailed Description

Base-class that report controllers build on.

Might have been called Report_controller, had that name not been busy.


Member Function Documentation

static Base_reports_Controller::_helptexts ( id  )  [static]

So this static method that random code everywhere assumes exist doesn't even have a fallback defined? Yeah, that's good code.

..

Reimplemented in Alert_history_Controller, Avail_Controller, Histogram_Controller, and Reports_Controller.

Base_reports_Controller::format_report_time ( date_format  )  [protected]

All reports must display the time range they cover, and this helper helps them do so with some amount of consistency.

Parameters:
$date_format string Format string for date(), probably date::date_format()
Returns:
string HTML including a formatted date for this report
Base_reports_Controller::generate_pdf (  )  [protected]

Generate PDF instead of normal rendering.

Uses shell

Assumes that $this->template is set up correctly

Base_reports_Controller::save ( input = false  ) 

Save a report via ajax call Called from reports.js.

Returns:
JSON string
Base_reports_Controller::set_options ( Report_options options  ) 
Parameters:
$options Report_options

Field Documentation

Base_reports_Controller::$type = false

The type of this report.

Usually based on controller name, but not always.

Reimplemented in Alert_history_Controller, Avail_Controller, Histogram_Controller, Sla_Controller, and Summary_Controller.


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