Class: Karafka::Web::Pro::Ui::Controllers::CommandingController
- Inherits:
-
BaseController
- Object
- Ui::Controllers::BaseController
- BaseController
- Karafka::Web::Pro::Ui::Controllers::CommandingController
- Defined in:
- lib/karafka/web/pro/ui/controllers/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 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
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
37 38 39 40 41 42 43 44 |
# File 'lib/karafka/web/pro/ui/controllers/commanding_controller.rb', line 37 def quiet(process_id) command(: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
59 60 61 62 63 64 65 66 |
# File 'lib/karafka/web/pro/ui/controllers/commanding_controller.rb', line 59 def quiet_all command(:quiet, '*') redirect( :back, success: dispatched_to_all(:quiet) ) end |
#stop(process_id) ⇒ Object
Dispatches the stop request to a given process
49 50 51 52 53 54 55 56 |
# File 'lib/karafka/web/pro/ui/controllers/commanding_controller.rb', line 49 def stop(process_id) command(: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
69 70 71 72 73 74 75 76 |
# File 'lib/karafka/web/pro/ui/controllers/commanding_controller.rb', line 69 def stop_all command(:stop, '*') redirect( :back, success: dispatched_to_all(:stop) ) end |
#trace(process_id) ⇒ Object
Dispatches the trace request to a given process
25 26 27 28 29 30 31 32 |
# File 'lib/karafka/web/pro/ui/controllers/commanding_controller.rb', line 25 def trace(process_id) command(:trace, process_id) redirect( :back, success: dispatched_to_one(:trace, process_id) ) end |