Class: Karafka::Web::Pro::Ui::Controllers::Consumers::CommandingController
- Inherits:
-
BaseController
- Object
- Ui::Controllers::BaseController
- BaseController
- BaseController
- Karafka::Web::Pro::Ui::Controllers::Consumers::CommandingController
- Defined in:
- lib/karafka/web/pro/ui/controllers/consumers/commanding_controller.rb
Overview
Controller responsible for handling requests that should trigger some action on the consumers.
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
-
#quiet(process_id) ⇒ Object
Dispatches the quiet request to a given process.
-
#quiet_all ⇒ Object
Dispatches the quiet request that should trigger on all consumers.
-
#stop(process_id) ⇒ Object
Dispatches the stop request to a given process.
-
#stop_all ⇒ Object
Dispatches the stop request that should trigger on all consumers.
-
#trace(process_id) ⇒ Object
Dispatches the trace request to a given process.
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
#quiet(process_id) ⇒ Object
Dispatches the quiet request to a given process
60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/karafka/web/pro/ui/controllers/consumers/commanding_controller.rb', line 60 def quiet(process_id) features.commanding! request( Commanding::Commands::Consumers::Quiet, process_id ) redirect( :back, success: dispatched_to_one(:quiet, process_id) ) end |
#quiet_all ⇒ Object
Dispatches the quiet request that should trigger on all consumers
92 93 94 95 96 97 98 99 100 101 |
# File 'lib/karafka/web/pro/ui/controllers/consumers/commanding_controller.rb', line 92 def quiet_all features.commanding! broadcast_request(Commanding::Commands::Consumers::Quiet) redirect( :back, success: dispatched_to_all(:quiet) ) end |
#stop(process_id) ⇒ Object
Dispatches the stop request to a given process
77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/karafka/web/pro/ui/controllers/consumers/commanding_controller.rb', line 77 def stop(process_id) features.commanding! request( Commanding::Commands::Consumers::Stop, process_id ) redirect( :back, success: dispatched_to_one(:stop, process_id) ) end |
#stop_all ⇒ Object
Dispatches the stop request that should trigger on all consumers
104 105 106 107 108 109 110 111 112 113 |
# File 'lib/karafka/web/pro/ui/controllers/consumers/commanding_controller.rb', line 104 def stop_all features.commanding! broadcast_request(Commanding::Commands::Consumers::Stop) redirect( :back, success: dispatched_to_all(:stop) ) end |
#trace(process_id) ⇒ Object
Dispatches the trace request to a given process
43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/karafka/web/pro/ui/controllers/consumers/commanding_controller.rb', line 43 def trace(process_id) features.commanding! request( Commanding::Commands::Consumers::Trace, process_id ) redirect( :back, success: dispatched_to_one(:trace, process_id) ) end |