Class: Railswatch::Widgets::SlowRequestsTable

Inherits:
Table
  • Object
show all
Defined in:
lib/railswatch/widgets/slow_requests_table.rb

Instance Attribute Summary

Attributes inherited from Base

#datasource

Instance Method Summary collapse

Methods inherited from Table

#auto_update_interval, #show_export?, #to_partial_path

Methods inherited from Base

#initialize, #to_partial_path

Constructor Details

This class inherits a constructor from Railswatch::Widgets::Base

Instance Method Details

#content_partial_pathObject



28
29
30
# File 'lib/railswatch/widgets/slow_requests_table.rb', line 28

def content_partial_path
  'railswatch/railswatch/recent_requests_table_content'
end

#dataObject



12
13
14
# File 'lib/railswatch/widgets/slow_requests_table.rb', line 12

def data
  @data ||= Railswatch::Reports::SlowRequestsReport.new(datasource.db).data
end

#empty_messageObject



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

def empty_message
  'Nothing to show here. Try to make a few requests in the main app.'
end

#subtitleObject



6
7
8
9
10
# File 'lib/railswatch/widgets/slow_requests_table.rb', line 6

def subtitle
  window_minutes = Railswatch.slow_requests_time_window / 60
  threshold = Railswatch.slow_requests_threshold
  "Slow Requests (last #{window_minutes} minutes + slower than #{threshold}ms)"
end

#table_classesObject



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

def table_classes
  'table is-fullwidth is-hoverable is-narrow'
end

#table_idObject



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

def table_id
  'recent'
end