Class: Karafka::Web::Pro::Ui::Controllers::ClusterController

Inherits:
Ui::Controllers::ClusterController show all
Defined in:
lib/karafka/web/pro/ui/controllers/cluster_controller.rb

Overview

Cluster details controller

Constant Summary

Constants inherited from Ui::Controllers::BaseController

Ui::Controllers::BaseController::Models

Instance Method Summary collapse

Methods inherited from Ui::Controllers::ClusterController

#brokers, #replication

Methods inherited from Ui::Controllers::BaseController

#initialize

Constructor Details

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

Instance Method Details

#indexObject

Lists available brokers in the cluster



33
34
35
36
37
# File 'lib/karafka/web/pro/ui/controllers/cluster_controller.rb', line 33

def index
  @brokers = refine(Models::Broker.all)

  render
end

#show(broker_id) ⇒ Object

Displays selected broker configuration

Parameters:

  • broker_id (String)

    id of the broker



42
43
44
45
46
47
48
# File 'lib/karafka/web/pro/ui/controllers/cluster_controller.rb', line 42

def show(broker_id)
  @broker = Models::Broker.find(broker_id)

  @configs = refine(@broker.configs)

  render
end