Class: Railswatch::Widgets::RecentRequestsTable

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

Instance Attribute Summary

Attributes inherited from Base

#datasource

Instance Method Summary collapse

Methods inherited from Table

#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

#auto_update_intervalObject



18
19
20
# File 'lib/railswatch/widgets/recent_requests_table.rb', line 18

def auto_update_interval
  '3s'
end

#content_partial_pathObject



30
31
32
# File 'lib/railswatch/widgets/recent_requests_table.rb', line 30

def content_partial_path
  'railswatch/railswatch/recent_requests_table_content'
end

#dataObject



10
11
12
# File 'lib/railswatch/widgets/recent_requests_table.rb', line 10

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

#empty_messageObject



14
15
16
# File 'lib/railswatch/widgets/recent_requests_table.rb', line 14

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

#subtitleObject



6
7
8
# File 'lib/railswatch/widgets/recent_requests_table.rb', line 6

def subtitle
  "Recent Requests (last #{Railswatch.recent_requests_time_window / 60} minutes)"
end

#table_classesObject



26
27
28
# File 'lib/railswatch/widgets/recent_requests_table.rb', line 26

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

#table_idObject



22
23
24
# File 'lib/railswatch/widgets/recent_requests_table.rb', line 22

def table_id
  'recent'
end