Class: Karafka::Web::Pro::Ui::Controllers::RecurringTasksController
- Inherits:
-
Ui::Controllers::ClusterController
- Object
- Ui::Controllers::BaseController
- Ui::Controllers::ClusterController
- Karafka::Web::Pro::Ui::Controllers::RecurringTasksController
- Defined in:
- lib/karafka/web/pro/ui/controllers/recurring_tasks_controller.rb
Overview
Controller for viewing and managing recurring tasks
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
-
#logs ⇒ Object
Displays the execution logs.
-
#schedule ⇒ Object
Displays the current schedule.
Methods inherited from Ui::Controllers::ClusterController
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
#logs ⇒ Object
Displays the execution logs
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/karafka/web/pro/ui/controllers/recurring_tasks_controller.rb', line 56 def logs @watermark_offsets = Models::WatermarkOffsets.find(logs_topic, 0) previous_offset, @logs, next_offset, = current_page_data paginate( previous_offset, @params.current_offset, next_offset, @logs.map(&:offset) ) # We remap this so we can represent the payloads as logs that we expect @logs.map! { |log| Models::RecurringTasks::Log.new(log.payload) } render end |
#schedule ⇒ Object
Displays the current schedule
47 48 49 50 51 52 53 |
# File 'lib/karafka/web/pro/ui/controllers/recurring_tasks_controller.rb', line 47 def schedule @schedule = Models::RecurringTasks::Schedule.current @tasks = refine(@schedule.tasks) if @schedule render end |