Class: QaServer::MonitorStatusController

Inherits:
AuthorityValidationController show all
Defined in:
app/controllers/qa_server/monitor_status_controller.rb

Constant Summary

Constants inherited from AuthorityValidationController

AuthorityValidationController::ALL_VALIDATIONS, AuthorityValidationController::DEFAULT_VALIDATION_TYPE, AuthorityValidationController::VALIDATE_ACCURACY, AuthorityValidationController::VALIDATE_CONNECTIONS, AuthorityValidationController::VALIDATION_TYPE_PARAM

Instance Method Summary collapse

Instance Method Details

#indexObject

Sets up presenter with data to display in the UI



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

def index
  if refresh? || expired?
    validate(authorities_list)
    update_summary_and_data
  end
  # TODO: Include historical data and performance data too
  @presenter = presenter_class.new(current_summary: latest_summary,
                                   current_failure_data: latest_failures,
                                   historical_summary_data: historical_summary_data,
                                   performance_data: [])
  render 'index', status: :internal_server_error if latest_summary.failing_authority_count.positive?
end