Class: Karafka::Web::Ui::Controllers::BaseController
- Inherits:
-
Object
- Object
- Karafka::Web::Ui::Controllers::BaseController
- Includes:
- Requests::Hookable, Lib::Paginations
- Defined in:
- lib/karafka/web/ui/controllers/base_controller.rb
Overview
Base controller from which all the controllers should inherit.
Direct Known Subclasses
Pro::Ui::Controllers::BaseController, BecomeProController, ClusterController, ConsumersController, DashboardController, ErrorsController, JobsController, RoutingController, StatusController, SupportController, UxController
Constant Summary collapse
Class Attribute Summary collapse
-
.sortable_attributes ⇒ Object
Attributes on which we can sort in a given controller.
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#session ⇒ Object
readonly
Returns the value of attribute session.
Instance Method Summary collapse
-
#cache ⇒ Karafka::Web::Ui::Lib::Cache
Per-process cache instance.
-
#initialize(params, session) ⇒ BaseController
constructor
A new instance of BaseController.
Methods included from Requests::Hookable
included, #run_after_hooks, #run_before_hooks
Constructor Details
#initialize(params, session) ⇒ BaseController
Returns a new instance of BaseController.
42 43 44 45 |
# File 'lib/karafka/web/ui/controllers/base_controller.rb', line 42 def initialize(params, session) @params = params @session = session end |
Class Attribute Details
.sortable_attributes ⇒ Object
Attributes on which we can sort in a given controller
20 21 22 |
# File 'lib/karafka/web/ui/controllers/base_controller.rb', line 20 def sortable_attributes @sortable_attributes end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
13 14 15 |
# File 'lib/karafka/web/ui/controllers/base_controller.rb', line 13 def params @params end |
#session ⇒ Object (readonly)
Returns the value of attribute session.
13 14 15 |
# File 'lib/karafka/web/ui/controllers/base_controller.rb', line 13 def session @session end |
Instance Method Details
#cache ⇒ Karafka::Web::Ui::Lib::Cache
Returns per-process cache instance.
48 49 50 |
# File 'lib/karafka/web/ui/controllers/base_controller.rb', line 48 def cache Karafka::Web.config.ui.cache end |