lib/karafka/web/ui/pro/views/consumers/consumer/_partition.erb in karafka-web-0.2.5 vs lib/karafka/web/ui/pro/views/consumers/consumer/_partition.erb in karafka-web-0.3.0
- old
+ new
@@ -4,21 +4,33 @@
</td>
<td>
<%= partition.id %>
</td>
<td>
- <%= partition.lag_stored %>
+ <% if partition.lag_stored.to_i < 0 %>
+ <span class="badge bg-secondary" title="Not available until first offset commit">
+ N/A
+ </span>
+ <% else %>
+ <%= partition.lag_stored %>
+ <% end %>
</td>
<td>
<span class="badge <%= lag_trend_bg(partition.lag_stored_d) %>">
<%= partition.lag_stored_d %>
</span>
</td>
<td>
<%= partition.committed_offset %>
</td>
<td>
- <%= partition.stored_offset %>
+ <% if partition.stored_offset.to_i < 0 %>
+ <span class="badge bg-secondary" title="Not available until first offset commit">
+ N/A
+ </span>
+ <% else %>
+ <%= partition.stored_offset %>
+ <% end %>
</td>
<td>
<span class="badge <%= kafka_state_bg(partition.fetch_state) %> mt-1 mb-1">
<%= partition.fetch_state %>
</span>