lib/karafka/web/pro/ui/app.rb in karafka-web-0.10.0 vs lib/karafka/web/pro/ui/app.rb in karafka-web-0.10.1

- old
+ new

@@ -230,9 +230,49 @@ r.get String, Integer, Integer, 'export' do |topic_id, partition_id, offset| controller.export(topic_id, partition_id, offset) end end + r.on 'recurring_tasks' do + controller = Controllers::RecurringTasksController.new(params) + + r.get 'schedule' do + controller.schedule + end + + r.get 'logs' do + controller.logs + end + + r.post 'trigger_all' do + controller.trigger_all + end + + r.post 'enable_all' do + controller.enable_all + end + + r.post 'disable_all' do + controller.disable_all + end + + r.post String, 'trigger' do |task_id| + controller.trigger(task_id) + end + + r.post String, 'enable' do |task_id| + controller.enable(task_id) + end + + r.post String, 'disable' do |task_id| + controller.disable(task_id) + end + + r.get do + r.redirect root_path('recurring_tasks/schedule') + end + end + r.on 'health' do controller = Controllers::HealthController.new(params) r.get 'lags' do controller.lags