Class: Karafka::Web::Ui::Controllers::Consumers

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

Overview

Consumers (consuming processes - karafka server) processes display consumer

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

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

Instance Method Details

#indexObject

Note:

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

List page with consumers

[View source]

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

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

  paginate(@params.current_page, !last_page)

  render
end