Class: Railswatch::Widgets::ResponseTimeChart

Inherits:
Chart
  • Object
show all
Defined in:
lib/railswatch/widgets/response_time_chart.rb

Instance Attribute Summary

Attributes inherited from Chart

#description, #legend, #subtitle, #units

Attributes inherited from Base

#datasource

Instance Method Summary collapse

Methods inherited from Chart

#to_partial_path

Methods inherited from Base

#to_partial_path

Constructor Details

#initialize(datasource, subtitle: 'Average Response Time Report', description: 'All requests (site visitors, search engines, bots, etc)', legend: 'Response Time', units: nil) ⇒ ResponseTimeChart

Returns a new instance of ResponseTimeChart.



6
7
8
9
10
11
12
13
14
# File 'lib/railswatch/widgets/response_time_chart.rb', line 6

def initialize(
  datasource,
  subtitle: 'Average Response Time Report',
  description: 'All requests (site visitors, search engines, bots, etc)',
  legend: 'Response Time',
  units: nil
)
  super
end

Instance Method Details

#dataObject



24
25
26
# File 'lib/railswatch/widgets/response_time_chart.rb', line 24

def data
  Reports::ResponseTimeReport.new(datasource.db).data
end

#idObject



16
17
18
# File 'lib/railswatch/widgets/response_time_chart.rb', line 16

def id
  'response_time_report_chart'
end

#typeObject



20
21
22
# File 'lib/railswatch/widgets/response_time_chart.rb', line 20

def type
  'RT'
end