Class: QaServer::MonitorStatusController

Inherits:
ApplicationController
  • Object
show all
Includes:
AuthorityValidationBehavior
Defined in:
app/controllers/qa_server/monitor_status_controller.rb

Overview

rubocop:disable Metrics/ClassLength

Constant Summary

Constants included from AuthorityValidationBehavior

AuthorityValidationBehavior::ALL_VALIDATIONS, AuthorityValidationBehavior::VALIDATE_ACCURACY, AuthorityValidationBehavior::VALIDATE_ACCURACY_COMPARISON, AuthorityValidationBehavior::VALIDATE_CONNECTIONS, AuthorityValidationBehavior::VALIDATION_TYPE_PARAM

Instance Method Summary collapse

Instance Method Details

#indexObject

Sets up presenter with data to display in the UI



15
16
17
18
19
20
21
22
23
24
25
# File 'app/controllers/qa_server/monitor_status_controller.rb', line 15

def index
  log_header
  perform_updates
  commit_cache if commit_cache?
  @presenter = presenter_class.new(current_summary: latest_summary,
                                   current_failure_data: latest_failures,
                                   historical_summary_data: historical_data,
                                   performance_data: performance_table_data)
  QaServer.config.monitor_logger.debug("~~~~~~~~ DONE rendering monitor status")
  render 'index', status: :internal_server_error if latest_summary&.failing_authority_count&.positive?
end