Class: Karafka::Web::Ui::Pro::Controllers::Health

Inherits:
Controllers::Base show all
Defined in:
lib/karafka/web/ui/pro/controllers/health.rb

Overview

Health state controller

Instance Method Summary collapse

Methods inherited from Controllers::Base

#initialize

Constructor Details

This class inherits a constructor from Karafka::Web::Ui::Controllers::Base

Instance Method Details

#changesObject

Displays information related to time of changes of particular attributes



74
75
76
77
78
79
# File 'lib/karafka/web/ui/pro/controllers/health.rb', line 74

def changes
  # Same data as overview but presented differently
  overview

  render
end

#lagsObject

Displays details about lags and their progression/statuses



58
59
60
61
62
63
# File 'lib/karafka/web/ui/pro/controllers/health.rb', line 58

def lags
  # Same data as overview but presented differently
  overview

  render
end

#offsetsObject

Displays details about offsets and their progression/statuses



66
67
68
69
70
71
# File 'lib/karafka/web/ui/pro/controllers/health.rb', line 66

def offsets
  # Same data as overview but presented differently
  overview

  render
end

#overviewObject

Displays the current system state



45
46
47
48
49
50
51
52
53
54
55
# File 'lib/karafka/web/ui/pro/controllers/health.rb', line 45

def overview
  current_state = Models::ConsumersState.current!
  @stats = Models::Health.current(current_state)

  # Refine only on a per topic basis not to resort higher levels
  @stats.each_value do |cg_details|
    cg_details.each_value { |topic_details| refine(topic_details) }
  end

  render
end