Sha256: 4978cab8be2fa430ce3151b5b83a873439cd59fa48d43bc69c1afe2a5f074284

Contents?: true

Size: 1.04 KB

Versions: 18

Compression:

Stored size: 1.04 KB

Contents

# frozen_string_literal: true
# This presenter class provides performance data needed by the view that monitors status of authorities.
module QaServer::MonitorStatus
  class PerformancePresenter
    include QaServer::MonitorStatus::GruffGraph
    include QaServer::MonitorStatus::PerformanceDatatableBehavior
    include QaServer::MonitorStatus::PerformanceGraphBehavior
    include QaServer::PerformanceHistoryDataKeys

    # @param performance_data [Hash<Hash>] performance data
    def initialize(performance_data:)
      @performance_data = performance_data
    end

    attr_reader :performance_data

    def performance_data?
      performance_data.present?
    end

    def display_performance?
      display_performance_graph? || display_performance_datatable?
    end

    def display_performance_graph?
      QaServer.config.display_performance_graph?
    end

    def display_performance_datatable?
      QaServer.config.display_performance_datatable?
    end

    def performance_data_authority_name(entry)
      entry.keys.first
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
qa_server-5.5.1 app/presenters/qa_server/monitor_status/performance_presenter.rb
qa_server-5.5.0 app/presenters/qa_server/monitor_status/performance_presenter.rb
qa_server-5.4.0 app/presenters/qa_server/monitor_status/performance_presenter.rb
qa_server-5.3.0 app/presenters/qa_server/monitor_status/performance_presenter.rb
qa_server-5.2.1 app/presenters/qa_server/monitor_status/performance_presenter.rb
qa_server-5.2.0 app/presenters/qa_server/monitor_status/performance_presenter.rb
qa_server-5.1.0 app/presenters/qa_server/monitor_status/performance_presenter.rb
qa_server-5.0.3 app/presenters/qa_server/monitor_status/performance_presenter.rb
qa_server-5.0.2 app/presenters/qa_server/monitor_status/performance_presenter.rb
qa_server-5.0.1 app/presenters/qa_server/monitor_status/performance_presenter.rb
qa_server-5.0.0 app/presenters/qa_server/monitor_status/performance_presenter.rb
qa_server-4.0.0 app/presenters/qa_server/monitor_status/performance_presenter.rb
qa_server-3.0.3 app/presenters/qa_server/monitor_status/performance_presenter.rb
qa_server-3.0.2 app/presenters/qa_server/monitor_status/performance_presenter.rb
qa_server-3.0.1 app/presenters/qa_server/monitor_status/performance_presenter.rb
qa_server-3.0.0 app/presenters/qa_server/monitor_status/performance_presenter.rb
qa_server-2.2.3 app/presenters/qa_server/monitor_status/performance_presenter.rb
qa_server-2.2.2 app/presenters/qa_server/monitor_status/performance_presenter.rb