Class: Karafka::Web::Pro::Ui::Controllers::ScheduledMessages::ExplorerController
- Inherits:
-
BaseController
- Object
- Ui::Controllers::BaseController
- BaseController
- BaseController
- Karafka::Web::Pro::Ui::Controllers::ScheduledMessages::ExplorerController
- Defined in:
- lib/karafka/web/pro/ui/controllers/scheduled_messages/explorer_controller.rb
Overview
Allows for exploration of dispatch messages in a less generic form that via the explorer as different details are present
Constant Summary
Constants inherited from Ui::Controllers::BaseController
Ui::Controllers::BaseController::Models
Instance Method Summary collapse
-
#closest(topic_id, partition_id, time) ⇒ Object
Finds the closest offset matching the requested time and redirects to this location Note, that it redirects to closest but always younger.
-
#partition(topic_id, partition_id) ⇒ Object
Shows messages available in a given partition.
-
#topic(topic_id) ⇒ Object
Displays aggregated messages from (potentially) all partitions of a topic.
Methods inherited from Ui::Controllers::BaseController
Constructor Details
This class inherits a constructor from Karafka::Web::Ui::Controllers::BaseController
Instance Method Details
#closest(topic_id, partition_id, time) ⇒ Object
Finds the closest offset matching the requested time and redirects to this location Note, that it redirects to closest but always younger.
52 53 54 55 56 57 58 |
# File 'lib/karafka/web/pro/ui/controllers/scheduled_messages/explorer_controller.rb', line 52 def closest(topic_id, partition_id, time) response = Controllers::ExplorerController .new(@params) .closest(topic_id, partition_id, time) redirect("scheduled_messages/#{response.path}") end |
#partition(topic_id, partition_id) ⇒ Object
Shows messages available in a given partition
38 39 40 41 42 43 44 |
# File 'lib/karafka/web/pro/ui/controllers/scheduled_messages/explorer_controller.rb', line 38 def partition(topic_id, partition_id) response = Controllers::ExplorerController .new(@params) .partition(topic_id, partition_id) render(attributes: response.attributes) end |
#topic(topic_id) ⇒ Object
Displays aggregated messages from (potentially) all partitions of a topic
26 27 28 29 30 31 32 |
# File 'lib/karafka/web/pro/ui/controllers/scheduled_messages/explorer_controller.rb', line 26 def topic(topic_id) response = Controllers::ExplorerController .new(@params) .topic(topic_id) render(attributes: response.attributes) end |