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)

Sets the attribute display_historical_datatable

Parameters:

  • value

    the value to set the attribute display_historical_datatable to.



10
11
12
# File 'lib/qa_server/configuration.rb', line 10

def display_historical_datatable=(value)
  @display_historical_datatable = value
end

#display_historical_graph=(value) ⇒ Object (writeonly)

Sets the attribute display_historical_graph

Parameters:

  • value

    the value to set the attribute display_historical_graph to.



4
5
6
# File 'lib/qa_server/configuration.rb', line 4

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



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

def navmenu_extra_leftitems
  @navmenu_extra_leftitems
end

Instance Method Details

#display_historical_datatable?Boolean

Returns:

  • (Boolean)


11
12
13
14
# File 'lib/qa_server/configuration.rb', line 11

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

#display_historical_graph?Boolean

Returns:

  • (Boolean)


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

def display_historical_graph?
  return @display_historical_graph unless @display_historical_graph.nil?
  @display_historical_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



27
28
29
30
31
32
# File 'lib/qa_server/configuration.rb', line 27

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