Skip to content

Commit

Permalink
expand consumer status with lso (#114)
Browse files Browse the repository at this point in the history
* expand consumer status with lso

* dep bump
  • Loading branch information
mensfeld authored Sep 12, 2023
1 parent 194d7d8 commit b388c25
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ PATH
specs:
karafka-web (0.7.0)
erubi (~> 1.4)
karafka (>= 2.2.0, < 3.0.0)
karafka (>= 2.2.3, < 3.0.0)
karafka-core (>= 2.2.2, < 3.0.0)
roda (~> 3.68, >= 3.69)
tilt (~> 2.0)
Expand All @@ -26,8 +26,8 @@ GEM
ffi (1.15.5)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
karafka (2.2.1)
karafka-core (>= 2.2.0, < 2.3.0)
karafka (2.2.3)
karafka-core (>= 2.2.2, < 2.3.0)
thor (>= 0.20)
waterdrop (>= 2.6.6, < 3.0.0)
zeitwerk (~> 2.3)
Expand Down
2 changes: 1 addition & 1 deletion karafka-web.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
spec.licenses = %w[LGPL-3.0 Commercial]

spec.add_dependency 'erubi', '~> 1.4'
spec.add_dependency 'karafka', '>= 2.2.0', '< 3.0.0'
spec.add_dependency 'karafka', '>= 2.2.3', '< 3.0.0'
spec.add_dependency 'karafka-core', '>= 2.2.2', '< 3.0.0'
spec.add_dependency 'roda', '~> 3.68', '>= 3.69'
spec.add_dependency 'tilt', '~> 2.0'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<tr>
<tr class="align-middle <%= lso_risk_state_bg(partition) %>">
<td>
<%= topic.name %>
</td>
Expand Down Expand Up @@ -33,4 +33,9 @@
<%= partition.poll_state %>
</span>
</td>
<td>
<span class="badge bg-success <%= lso_risk_state_bg(partition) %> bg-opacity-100">
<%= partition.lso_risk_state %>
</span>
</td>
</tr>
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
<th>Stored offset</th>
<th>Fetch state</th>
<th>Poll state</th>
<th>LSO state</th>
</tr>
</thead>
<tbody>
Expand Down
2 changes: 1 addition & 1 deletion lib/karafka/web/ui/pro/views/shared/_navigation.erb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</li>

<li class="nav-item ms-3">
<a class="nav-link <%= nav_class(start_with: '/health') %>" href="<%= root_path('health') %>">
<a class="nav-link <%= nav_class(start_with: '/health') %>" href="<%= root_path('health/overview') %>">
Health
</a>
</li>
Expand Down
14 changes: 14 additions & 0 deletions spec/lib/karafka/web/ui/pro/controllers/explorer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,20 @@
end
end

context 'when we have many messages and we request earlier time on a higher partition' do
let(:partitions) { 2 }

before do
produce_many(topic, Array.new(100, '1'), partition: 1)
get "explorer/#{topic}/1/2000-01-01/12:00:12"
end

it do
expect(response.status).to eq(302)
expect(response.location).to eq("/explorer/#{topic}/1?offset=0")
end
end

context 'when we have many messages and we request later time' do
before do
produce_many(topic, Array.new(100, '1'))
Expand Down

0 comments on commit b388c25

Please sign in to comment.