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



14
15
16
# File 'lib/qa_server/configuration.rb', line 14

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



6
7
8
# File 'lib/qa_server/configuration.rb', line 6

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



51
52
53
# File 'lib/qa_server/configuration.rb', line 51

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



22
23
24
# File 'lib/qa_server/configuration.rb', line 22

def display_performance_graph=(value)
  @display_performance_graph = value
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



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

def navmenu_extra_leftitems
  @navmenu_extra_leftitems
end

#performance_datatable_default_time_period ⇒ Object



60
61
62
# File 'lib/qa_server/configuration.rb', line 60

def performance_datatable_default_time_period
  @performance_datatable_default_time_period ||= :year
end

#performance_datatable_max_threshold ⇒ Object



67
68
69
# File 'lib/qa_server/configuration.rb', line 67

def performance_datatable_max_threshold
  @performance_datatable_max_threshold ||= 1500
end

#performance_datatable_warning_threshold ⇒ Object



74
75
76
# File 'lib/qa_server/configuration.rb', line 74

def performance_datatable_warning_threshold
  @performance_datatable_warning_threshold ||= 1000
end

#performance_graph_default_time_period ⇒ Object



45
46
47
# File 'lib/qa_server/configuration.rb', line 45

def performance_graph_default_time_period
  @performance_graph_default_time_period ||= :month
end

#performance_load_color ⇒ Object



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

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

#performance_normalization_color ⇒ Object



38
39
40
# File 'lib/qa_server/configuration.rb', line 38

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

Instance Method Details

#display_historical_datatable? ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
18
# File 'lib/qa_server/configuration.rb', line 15

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

#display_historical_graph? ⇒ Boolean

Returns:

  • (Boolean)


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

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

#display_performance_datatable? ⇒ Boolean

Returns:

  • (Boolean)


52
53
54
55
# File 'lib/qa_server/configuration.rb', line 52

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

#display_performance_graph? ⇒ Boolean

Returns:

  • (Boolean)


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

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



89
90
91
92
93
94
# File 'lib/qa_server/configuration.rb', line 89

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