Class: QaServer::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/qa_server/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#display_historical_datatable=(value) ⇒ Object (writeonly)

Displays a datatable of historical test data when true

Parameters:

  • display (Boolean)

    history datatable when true



32
33
34
# File 'lib/qa_server/configuration.rb', line 32

def display_historical_datatable=(value)
  @display_historical_datatable = value
end

#display_historical_graph=(value) ⇒ Object (writeonly)

Displays a graph of historical test data when true

Parameters:

  • display (Boolean)

    history graph when true



24
25
26
# File 'lib/qa_server/configuration.rb', line 24

def display_historical_graph=(value)
  @display_historical_graph = value
end

#display_performance_datatable=(value) ⇒ Object (writeonly)

Displays a datatable of performance test data when true

Parameters:

  • display (Boolean)

    performance datatable when true



85
86
87
# File 'lib/qa_server/configuration.rb', line 85

def display_performance_datatable=(value)
  @display_performance_datatable = value
end

#display_performance_graph=(value) ⇒ Object (writeonly)

Displays a graph of performance test data when true

Parameters:

  • display (Boolean)

    performance graph when true



40
41
42
# File 'lib/qa_server/configuration.rb', line 40

def display_performance_graph=(value)
  @display_performance_graph = value
end

#hour_offset_to_run_monitoring_testsObject



18
19
20
# File 'lib/qa_server/configuration.rb', line 18

def hour_offset_to_run_monitoring_tests
  @hour_offset_to_run_monitoring_tests ||= 3
end

Additional menu items to add to the main navigation menu’s set of left justified menu items

Examples:

[
  { label: 'New Item Label', url: 'http://new.item/one' },
  { label: '2nd New Item Label', url: 'http://new.item/two' }
]

Parameters:

  • array (Array<Hash<String,String>>)

    of menu items to append with hash key = menu item label to display and hash value = URL for the menu item link



119
120
121
# File 'lib/qa_server/configuration.rb', line 119

def navmenu_extra_leftitems
  @navmenu_extra_leftitems
end

#performance_datatable_default_time_periodObject



94
95
96
# File 'lib/qa_server/configuration.rb', line 94

def performance_datatable_default_time_period
  @performance_datatable_default_time_period ||= :year
end

#performance_datatable_max_thresholdObject



101
102
103
# File 'lib/qa_server/configuration.rb', line 101

def performance_datatable_max_threshold
  @performance_datatable_max_threshold ||= 1500
end

#performance_datatable_warning_thresholdObject



108
109
110
# File 'lib/qa_server/configuration.rb', line 108

def performance_datatable_warning_threshold
  @performance_datatable_warning_threshold ||= 1000
end

#performance_graph_default_time_periodObject



79
80
81
# File 'lib/qa_server/configuration.rb', line 79

def performance_graph_default_time_period
  @performance_graph_default_time_period ||= :month
end

#performance_graph_load_colorObject



64
65
66
# File 'lib/qa_server/configuration.rb', line 64

def performance_graph_load_color
  @performance_graph_load_color ||= '#E8DCD3'
end

#performance_normalization_colorObject



72
73
74
# File 'lib/qa_server/configuration.rb', line 72

def performance_normalization_color
  @performance_normalization_color ||= '#CCBE9F'
end

#performance_retrieve_colorObject



56
57
58
# File 'lib/qa_server/configuration.rb', line 56

def performance_retrieve_color
  @performance_retrieve_color ||= '#ABC3C9'
end

#performance_y_axis_maxObject



48
49
50
# File 'lib/qa_server/configuration.rb', line 48

def performance_y_axis_max
  @performance_y_axis_max ||= 4000
end

#preferred_time_zone_nameObject



8
9
10
# File 'lib/qa_server/configuration.rb', line 8

def preferred_time_zone_name
  @preferred_time_zone_name ||= 'Eastern Time (US & Canada)'
end

#suppress_performance_gatheringObject



140
141
142
# File 'lib/qa_server/configuration.rb', line 140

def suppress_performance_gathering
  @suppress_performance_gathering ||= false
end

Instance Method Details

#display_historical_datatable?Boolean

Returns:

  • (Boolean)


33
34
35
36
# File 'lib/qa_server/configuration.rb', line 33

def display_historical_datatable?
  return @display_historical_datatable unless @display_historical_datatable.nil?
  @display_historical_datatable = true
end

#display_historical_graph?Boolean

Returns:

  • (Boolean)


25
26
27
28
# File 'lib/qa_server/configuration.rb', line 25

def display_historical_graph?
  return @display_historical_graph unless @display_historical_graph.nil?
  @display_historical_graph = false
end

#display_performance_datatable?Boolean

Returns:

  • (Boolean)


86
87
88
89
# File 'lib/qa_server/configuration.rb', line 86

def display_performance_datatable?
  return @display_performance_datatable unless @display_performance_datatable.nil?
  @display_performance_datatable = true
end

#display_performance_graph?Boolean

Returns:

  • (Boolean)


41
42
43
44
# File 'lib/qa_server/configuration.rb', line 41

def display_performance_graph?
  return @display_performance_graph unless @display_performance_graph.nil?
  @display_performance_graph = false
end

Get the one and only instance of the navigation menu presenter used to construct the main navigation menu. To extend, set additional navigation menu items using #navmenu_extra_leftitems



123
124
125
126
127
128
# File 'lib/qa_server/configuration.rb', line 123

def navmenu_presenter
  return @navmenu_presenter if @navmenu_presenter.present?
  @navmenu_presenter ||= QaServer::NavmenuPresenter.new
  @navmenu_presenter.append_leftmenu_items(navmenu_extra_leftitems)
  @navmenu_presenter
end

#performance_cacheObject



144
145
146
# File 'lib/qa_server/configuration.rb', line 144

def performance_cache
  @performance_cache ||= QaServer::PerformanceCache.new
end

#performance_trackerObject



130
131
132
133
134
# File 'lib/qa_server/configuration.rb', line 130

def performance_tracker
  @performance_tracker ||= File.new('log/performance.csv', 'w').tap do |f|
    f.puts('action, http request, load graph, normalization, TOTAL, data size, authority')
  end
end