Class: Railswatch::Widgets::ThroughputChart
- Inherits:
-
Chart
- Object
- Base
- Chart
- Railswatch::Widgets::ThroughputChart
show all
- Defined in:
- lib/railswatch/widgets/throughput_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: 'Throughput Report', description: 'All requests (site visitors, search engines, bots, etc)', legend: 'RPM', units: 'rpm') ⇒ ThroughputChart
Returns a new instance of ThroughputChart.
6
7
8
9
10
11
12
13
14
|
# File 'lib/railswatch/widgets/throughput_chart.rb', line 6
def initialize(
datasource,
subtitle: 'Throughput Report',
description: 'All requests (site visitors, search engines, bots, etc)',
legend: 'RPM',
units: 'rpm'
)
super
end
|
Instance Method Details
#data ⇒ Object
24
25
26
|
# File 'lib/railswatch/widgets/throughput_chart.rb', line 24
def data
Reports::ThroughputReport.new(datasource.db).data
end
|
#id ⇒ Object
16
17
18
|
# File 'lib/railswatch/widgets/throughput_chart.rb', line 16
def id
'throughput_report_chart'
end
|
#type ⇒ Object
20
21
22
|
# File 'lib/railswatch/widgets/throughput_chart.rb', line 20
def type
'TIR'
end
|