karafka-web 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 741082cd49e03399e910d2119b2bbd5bffd397c0b548005db6dedc3d6e283557
4
- data.tar.gz: b5b24528a2e489fa509c70deea9e79011d0945e6a6f1b8e44686acc0ec2ab96b
3
+ metadata.gz: 130c84348624e2b4a25faebece676cf3a4ee23a41cbe8527a97020ede7f95701
4
+ data.tar.gz: 627002c97f8c0c3c684371cf4c4a83fb24a9cf1de9d481358c4d3b9bf3b59675
5
5
  SHA512:
6
- metadata.gz: aba7fd6a0b9e3729219bd477319b6e06b0662e41f7734e0e43940df940f20451a63a7c4ab734475b29a1c615109329f04a4f6e9767c3cf36005b365ca2174b8f
7
- data.tar.gz: '02160184e59088650bb6a00c831ef58a880b02a70dc2b2a4ccfceb4e140a0ee4e0b30e27a5e6df1b35e9516db47823464e6b125ed34ee29a742db4506460983c'
6
+ metadata.gz: 4e9195f492ce88ad8e4f03394a80851d61cc23512cbc3fe8ded3af5b5245ef4cb52bb536954be5587011027735c13e5906e7c1f8b8fd1d9ce0d4d687d6712311
7
+ data.tar.gz: f8354d6bc12b847cfb6b1a633e164ee6cd80b3dc9f9a91103f18b007be0a569a22417d2236b5dafca4938c81d8e65eeafcb7a55a48553c2dacd9df9c7e6ae21f
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Karafka Web changelog
2
2
 
3
+ ## 0.4.1 (2023-04-12)
4
+ - [Improvement] Replace the "x time ago" in the code explorer with an exact date (`2023-04-12 10:16:48.596 +0200 `).
5
+ - [Improvement] When hovering over a message timestamp, a label with raw numeric timestamp will be presented.
6
+ - [Improvement] Do not skip reporting on partitions subscribed that never received any messages.
7
+ - [Fix] Skip reporting data on subscriptions that were revoked and not only stopped by us.
8
+
3
9
  ## 0.4.0 (2023-04-07)
4
10
  - [Improvement] Include active jobs and active partitions subscriptions count in the per-process tab navigation.
5
11
  - [Improvement] Include subscription groups names in the per-process subscriptions view.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- karafka-web (0.4.0)
4
+ karafka-web (0.4.1)
5
5
  erubi (~> 1.4)
6
6
  karafka (>= 2.0.38, < 3.0.0)
7
7
  karafka-core (>= 2.0.12, < 3.0.0)
@@ -87,13 +87,14 @@ module Karafka
87
87
  def partition_reportable?(pt_id, pt_stats)
88
88
  return false if pt_id == -1
89
89
 
90
- # Skip until lag info is available
91
- return false if pt_stats['consumer_lag'] == -1
92
-
93
90
  # Collect information only about what we are subscribed to and what we fetch or
94
- # work in any way. Stopped means, we no longer work with it
91
+ # work in any way. Stopped means, we stopped working with it
95
92
  return false if pt_stats['fetch_state'] == 'stopped'
96
93
 
94
+ # Return if we no longer fetch this partition in a particular process. None means
95
+ # that we no longer have this subscription assigned and we do not fetch
96
+ return false if pt_stats['fetch_state'] == 'none'
97
+
97
98
  true
98
99
  end
99
100
 
@@ -125,10 +125,18 @@ module Karafka
125
125
  # @param time [Float] UTC time float
126
126
  # @return [String] relative time tag for timeago.js
127
127
  def relative_time(time)
128
- stamp = Time.at(time).getutc.iso8601
128
+ stamp = Time.at(time).getutc.iso8601(3)
129
129
  %(<time class="ltr" dir="ltr" title="#{stamp}" datetime="#{stamp}">#{time}</time>)
130
130
  end
131
131
 
132
+ # @param time [Time] time object we want to present with detailed ms label
133
+ # @return [String] span tag with raw timestamp as a title and time as a value
134
+ def labeled_time(time)
135
+ stamp = (time.to_f * 1000).to_i
136
+
137
+ %(<span title="#{stamp}">#{time}</span>)
138
+ end
139
+
132
140
  # Returns the view title html code
133
141
  #
134
142
  # @param title [String] page title
@@ -20,7 +20,13 @@
20
20
  </span>
21
21
  </td>
22
22
  <td>
23
- <%= partition.committed_offset %>
23
+ <% if partition.committed_offset.to_i < 0 %>
24
+ <span class="badge bg-secondary" title="Not available until first offset commit">
25
+ N/A
26
+ </span>
27
+ <% else %>
28
+ <%= partition.committed_offset %>
29
+ <% end %>
24
30
  </td>
25
31
  <td>
26
32
  <% if partition.stored_offset.to_i < 0 %>
@@ -9,6 +9,15 @@
9
9
  </td>
10
10
  </tr>
11
11
  <% end %>
12
+ <% elsif v.is_a?(Time) %>
13
+ <tr>
14
+ <td>
15
+ <%= k %>
16
+ </td>
17
+ <td>
18
+ <%== labeled_time(v) %>
19
+ </td>
20
+ </tr>
12
21
  <% else %>
13
22
  <tr>
14
23
  <td>
@@ -13,7 +13,7 @@
13
13
  <%= message.offset %>
14
14
  </td>
15
15
  <td>
16
- <%== relative_time message.timestamp %>
16
+ <%== labeled_time(message.timestamp) %>
17
17
  </td>
18
18
  <td>
19
19
  <%= message.key %>
@@ -3,6 +3,6 @@
3
3
  module Karafka
4
4
  module Web
5
5
  # Current gem version
6
- VERSION = '0.4.0'
6
+ VERSION = '0.4.1'
7
7
  end
8
8
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: karafka-web
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maciej Mensfeld
@@ -35,7 +35,7 @@ cert_chain:
35
35
  Qf04B9ceLUaC4fPVEz10FyobjaFoY4i32xRto3XnrzeAgfEe4swLq8bQsR3w/EF3
36
36
  MGU0FeSV2Yj7Xc2x/7BzLK8xQn5l7Yy75iPF+KP3vVmDHnNl
37
37
  -----END CERTIFICATE-----
38
- date: 2023-04-07 00:00:00.000000000 Z
38
+ date: 2023-04-12 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: erubi
metadata.gz.sig CHANGED
Binary file