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 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
Constructor Details
This class inherits a constructor from Karafka::Web::Ui::Controllers::BaseController
Instance Method Details
#logs ⇒ Object
Displays the execution logs
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/karafka/web/pro/ui/controllers/recurring_tasks_controller.rb', line 39 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
30 31 32 33 34 35 36 |
# File 'lib/karafka/web/pro/ui/controllers/recurring_tasks_controller.rb', line 30 def schedule @schedule = Models::RecurringTasks::Schedule.current @tasks = refine(@schedule.tasks) if @schedule render end |