Class: Karafka::Web::Ui::Controllers::RoutingController
- Inherits:
-
BaseController
- Object
- BaseController
- Karafka::Web::Ui::Controllers::RoutingController
- Defined in:
- lib/karafka/web/ui/controllers/routing_controller.rb
Overview
Routing presentation controller
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#index ⇒ Object
Routing list.
-
#show(topic_id) ⇒ Object
Given route details.
Methods inherited from BaseController
Methods included from Karafka::Web::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
Routing list
16 17 18 19 20 21 22 23 24 |
# File 'lib/karafka/web/ui/controllers/routing_controller.rb', line 16 def index @routes = Karafka::App.routes @routes.each do |consumer_group| sort(consumer_group.topics) end render end |
#show(topic_id) ⇒ Object
Given route details
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/karafka/web/ui/controllers/routing_controller.rb', line 29 def show(topic_id) @topic = Karafka::Routing::Router.find_by(id: topic_id) @topic || not_found!(topic_id) # Present the routing settings as a flat, sortable list of name/value rows @details = sort(topic_detail_rows(@topic)) render end |