Class: RailsPulse::Dashboard::HealthSummary
- Inherits:
-
Object
- Object
- RailsPulse::Dashboard::HealthSummary
- Defined in:
- app/models/rails_pulse/dashboard/health_summary.rb
Constant Summary
Constants included from Concerns::ThresholdConstants
Concerns::ThresholdConstants::CRITICAL_ERROR_RATE, Concerns::ThresholdConstants::CRITICAL_JOB_FAILURE_RATE, Concerns::ThresholdConstants::WARNING_ERROR_RATE, Concerns::ThresholdConstants::WARNING_JOB_FAILURE_RATE
Instance Method Summary collapse
-
#initialize(disabled_tags: [], show_non_tagged: true, period: 7) ⇒ HealthSummary
constructor
A new instance of HealthSummary.
- #to_health_data ⇒ Object
Constructor Details
#initialize(disabled_tags: [], show_non_tagged: true, period: 7) ⇒ HealthSummary
Returns a new instance of HealthSummary.
7 8 9 10 11 12 13 14 |
# File 'app/models/rails_pulse/dashboard/health_summary.rb', line 7 def initialize(disabled_tags: [], show_non_tagged: true, period: 7) @disabled_tags = @show_non_tagged = show_non_tagged @period = period @route_thresholds = RailsPulse.configuration.route_thresholds @query_thresholds = RailsPulse.configuration.query_thresholds @job_thresholds = RailsPulse.configuration.job_thresholds end |
Instance Method Details
#to_health_data ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'app/models/rails_pulse/dashboard/health_summary.rb', line 16 def to_health_data { routes: route_counts, queries: query_counts, jobs: job_counts, storage: storage_counts } end |