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 Attribute Summary

Attributes inherited from Ui::Controllers::BaseController

#params, #session

Instance Method Summary collapse

Methods inherited from Ui::Controllers::ClusterController

#brokers, #replication

Methods inherited from Ui::Controllers::BaseController

#cache, #initialize

Methods included from Ui::Controllers::Requests::Hookable

included, #run_after_hooks, #run_before_hooks

Constructor Details

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

Instance Method Details

#indexObject

Lists available brokers in the cluster



25
26
27
28
29
# File 'lib/karafka/web/pro/ui/controllers/cluster_controller.rb', line 25

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



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

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

  @configs = refine(@broker.configs)

  render
end