Class: QaServer::CheckStatusPresenter
- Inherits:
-
Object
- Object
- QaServer::CheckStatusPresenter
- Defined in:
- app/presenters/qa_server/check_status_presenter.rb
Instance Method Summary collapse
-
#accuracy_status_data ⇒ Array<Hash>
A list of status data for each accuracy scenario tested.
-
#accuracy_status_data? ⇒ Boolean
True if status data exists; otherwise false.
-
#authorities_list ⇒ Array<String>
A list of all loaded authorities' names.
-
#connection_status_data ⇒ Array<Hash>
A list of status data for each connection scenario tested.
-
#connection_status_data? ⇒ Boolean
True if status data exists; otherwise false.
-
#initialize(authorities_list:, connection_status_data:, accuracy_status_data:) ⇒ CheckStatusPresenter
constructor
A new instance of CheckStatusPresenter.
- #label_all_checks ⇒ Object
- #label_check_accuracy ⇒ Object
- #label_check_connections ⇒ Object
-
#status_style_class(status) ⇒ String
The name of the css style class to use for the status cell based on the status of the scenario test.
- #value_all_checks ⇒ Object
- #value_all_collections ⇒ Object
- #value_check_accuracy ⇒ Object
- #value_check_connections ⇒ Object
- #value_check_param ⇒ Object
Constructor Details
#initialize(authorities_list:, connection_status_data:, accuracy_status_data:) ⇒ CheckStatusPresenter
Returns a new instance of CheckStatusPresenter.
7 8 9 10 11 |
# File 'app/presenters/qa_server/check_status_presenter.rb', line 7 def initialize(authorities_list:, connection_status_data:, accuracy_status_data:) @authorities_list = @connection_status_data = connection_status_data @accuracy_status_data = accuracy_status_data end |
Instance Method Details
#accuracy_status_data ⇒ Array<Hash>
Returns A list of status data for each accuracy scenario tested.
45 46 47 |
# File 'app/presenters/qa_server/check_status_presenter.rb', line 45 def accuracy_status_data @accuracy_status_data end |
#accuracy_status_data? ⇒ Boolean
Returns true if status data exists; otherwise false.
55 56 57 |
# File 'app/presenters/qa_server/check_status_presenter.rb', line 55 def accuracy_status_data? @accuracy_status_data.present? end |
#authorities_list ⇒ Array<String>
Returns A list of all loaded authorities' names.
15 16 17 |
# File 'app/presenters/qa_server/check_status_presenter.rb', line 15 def @authorities_list end |
#connection_status_data ⇒ Array<Hash>
Returns A list of status data for each connection scenario tested.
29 30 31 |
# File 'app/presenters/qa_server/check_status_presenter.rb', line 29 def connection_status_data @connection_status_data end |
#connection_status_data? ⇒ Boolean
Returns true if status data exists; otherwise false.
50 51 52 |
# File 'app/presenters/qa_server/check_status_presenter.rb', line 50 def connection_status_data? @connection_status_data.present? end |
#label_all_checks ⇒ Object
92 93 94 |
# File 'app/presenters/qa_server/check_status_presenter.rb', line 92 def label_all_checks "#{value_check_param}_#{value_all_checks}".downcase.to_sym end |
#label_check_accuracy ⇒ Object
84 85 86 |
# File 'app/presenters/qa_server/check_status_presenter.rb', line 84 def label_check_accuracy "#{value_check_param}_#{value_check_accuracy}".downcase.to_sym end |
#label_check_connections ⇒ Object
76 77 78 |
# File 'app/presenters/qa_server/check_status_presenter.rb', line 76 def label_check_connections "#{value_check_param}_#{value_check_connections}".downcase.to_sym end |
#status_style_class(status) ⇒ String
Returns the name of the css style class to use for the status cell based on the status of the scenario test.
60 61 62 |
# File 'app/presenters/qa_server/check_status_presenter.rb', line 60 def status_style_class(status) "status-#{status[:status].to_s}" end |
#value_all_checks ⇒ Object
88 89 90 |
# File 'app/presenters/qa_server/check_status_presenter.rb', line 88 def value_all_checks AuthorityValidationController::ALL_VALIDATIONS end |
#value_all_collections ⇒ Object
64 65 66 |
# File 'app/presenters/qa_server/check_status_presenter.rb', line 64 def value_all_collections CheckStatusController::ALL_AUTHORITIES end |
#value_check_accuracy ⇒ Object
80 81 82 |
# File 'app/presenters/qa_server/check_status_presenter.rb', line 80 def value_check_accuracy AuthorityValidationController::VALIDATE_ACCURACY end |
#value_check_connections ⇒ Object
72 73 74 |
# File 'app/presenters/qa_server/check_status_presenter.rb', line 72 def value_check_connections AuthorityValidationController::VALIDATE_CONNECTIONS end |
#value_check_param ⇒ Object
68 69 70 |
# File 'app/presenters/qa_server/check_status_presenter.rb', line 68 def value_check_param AuthorityValidationController::VALIDATION_TYPE_PARAM end |