Module: Karafka::Web::Pro::Ui::Lib::Features

Defined in:
lib/karafka/web/pro/ui/lib/features.rb

Overview

Module that aliases our features in the UI for controllers and views to simplify features checks

Class Method Summary collapse

Class Method Details

.commanding!Object

Ensures that commanding is on.

Raises:

[View source]

22
23
24
25
26
# File 'lib/karafka/web/pro/ui/lib/features.rb', line 22

def commanding!
  return if commanding?

  forbidden!
end

.commanding?Boolean

Returns is commanding turned on.

Returns:

  • (Boolean)

    is commanding turned on

[View source]

16
17
18
# File 'lib/karafka/web/pro/ui/lib/features.rb', line 16

def commanding?
  ::Karafka::Web.config.commanding.active
end

.topics_management!Object

Raises:

[View source]

35
36
37
38
39
# File 'lib/karafka/web/pro/ui/lib/features.rb', line 35

def topics_management!
  return if topics_management?

  forbidden!
end

.topics_management?Boolean

Returns is topics managements turned on.

Returns:

  • (Boolean)

    is topics managements turned on

[View source]

29
30
31
# File 'lib/karafka/web/pro/ui/lib/features.rb', line 29

def topics_management?
  Karafka::Web.config.ui.topics.management.active
end