Class: QaServer::Configuration
- Inherits:
-
Object
- Object
- QaServer::Configuration
- Defined in:
- lib/qa_server/configuration.rb
Instance Attribute Summary collapse
-
#display_historical_datatable ⇒ Object
writeonly
Displays a datatable of historical test data when true.
-
#display_historical_graph ⇒ Object
writeonly
Displays a graph of historical test data when true.
-
#display_performance_datatable ⇒ Object
writeonly
Displays a datatable of performance test data when true.
-
#display_performance_graph ⇒ Object
writeonly
Displays a graph of performance test data when true.
- #hour_offset_to_run_monitoring_tests ⇒ Object
-
#navmenu_extra_leftitems ⇒ Object
Additional menu items to add to the main navigation menu’s set of left justified menu items.
- #performance_datatable_default_time_period ⇒ Object
- #performance_datatable_max_threshold ⇒ Object
- #performance_datatable_warning_threshold ⇒ Object
- #performance_graph_default_time_period ⇒ Object
- #performance_graph_load_color ⇒ Object
- #performance_normalization_color ⇒ Object
- #performance_retrieve_color ⇒ Object
- #performance_y_axis_max ⇒ Object
- #preferred_time_zone_name ⇒ Object
- #suppress_performance_gathering ⇒ Object
Instance Method Summary collapse
- #display_historical_datatable? ⇒ Boolean
- #display_historical_graph? ⇒ Boolean
- #display_performance_datatable? ⇒ Boolean
- #display_performance_graph? ⇒ Boolean
-
#navmenu_presenter ⇒ Object
Get the one and only instance of the navigation menu presenter used to construct the main navigation menu.
- #performance_cache ⇒ Object
- #performance_tracker ⇒ Object
Instance Attribute Details
#display_historical_datatable=(value) ⇒ Object (writeonly)
Displays a datatable of historical test data 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
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
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
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_tests ⇒ Object
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 |
#navmenu_extra_leftitems ⇒ Object
Additional menu items to add to the main navigation menu’s set of left justified menu items
119 120 121 |
# File 'lib/qa_server/configuration.rb', line 119 def @navmenu_extra_leftitems end |
#performance_datatable_default_time_period ⇒ Object
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_threshold ⇒ Object
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_threshold ⇒ Object
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_period ⇒ Object
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_color ⇒ Object
64 65 66 |
# File 'lib/qa_server/configuration.rb', line 64 def performance_graph_load_color @performance_graph_load_color ||= '#E8DCD3' end |
#performance_normalization_color ⇒ Object
72 73 74 |
# File 'lib/qa_server/configuration.rb', line 72 def performance_normalization_color @performance_normalization_color ||= '#CCBE9F' end |
#performance_retrieve_color ⇒ Object
56 57 58 |
# File 'lib/qa_server/configuration.rb', line 56 def performance_retrieve_color @performance_retrieve_color ||= '#ABC3C9' end |
#performance_y_axis_max ⇒ Object
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_name ⇒ Object
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_gathering ⇒ Object
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
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
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
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
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 |
#navmenu_presenter ⇒ Object
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 return @navmenu_presenter if @navmenu_presenter.present? @navmenu_presenter ||= QaServer::NavmenuPresenter.new @navmenu_presenter.() @navmenu_presenter end |
#performance_cache ⇒ Object
144 145 146 |
# File 'lib/qa_server/configuration.rb', line 144 def performance_cache @performance_cache ||= QaServer::PerformanceCache.new end |
#performance_tracker ⇒ Object
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 |