Class: Karafka::Web::Ui::Controllers::ConsumersController

Inherits:
BaseController
  • Object
show all
Defined in:
lib/karafka/web/ui/controllers/consumers_controller.rb

Overview

Consumers (consuming processes - karafka server) processes display consumer

Constant Summary

Constants inherited from BaseController

BaseController::Models

Instance Method Summary collapse

Methods inherited from BaseController

#initialize

Constructor Details

This class inherits a constructor from Karafka::Web::Ui::Controllers::BaseController

Instance Method Details

#indexObject

Note:

For now we load all and paginate over the squashed data.

List page with consumers



17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/karafka/web/ui/controllers/consumers_controller.rb', line 17

def index
  @current_state = Models::ConsumersState.current!
  @counters = Models::Counters.new(@current_state)
  @processes, last_page = Paginators::Arrays.call(
    refine(Models::Processes.active(@current_state)),
    @params.current_page
  )

  paginate(@params.current_page, !last_page)

  render
end