Class: Karafka::Web::Pro::Ui::Controllers::ClusterController
- Inherits:
-
BaseController
- Object
- Ui::Controllers::BaseController
- BaseController
- Karafka::Web::Pro::Ui::Controllers::ClusterController
- 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
Instance Method Summary collapse
-
#index ⇒ Object
Lists available brokers in the cluster.
-
#replication ⇒ Object
List partitions replication details (same as OSS, plus Pro filtering).
-
#show(broker_id) ⇒ Object
Displays selected broker configuration.
Methods included from Lib::Filtering
Methods inherited from Ui::Controllers::BaseController
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
#index ⇒ Object
Lists available brokers in the cluster
68 69 70 71 72 |
# File 'lib/karafka/web/pro/ui/controllers/cluster_controller.rb', line 68 def index @brokers = filter(sort(Models::Broker.all)) render end |
#replication ⇒ Object
List partitions replication details (same as OSS, plus Pro filtering)
86 87 88 89 90 91 92 93 94 95 |
# File 'lib/karafka/web/pro/ui/controllers/cluster_controller.rb', line 86 def replication @partitions, last_page = Paginators::Arrays.call( filter(sort(replication_partitions)), @params.current_page ) paginate(@params.current_page, !last_page) render end |
#show(broker_id) ⇒ Object
Displays selected broker configuration
77 78 79 80 81 82 83 |
# File 'lib/karafka/web/pro/ui/controllers/cluster_controller.rb', line 77 def show(broker_id) @broker = Models::Broker.find(broker_id) @configs = filter(sort(@broker.configs)) render end |