Class: RoundhouseUi::ErrorsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- RoundhouseUi::ErrorsController
- Defined in:
- app/controllers/roundhouse_ui/errors_controller.rb
Overview
Groups failing jobs across the retry + dead sets by a fingerprint of (job class + error class) — so one bad deploy reads as a single issue with a count, not five thousand identical rows. The aggregation Sidekiq Web lacks.
Constant Summary
Constants inherited from ApplicationController
ApplicationController::AUDIT_VERBS
Instance Method Summary collapse
Methods inherited from ApplicationController
Instance Method Details
#index ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/controllers/roundhouse_ui/errors_controller.rb', line 6 def index @query = params[:q].to_s.strip @scan_limit = ErrorGroups::DEFAULT_SCAN_LIMIT result = ErrorGroups.new(query: @query).call @groups, @scanned, @truncated = result.groups, result.scanned, result.truncated # Tags resolve per group rather than per entry: every row in a # klass|error group shares a class, so a class-derived tag is constant # for the group. Counted before filtering, so the quick-filter strip # keeps showing every squad's total while one of them is selected. @group_tags = @groups.to_h { |g| [ g[:klass], Tags.for(klass: g[:klass], item: {}, cache: tag_cache) ] } @tag_counts = tag_counts(@groups) @tag = tag_filter @groups = @groups.select { |g| Tags.match?(@group_tags[g[:klass]], *@tag) } if @tag end |