lib/karafka/web/ui/pro/views/health/_partition.erb in karafka-web-0.1.1 vs lib/karafka/web/ui/pro/views/health/_partition.erb in karafka-web-0.1.2
- old
+ new
@@ -3,20 +3,34 @@
<%= topic_name %>
</td>
<td>
<%= partition_id %>
</td>
- <td><%= details[:lag_stored] %></td>
<td>
+ <% if details[:lag_stored].to_i < 0 %>
+ <span class="badge bg-secondary" title="Not available until first offset commit">
+ N/A
+ </span>
+ <% else %>
+ <%= details[:lag_stored] %>
+ <% end %>
+ </td>
+ <td>
<span class="badge <%= lag_trend_bg(details[:lag_stored_d]) %>">
<%= details[:lag_stored_d] %>
</span>
</td>
<td>
<%= details[:committed_offset] %>
</td>
<td>
- <%= details[:stored_offset] %>
+ <% if details[:stored_offset].to_i < 0 %>
+ <span class="badge bg-secondary" title="Not available until first offset commit">
+ N/A
+ </span>
+ <% else %>
+ <%= details[:stored_offset] %>
+ <% end %>
</td>
<td>
<span class="badge <%= kafka_state_bg(details[:fetch_state]) %> mt-1 mb-1">
<%= details[:fetch_state] %>
</span>