karafka-web 0.7.9 → 0.8.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (163) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/.github/workflows/ci.yml +21 -6
  4. data/.ruby-version +1 -1
  5. data/CHANGELOG.md +66 -0
  6. data/Gemfile.lock +22 -22
  7. data/docker-compose.yml +3 -1
  8. data/karafka-web.gemspec +2 -2
  9. data/lib/karafka/web/config.rb +16 -3
  10. data/lib/karafka/web/contracts/config.rb +7 -2
  11. data/lib/karafka/web/errors.rb +12 -0
  12. data/lib/karafka/web/inflector.rb +33 -0
  13. data/lib/karafka/web/installer.rb +20 -11
  14. data/lib/karafka/web/management/actions/base.rb +36 -0
  15. data/lib/karafka/web/management/actions/clean_boot_file.rb +33 -0
  16. data/lib/karafka/web/management/actions/create_initial_states.rb +77 -0
  17. data/lib/karafka/web/management/actions/create_topics.rb +139 -0
  18. data/lib/karafka/web/management/actions/delete_topics.rb +30 -0
  19. data/lib/karafka/web/management/actions/enable.rb +117 -0
  20. data/lib/karafka/web/management/actions/extend_boot_file.rb +39 -0
  21. data/lib/karafka/web/management/actions/migrate_states_data.rb +18 -0
  22. data/lib/karafka/web/management/migrations/0_base.rb +58 -0
  23. data/lib/karafka/web/management/migrations/0_set_initial_consumers_metrics.rb +36 -0
  24. data/lib/karafka/web/management/migrations/0_set_initial_consumers_state.rb +43 -0
  25. data/lib/karafka/web/management/migrations/1699543515_fill_missing_received_and_sent_bytes_in_consumers_metrics.rb +26 -0
  26. data/lib/karafka/web/management/migrations/1699543515_fill_missing_received_and_sent_bytes_in_consumers_state.rb +23 -0
  27. data/lib/karafka/web/management/migrations/1700234522_introduce_waiting_in_consumers_metrics.rb +24 -0
  28. data/lib/karafka/web/management/migrations/1700234522_introduce_waiting_in_consumers_state.rb +20 -0
  29. data/lib/karafka/web/management/migrations/1700234522_remove_processing_from_consumers_metrics.rb +24 -0
  30. data/lib/karafka/web/management/migrations/1700234522_remove_processing_from_consumers_state.rb +20 -0
  31. data/lib/karafka/web/management/migrations/1704722380_split_listeners_into_active_and_paused_in_metrics.rb +36 -0
  32. data/lib/karafka/web/management/migrations/1704722380_split_listeners_into_active_and_paused_in_states.rb +32 -0
  33. data/lib/karafka/web/management/migrator.rb +117 -0
  34. data/lib/karafka/web/processing/consumer.rb +39 -38
  35. data/lib/karafka/web/processing/consumers/aggregators/metrics.rb +15 -7
  36. data/lib/karafka/web/processing/consumers/aggregators/state.rb +8 -3
  37. data/lib/karafka/web/processing/consumers/contracts/aggregated_stats.rb +5 -1
  38. data/lib/karafka/web/processing/publisher.rb +59 -0
  39. data/lib/karafka/web/tracking/consumers/contracts/job.rb +3 -2
  40. data/lib/karafka/web/tracking/consumers/contracts/partition.rb +1 -0
  41. data/lib/karafka/web/tracking/consumers/contracts/report.rb +6 -1
  42. data/lib/karafka/web/tracking/consumers/contracts/subscription_group.rb +10 -1
  43. data/lib/karafka/web/tracking/consumers/listeners/connections.rb +49 -0
  44. data/lib/karafka/web/tracking/consumers/listeners/pausing.rb +7 -4
  45. data/lib/karafka/web/tracking/consumers/listeners/processing.rb +78 -70
  46. data/lib/karafka/web/tracking/consumers/listeners/statistics.rb +40 -13
  47. data/lib/karafka/web/tracking/consumers/sampler.rb +82 -25
  48. data/lib/karafka/web/tracking/helpers/ttls/array.rb +72 -0
  49. data/lib/karafka/web/tracking/helpers/ttls/hash.rb +34 -0
  50. data/lib/karafka/web/tracking/helpers/ttls/stats.rb +49 -0
  51. data/lib/karafka/web/tracking/helpers/ttls/windows.rb +32 -0
  52. data/lib/karafka/web/tracking/reporter.rb +1 -0
  53. data/lib/karafka/web/ui/app.rb +22 -4
  54. data/lib/karafka/web/ui/base.rb +18 -2
  55. data/lib/karafka/web/ui/controllers/base.rb +34 -4
  56. data/lib/karafka/web/ui/controllers/become_pro.rb +1 -1
  57. data/lib/karafka/web/ui/controllers/cluster.rb +33 -9
  58. data/lib/karafka/web/ui/controllers/consumers.rb +8 -2
  59. data/lib/karafka/web/ui/controllers/dashboard.rb +2 -2
  60. data/lib/karafka/web/ui/controllers/errors.rb +2 -2
  61. data/lib/karafka/web/ui/controllers/jobs.rb +55 -5
  62. data/lib/karafka/web/ui/controllers/requests/params.rb +5 -0
  63. data/lib/karafka/web/ui/controllers/responses/deny.rb +15 -0
  64. data/lib/karafka/web/ui/controllers/responses/file.rb +23 -0
  65. data/lib/karafka/web/ui/controllers/responses/{data.rb → render.rb} +3 -3
  66. data/lib/karafka/web/ui/controllers/routing.rb +11 -2
  67. data/lib/karafka/web/ui/controllers/status.rb +1 -1
  68. data/lib/karafka/web/ui/helpers/application_helper.rb +70 -0
  69. data/lib/karafka/web/ui/lib/hash_proxy.rb +29 -14
  70. data/lib/karafka/web/ui/lib/sorter.rb +170 -0
  71. data/lib/karafka/web/ui/models/counters.rb +6 -0
  72. data/lib/karafka/web/ui/models/health.rb +23 -2
  73. data/lib/karafka/web/ui/models/jobs.rb +48 -0
  74. data/lib/karafka/web/ui/models/metrics/charts/aggregated.rb +33 -0
  75. data/lib/karafka/web/ui/models/metrics/charts/topics.rb +1 -10
  76. data/lib/karafka/web/ui/models/process.rb +2 -1
  77. data/lib/karafka/web/ui/models/status.rb +23 -7
  78. data/lib/karafka/web/ui/models/topic.rb +3 -1
  79. data/lib/karafka/web/ui/models/visibility_filter.rb +16 -0
  80. data/lib/karafka/web/ui/pro/app.rb +44 -6
  81. data/lib/karafka/web/ui/pro/controllers/cluster.rb +1 -0
  82. data/lib/karafka/web/ui/pro/controllers/consumers.rb +52 -6
  83. data/lib/karafka/web/ui/pro/controllers/dashboard.rb +1 -1
  84. data/lib/karafka/web/ui/pro/controllers/dlq.rb +1 -1
  85. data/lib/karafka/web/ui/pro/controllers/errors.rb +3 -3
  86. data/lib/karafka/web/ui/pro/controllers/explorer.rb +8 -8
  87. data/lib/karafka/web/ui/pro/controllers/health.rb +34 -2
  88. data/lib/karafka/web/ui/pro/controllers/jobs.rb +11 -0
  89. data/lib/karafka/web/ui/pro/controllers/messages.rb +42 -0
  90. data/lib/karafka/web/ui/pro/controllers/routing.rb +11 -2
  91. data/lib/karafka/web/ui/pro/views/consumers/_breadcrumbs.erb +8 -2
  92. data/lib/karafka/web/ui/pro/views/consumers/_consumer.erb +14 -8
  93. data/lib/karafka/web/ui/pro/views/consumers/_counters.erb +8 -6
  94. data/lib/karafka/web/ui/pro/views/consumers/consumer/_job.erb +4 -1
  95. data/lib/karafka/web/ui/pro/views/consumers/consumer/_no_jobs.erb +1 -1
  96. data/lib/karafka/web/ui/pro/views/consumers/consumer/_partition.erb +1 -3
  97. data/lib/karafka/web/ui/pro/views/consumers/consumer/_subscription_group.erb +28 -11
  98. data/lib/karafka/web/ui/pro/views/consumers/consumer/_tabs.erb +10 -3
  99. data/lib/karafka/web/ui/pro/views/consumers/index.erb +3 -3
  100. data/lib/karafka/web/ui/pro/views/consumers/pending_jobs.erb +43 -0
  101. data/lib/karafka/web/ui/pro/views/consumers/{jobs.erb → running_jobs.erb} +11 -10
  102. data/lib/karafka/web/ui/pro/views/dashboard/index.erb +7 -1
  103. data/lib/karafka/web/ui/pro/views/explorer/message/_message_actions.erb +18 -0
  104. data/lib/karafka/web/ui/pro/views/explorer/message/_metadata.erb +43 -0
  105. data/lib/karafka/web/ui/pro/views/explorer/message/_payload.erb +21 -0
  106. data/lib/karafka/web/ui/pro/views/explorer/message/_payload_actions.erb +19 -0
  107. data/lib/karafka/web/ui/pro/views/explorer/show.erb +9 -84
  108. data/lib/karafka/web/ui/pro/views/health/_breadcrumbs.erb +8 -0
  109. data/lib/karafka/web/ui/pro/views/health/_partition.erb +1 -3
  110. data/lib/karafka/web/ui/pro/views/health/_partition_offset.erb +4 -4
  111. data/lib/karafka/web/ui/pro/views/health/_partition_times.erb +32 -0
  112. data/lib/karafka/web/ui/pro/views/health/_tabs.erb +9 -0
  113. data/lib/karafka/web/ui/pro/views/health/changes.erb +66 -0
  114. data/lib/karafka/web/ui/pro/views/health/offsets.erb +14 -14
  115. data/lib/karafka/web/ui/pro/views/health/overview.erb +11 -11
  116. data/lib/karafka/web/ui/pro/views/jobs/_job.erb +1 -1
  117. data/lib/karafka/web/ui/pro/views/jobs/_no_jobs.erb +1 -1
  118. data/lib/karafka/web/ui/pro/views/jobs/pending.erb +39 -0
  119. data/lib/karafka/web/ui/pro/views/jobs/running.erb +39 -0
  120. data/lib/karafka/web/ui/pro/views/routing/_consumer_group.erb +2 -2
  121. data/lib/karafka/web/ui/pro/views/routing/_topic.erb +9 -0
  122. data/lib/karafka/web/ui/pro/views/routing/show.erb +12 -0
  123. data/lib/karafka/web/ui/pro/views/shared/_navigation.erb +1 -1
  124. data/lib/karafka/web/ui/public/javascripts/application.js +10 -0
  125. data/lib/karafka/web/ui/public/stylesheets/application.css +4 -0
  126. data/lib/karafka/web/ui/views/cluster/_breadcrumbs.erb +16 -0
  127. data/lib/karafka/web/ui/views/cluster/_tabs.erb +27 -0
  128. data/lib/karafka/web/ui/views/cluster/brokers.erb +27 -0
  129. data/lib/karafka/web/ui/views/cluster/topics.erb +35 -0
  130. data/lib/karafka/web/ui/views/consumers/_counters.erb +8 -6
  131. data/lib/karafka/web/ui/views/consumers/_summary.erb +2 -2
  132. data/lib/karafka/web/ui/views/consumers/index.erb +3 -3
  133. data/lib/karafka/web/ui/views/dashboard/_ranges_selector.erb +23 -7
  134. data/lib/karafka/web/ui/views/dashboard/index.erb +19 -8
  135. data/lib/karafka/web/ui/views/errors/show.erb +2 -23
  136. data/lib/karafka/web/ui/views/jobs/_breadcrumbs.erb +17 -1
  137. data/lib/karafka/web/ui/views/jobs/_job.erb +1 -1
  138. data/lib/karafka/web/ui/views/jobs/_no_jobs.erb +1 -1
  139. data/lib/karafka/web/ui/views/jobs/_tabs.erb +27 -0
  140. data/lib/karafka/web/ui/views/jobs/{index.erb → pending.erb} +9 -7
  141. data/lib/karafka/web/ui/{pro/views/jobs/index.erb → views/jobs/running.erb} +9 -11
  142. data/lib/karafka/web/ui/views/routing/_consumer_group.erb +14 -12
  143. data/lib/karafka/web/ui/views/shared/_navigation.erb +1 -1
  144. data/lib/karafka/web/ui/views/shared/_pagination.erb +1 -1
  145. data/lib/karafka/web/ui/views/shared/exceptions/not_allowed.erb +37 -0
  146. data/lib/karafka/web/ui/views/status/show.erb +17 -2
  147. data/lib/karafka/web/ui/views/status/warnings/_routing_topics_presence.erb +15 -0
  148. data/lib/karafka/web/version.rb +1 -1
  149. data/lib/karafka/web.rb +6 -2
  150. data.tar.gz.sig +0 -0
  151. metadata +61 -26
  152. metadata.gz.sig +0 -0
  153. data/lib/karafka/web/management/base.rb +0 -34
  154. data/lib/karafka/web/management/clean_boot_file.rb +0 -31
  155. data/lib/karafka/web/management/create_initial_states.rb +0 -101
  156. data/lib/karafka/web/management/create_topics.rb +0 -133
  157. data/lib/karafka/web/management/delete_topics.rb +0 -28
  158. data/lib/karafka/web/management/enable.rb +0 -102
  159. data/lib/karafka/web/management/extend_boot_file.rb +0 -37
  160. data/lib/karafka/web/tracking/ttl_array.rb +0 -59
  161. data/lib/karafka/web/tracking/ttl_hash.rb +0 -16
  162. data/lib/karafka/web/ui/pro/views/dashboard/_ranges_selector.erb +0 -39
  163. data/lib/karafka/web/ui/views/cluster/index.erb +0 -74
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.7.9
4
+ version: 0.8.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maciej Mensfeld
@@ -35,7 +35,7 @@ cert_chain:
35
35
  AnG1dJU+yL2BK7vaVytLTstJME5mepSZ46qqIJXMuWob/YPDmVaBF39TDSG9e34s
36
36
  msG3BiCqgOgHAnL23+CN3Rt8MsuRfEtoTKpJVcCfoEoNHOkc
37
37
  -----END CERTIFICATE-----
38
- date: 2023-10-25 00:00:00.000000000 Z
38
+ date: 2024-01-21 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: erubi
@@ -57,40 +57,40 @@ dependencies:
57
57
  requirements:
58
58
  - - ">="
59
59
  - !ruby/object:Gem::Version
60
- version: 2.2.9
60
+ version: 2.3.0.rc1
61
61
  - - "<"
62
62
  - !ruby/object:Gem::Version
63
- version: 3.0.0
63
+ version: 2.4.0
64
64
  type: :runtime
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - ">="
69
69
  - !ruby/object:Gem::Version
70
- version: 2.2.9
70
+ version: 2.3.0.rc1
71
71
  - - "<"
72
72
  - !ruby/object:Gem::Version
73
- version: 3.0.0
73
+ version: 2.4.0
74
74
  - !ruby/object:Gem::Dependency
75
75
  name: karafka-core
76
76
  requirement: !ruby/object:Gem::Requirement
77
77
  requirements:
78
78
  - - ">="
79
79
  - !ruby/object:Gem::Version
80
- version: 2.2.4
80
+ version: 2.3.0.rc1
81
81
  - - "<"
82
82
  - !ruby/object:Gem::Version
83
- version: 3.0.0
83
+ version: 2.4.0
84
84
  type: :runtime
85
85
  prerelease: false
86
86
  version_requirements: !ruby/object:Gem::Requirement
87
87
  requirements:
88
88
  - - ">="
89
89
  - !ruby/object:Gem::Version
90
- version: 2.2.4
90
+ version: 2.3.0.rc1
91
91
  - - "<"
92
92
  - !ruby/object:Gem::Version
93
- version: 3.0.0
93
+ version: 2.4.0
94
94
  - !ruby/object:Gem::Dependency
95
95
  name: roda
96
96
  requirement: !ruby/object:Gem::Requirement
@@ -184,14 +184,28 @@ files:
184
184
  - lib/karafka/web/contracts/config.rb
185
185
  - lib/karafka/web/deserializer.rb
186
186
  - lib/karafka/web/errors.rb
187
+ - lib/karafka/web/inflector.rb
187
188
  - lib/karafka/web/installer.rb
188
- - lib/karafka/web/management/base.rb
189
- - lib/karafka/web/management/clean_boot_file.rb
190
- - lib/karafka/web/management/create_initial_states.rb
191
- - lib/karafka/web/management/create_topics.rb
192
- - lib/karafka/web/management/delete_topics.rb
193
- - lib/karafka/web/management/enable.rb
194
- - lib/karafka/web/management/extend_boot_file.rb
189
+ - lib/karafka/web/management/actions/base.rb
190
+ - lib/karafka/web/management/actions/clean_boot_file.rb
191
+ - lib/karafka/web/management/actions/create_initial_states.rb
192
+ - lib/karafka/web/management/actions/create_topics.rb
193
+ - lib/karafka/web/management/actions/delete_topics.rb
194
+ - lib/karafka/web/management/actions/enable.rb
195
+ - lib/karafka/web/management/actions/extend_boot_file.rb
196
+ - lib/karafka/web/management/actions/migrate_states_data.rb
197
+ - lib/karafka/web/management/migrations/0_base.rb
198
+ - lib/karafka/web/management/migrations/0_set_initial_consumers_metrics.rb
199
+ - lib/karafka/web/management/migrations/0_set_initial_consumers_state.rb
200
+ - lib/karafka/web/management/migrations/1699543515_fill_missing_received_and_sent_bytes_in_consumers_metrics.rb
201
+ - lib/karafka/web/management/migrations/1699543515_fill_missing_received_and_sent_bytes_in_consumers_state.rb
202
+ - lib/karafka/web/management/migrations/1700234522_introduce_waiting_in_consumers_metrics.rb
203
+ - lib/karafka/web/management/migrations/1700234522_introduce_waiting_in_consumers_state.rb
204
+ - lib/karafka/web/management/migrations/1700234522_remove_processing_from_consumers_metrics.rb
205
+ - lib/karafka/web/management/migrations/1700234522_remove_processing_from_consumers_state.rb
206
+ - lib/karafka/web/management/migrations/1704722380_split_listeners_into_active_and_paused_in_metrics.rb
207
+ - lib/karafka/web/management/migrations/1704722380_split_listeners_into_active_and_paused_in_states.rb
208
+ - lib/karafka/web/management/migrator.rb
195
209
  - lib/karafka/web/processing/consumer.rb
196
210
  - lib/karafka/web/processing/consumers/aggregators/base.rb
197
211
  - lib/karafka/web/processing/consumers/aggregators/metrics.rb
@@ -204,6 +218,7 @@ files:
204
218
  - lib/karafka/web/processing/consumers/metrics.rb
205
219
  - lib/karafka/web/processing/consumers/schema_manager.rb
206
220
  - lib/karafka/web/processing/consumers/state.rb
221
+ - lib/karafka/web/processing/publisher.rb
207
222
  - lib/karafka/web/processing/time_series_tracker.rb
208
223
  - lib/karafka/web/tracking/consumers/contracts/consumer_group.rb
209
224
  - lib/karafka/web/tracking/consumers/contracts/job.rb
@@ -212,6 +227,7 @@ files:
212
227
  - lib/karafka/web/tracking/consumers/contracts/subscription_group.rb
213
228
  - lib/karafka/web/tracking/consumers/contracts/topic.rb
214
229
  - lib/karafka/web/tracking/consumers/listeners/base.rb
230
+ - lib/karafka/web/tracking/consumers/listeners/connections.rb
215
231
  - lib/karafka/web/tracking/consumers/listeners/errors.rb
216
232
  - lib/karafka/web/tracking/consumers/listeners/pausing.rb
217
233
  - lib/karafka/web/tracking/consumers/listeners/processing.rb
@@ -222,6 +238,10 @@ files:
222
238
  - lib/karafka/web/tracking/consumers/sampler.rb
223
239
  - lib/karafka/web/tracking/contracts/error.rb
224
240
  - lib/karafka/web/tracking/helpers/error_info.rb
241
+ - lib/karafka/web/tracking/helpers/ttls/array.rb
242
+ - lib/karafka/web/tracking/helpers/ttls/hash.rb
243
+ - lib/karafka/web/tracking/helpers/ttls/stats.rb
244
+ - lib/karafka/web/tracking/helpers/ttls/windows.rb
225
245
  - lib/karafka/web/tracking/memoized_shell.rb
226
246
  - lib/karafka/web/tracking/producers/listeners/base.rb
227
247
  - lib/karafka/web/tracking/producers/listeners/errors.rb
@@ -230,8 +250,6 @@ files:
230
250
  - lib/karafka/web/tracking/reporter.rb
231
251
  - lib/karafka/web/tracking/sampler.rb
232
252
  - lib/karafka/web/tracking/scheduler.rb
233
- - lib/karafka/web/tracking/ttl_array.rb
234
- - lib/karafka/web/tracking/ttl_hash.rb
235
253
  - lib/karafka/web/ui/app.rb
236
254
  - lib/karafka/web/ui/base.rb
237
255
  - lib/karafka/web/ui/controllers/base.rb
@@ -242,8 +260,10 @@ files:
242
260
  - lib/karafka/web/ui/controllers/errors.rb
243
261
  - lib/karafka/web/ui/controllers/jobs.rb
244
262
  - lib/karafka/web/ui/controllers/requests/params.rb
245
- - lib/karafka/web/ui/controllers/responses/data.rb
263
+ - lib/karafka/web/ui/controllers/responses/deny.rb
264
+ - lib/karafka/web/ui/controllers/responses/file.rb
246
265
  - lib/karafka/web/ui/controllers/responses/redirect.rb
266
+ - lib/karafka/web/ui/controllers/responses/render.rb
247
267
  - lib/karafka/web/ui/controllers/routing.rb
248
268
  - lib/karafka/web/ui/controllers/status.rb
249
269
  - lib/karafka/web/ui/helpers/application_helper.rb
@@ -258,6 +278,7 @@ files:
258
278
  - lib/karafka/web/ui/lib/paginations/paginators/partitions.rb
259
279
  - lib/karafka/web/ui/lib/paginations/paginators/sets.rb
260
280
  - lib/karafka/web/ui/lib/paginations/watermark_offsets_based.rb
281
+ - lib/karafka/web/ui/lib/sorter.rb
261
282
  - lib/karafka/web/ui/lib/ttl_cache.rb
262
283
  - lib/karafka/web/ui/models/cluster_info.rb
263
284
  - lib/karafka/web/ui/models/consumer_group.rb
@@ -266,6 +287,7 @@ files:
266
287
  - lib/karafka/web/ui/models/counters.rb
267
288
  - lib/karafka/web/ui/models/health.rb
268
289
  - lib/karafka/web/ui/models/job.rb
290
+ - lib/karafka/web/ui/models/jobs.rb
269
291
  - lib/karafka/web/ui/models/message.rb
270
292
  - lib/karafka/web/ui/models/metrics/aggregated.rb
271
293
  - lib/karafka/web/ui/models/metrics/charts/aggregated.rb
@@ -305,9 +327,9 @@ files:
305
327
  - lib/karafka/web/ui/pro/views/consumers/consumer/_tabs.erb
306
328
  - lib/karafka/web/ui/pro/views/consumers/details.erb
307
329
  - lib/karafka/web/ui/pro/views/consumers/index.erb
308
- - lib/karafka/web/ui/pro/views/consumers/jobs.erb
330
+ - lib/karafka/web/ui/pro/views/consumers/pending_jobs.erb
331
+ - lib/karafka/web/ui/pro/views/consumers/running_jobs.erb
309
332
  - lib/karafka/web/ui/pro/views/consumers/subscriptions.erb
310
- - lib/karafka/web/ui/pro/views/dashboard/_ranges_selector.erb
311
333
  - lib/karafka/web/ui/pro/views/dashboard/index.erb
312
334
  - lib/karafka/web/ui/pro/views/dlq/_breadcrumbs.erb
313
335
  - lib/karafka/web/ui/pro/views/dlq/_no_topics.erb
@@ -329,6 +351,10 @@ files:
329
351
  - lib/karafka/web/ui/pro/views/explorer/_partition_option.erb
330
352
  - lib/karafka/web/ui/pro/views/explorer/_topic.erb
331
353
  - lib/karafka/web/ui/pro/views/explorer/index.erb
354
+ - lib/karafka/web/ui/pro/views/explorer/message/_message_actions.erb
355
+ - lib/karafka/web/ui/pro/views/explorer/message/_metadata.erb
356
+ - lib/karafka/web/ui/pro/views/explorer/message/_payload.erb
357
+ - lib/karafka/web/ui/pro/views/explorer/message/_payload_actions.erb
332
358
  - lib/karafka/web/ui/pro/views/explorer/messages/_detail.erb
333
359
  - lib/karafka/web/ui/pro/views/explorer/messages/_headers.erb
334
360
  - lib/karafka/web/ui/pro/views/explorer/messages/_key.erb
@@ -346,12 +372,15 @@ files:
346
372
  - lib/karafka/web/ui/pro/views/health/_no_data.erb
347
373
  - lib/karafka/web/ui/pro/views/health/_partition.erb
348
374
  - lib/karafka/web/ui/pro/views/health/_partition_offset.erb
375
+ - lib/karafka/web/ui/pro/views/health/_partition_times.erb
349
376
  - lib/karafka/web/ui/pro/views/health/_tabs.erb
377
+ - lib/karafka/web/ui/pro/views/health/changes.erb
350
378
  - lib/karafka/web/ui/pro/views/health/offsets.erb
351
379
  - lib/karafka/web/ui/pro/views/health/overview.erb
352
380
  - lib/karafka/web/ui/pro/views/jobs/_job.erb
353
381
  - lib/karafka/web/ui/pro/views/jobs/_no_jobs.erb
354
- - lib/karafka/web/ui/pro/views/jobs/index.erb
382
+ - lib/karafka/web/ui/pro/views/jobs/pending.erb
383
+ - lib/karafka/web/ui/pro/views/jobs/running.erb
355
384
  - lib/karafka/web/ui/pro/views/routing/_consumer_group.erb
356
385
  - lib/karafka/web/ui/pro/views/routing/_detail.erb
357
386
  - lib/karafka/web/ui/pro/views/routing/_topic.erb
@@ -379,7 +408,9 @@ files:
379
408
  - lib/karafka/web/ui/views/cluster/_broker.erb
380
409
  - lib/karafka/web/ui/views/cluster/_no_partitions.erb
381
410
  - lib/karafka/web/ui/views/cluster/_partition.erb
382
- - lib/karafka/web/ui/views/cluster/index.erb
411
+ - lib/karafka/web/ui/views/cluster/_tabs.erb
412
+ - lib/karafka/web/ui/views/cluster/brokers.erb
413
+ - lib/karafka/web/ui/views/cluster/topics.erb
383
414
  - lib/karafka/web/ui/views/consumers/_consumer.erb
384
415
  - lib/karafka/web/ui/views/consumers/_counters.erb
385
416
  - lib/karafka/web/ui/views/consumers/_no_consumers.erb
@@ -400,7 +431,9 @@ files:
400
431
  - lib/karafka/web/ui/views/jobs/_breadcrumbs.erb
401
432
  - lib/karafka/web/ui/views/jobs/_job.erb
402
433
  - lib/karafka/web/ui/views/jobs/_no_jobs.erb
403
- - lib/karafka/web/ui/views/jobs/index.erb
434
+ - lib/karafka/web/ui/views/jobs/_tabs.erb
435
+ - lib/karafka/web/ui/views/jobs/pending.erb
436
+ - lib/karafka/web/ui/views/jobs/running.erb
404
437
  - lib/karafka/web/ui/views/layout.erb
405
438
  - lib/karafka/web/ui/views/routing/_breadcrumbs.erb
406
439
  - lib/karafka/web/ui/views/routing/_consumer_group.erb
@@ -421,6 +454,7 @@ files:
421
454
  - lib/karafka/web/ui/views/shared/_no_paginated_data.erb
422
455
  - lib/karafka/web/ui/views/shared/_pagination.erb
423
456
  - lib/karafka/web/ui/views/shared/_tab_nav.erb
457
+ - lib/karafka/web/ui/views/shared/exceptions/not_allowed.erb
424
458
  - lib/karafka/web/ui/views/shared/exceptions/not_found.erb
425
459
  - lib/karafka/web/ui/views/shared/exceptions/pro_only.erb
426
460
  - lib/karafka/web/ui/views/status/_breadcrumbs.erb
@@ -446,6 +480,7 @@ files:
446
480
  - lib/karafka/web/ui/views/status/warnings/_connection.erb
447
481
  - lib/karafka/web/ui/views/status/warnings/_pro_subscription.erb
448
482
  - lib/karafka/web/ui/views/status/warnings/_replication.erb
483
+ - lib/karafka/web/ui/views/status/warnings/_routing_topics_presence.erb
449
484
  - lib/karafka/web/version.rb
450
485
  - renovate.json
451
486
  homepage: https://karafka.io
@@ -475,7 +510,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
475
510
  - !ruby/object:Gem::Version
476
511
  version: '0'
477
512
  requirements: []
478
- rubygems_version: 3.4.19
513
+ rubygems_version: 3.5.3
479
514
  signing_key:
480
515
  specification_version: 4
481
516
  summary: Karafka ecosystem Web UI interface
metadata.gz.sig CHANGED
Binary file
@@ -1,34 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Karafka
4
- module Web
5
- # Namespace for all the commands related to management of the Web-UI in the context of Karafka
6
- # It includes things like installing, creating needed topics, etc.
7
- module Management
8
- # Base class for all the commands that we use to manage
9
- class Base
10
- include ::Karafka::Helpers::Colorize
11
-
12
- private
13
-
14
- # @return [String] green colored word "successfully"
15
- def successfully
16
- green('successfully')
17
- end
18
-
19
- # @return [String] green colored word "already"
20
- def already
21
- green('already')
22
- end
23
-
24
- # @return [Array<String>] topics available in the cluster
25
- def existing_topics_names
26
- @existing_topics_names ||= ::Karafka::Admin
27
- .cluster_info
28
- .topics
29
- .map { |topic| topic[:topic_name] }
30
- end
31
- end
32
- end
33
- end
34
- end
@@ -1,31 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Karafka
4
- module Web
5
- module Management
6
- # Cleans the boot file from Karafka Web-UI details.
7
- class CleanBootFile < Base
8
- # Web-UI enabled code
9
- ENABLER_CODE = ExtendBootFile::ENABLER_CODE
10
-
11
- private_constant :ENABLER_CODE
12
-
13
- # Removes the Web-UI boot file data
14
- def call
15
- karafka_rb = File.readlines(Karafka.boot_file)
16
-
17
- if karafka_rb.any? { |line| line.include?(ENABLER_CODE) }
18
- puts 'Updating the Karafka boot file...'
19
- karafka_rb.delete_if { |line| line.include?(ENABLER_CODE) }
20
-
21
- File.write(Karafka.boot_file, karafka_rb.join)
22
- puts "Karafka boot file #{successfully} updated."
23
- puts 'Make sure to remove configuration and other customizations as well.'
24
- else
25
- puts 'Karafka Web UI components not found in the boot file.'
26
- end
27
- end
28
- end
29
- end
30
- end
31
- end
@@ -1,101 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Karafka
4
- module Web
5
- module Management
6
- # Creates the records needed for the Web-UI to operate.
7
- class CreateInitialStates < Base
8
- # Defaults stats state that we create in Kafka
9
- DEFAULT_STATS = {
10
- batches: 0,
11
- messages: 0,
12
- retries: 0,
13
- dead: 0,
14
- busy: 0,
15
- enqueued: 0,
16
- processing: 0,
17
- workers: 0,
18
- processes: 0,
19
- rss: 0,
20
- listeners: 0,
21
- utilization: 0,
22
- lag_stored: 0,
23
- errors: 0
24
- }.freeze
25
-
26
- # Default empty historicals for first record in Kafka
27
- DEFAULT_AGGREGATED = Processing::TimeSeriesTracker::TIME_RANGES
28
- .keys
29
- .map { |range| [range, []] }
30
- .to_h
31
- .freeze
32
-
33
- # WHole default empty state (aside from dispatch time)
34
- DEFAULT_STATE = {
35
- processes: {},
36
- stats: DEFAULT_STATS,
37
- schema_state: 'accepted',
38
- schema_version: Processing::Consumers::Aggregators::State::SCHEMA_VERSION,
39
- dispatched_at: Time.now.to_f
40
- }.freeze
41
-
42
- # Default metrics state
43
- DEFAULT_METRICS = {
44
- aggregated: DEFAULT_AGGREGATED,
45
- consumer_groups: DEFAULT_AGGREGATED,
46
- dispatched_at: Time.now.to_f,
47
- schema_version: Processing::Consumers::Aggregators::Metrics::SCHEMA_VERSION
48
- }.freeze
49
-
50
- private_constant :DEFAULT_STATS, :DEFAULT_AGGREGATED
51
-
52
- # Creates the initial states for the Web-UI if needed (if they don't exist)
53
- def call
54
- if Ui::Models::ConsumersState.current
55
- exists('consumers state')
56
- else
57
- creating('consumers state')
58
- ::Karafka::Web.producer.produce_sync(
59
- topic: Karafka::Web.config.topics.consumers.states,
60
- key: Karafka::Web.config.topics.consumers.states,
61
- payload: DEFAULT_STATE.to_json
62
- )
63
- created('consumers state')
64
- end
65
-
66
- if Ui::Models::ConsumersMetrics.current
67
- exists('consumers metrics')
68
- else
69
- creating('consumers metrics')
70
- ::Karafka::Web.producer.produce_sync(
71
- topic: Karafka::Web.config.topics.consumers.metrics,
72
- key: Karafka::Web.config.topics.consumers.metrics,
73
- payload: DEFAULT_METRICS.merge(dispatched_at: Time.now.to_f).to_json
74
- )
75
- created('consumers metrics')
76
- end
77
- end
78
-
79
- private
80
-
81
- # @param type [String] type of state
82
- # @return [String] exists message
83
- def exists(type)
84
- puts "Initial #{type} #{already} exists."
85
- end
86
-
87
- # @param type [String] type of state
88
- # @return [String] message that the state is being created
89
- def creating(type)
90
- puts "Creating #{type} initial record..."
91
- end
92
-
93
- # @param type [String] type of state
94
- # @return [String] message that the state was created
95
- def created(type)
96
- puts "Initial #{type} record #{successfully} created."
97
- end
98
- end
99
- end
100
- end
101
- end
@@ -1,133 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Karafka
4
- module Web
5
- module Management
6
- # Creates all the needed topics (if they don't exist).
7
- # It does **not** populate data.
8
- class CreateTopics < Base
9
- # Runs the creation process
10
- #
11
- # @param replication_factor [Integer] replication factor for Web-UI topics
12
- #
13
- # @note The order of creation of those topics is important. In order to support the
14
- # zero-downtime bootstrap, we use the presence of the states topic and its initial state
15
- # existence as an indicator that the setup went as expected. It the consumers states
16
- # topic exists and contains needed data, it means all went as expected and that
17
- # topics created before it also exist (as no error).
18
- def call(replication_factor)
19
- consumers_states_topic = ::Karafka::Web.config.topics.consumers.states
20
- consumers_metrics_topic = ::Karafka::Web.config.topics.consumers.metrics
21
- consumers_reports_topic = ::Karafka::Web.config.topics.consumers.reports
22
- errors_topic = ::Karafka::Web.config.topics.errors
23
-
24
- if existing_topics_names.include?(errors_topic)
25
- exists(errors_topic)
26
- else
27
- creating(errors_topic)
28
- # All the errors will be dispatched here
29
- # This topic can have multiple partitions but we go with one by default. A single Ruby
30
- # process should not crash that often and if there is an expectation of a higher volume
31
- # of errors, this can be changed by the end user
32
- ::Karafka::Admin.create_topic(
33
- errors_topic,
34
- 1,
35
- replication_factor,
36
- # Remove really old errors (older than 3 months just to preserve space)
37
- {
38
- 'retention.ms': 3 * 31 * 24 * 60 * 60 * 1_000 # 3 months
39
- }
40
- )
41
- created(errors_topic)
42
- end
43
-
44
- if existing_topics_names.include?(consumers_reports_topic)
45
- exists(consumers_reports_topic)
46
- else
47
- creating(consumers_reports_topic)
48
- # This topic needs to have one partition
49
- ::Karafka::Admin.create_topic(
50
- consumers_reports_topic,
51
- 1,
52
- replication_factor,
53
- # We do not need to to store this data for longer than 1 day as this data is only
54
- # used to materialize the end states
55
- # On the other hand we do not want to have it really short-living because in case of
56
- # a consumer crash, we may want to use this info to catch up and backfill the state.
57
- # In case its not consumed because no processes are running, it also usually means
58
- # there's no data to consume because no karafka servers report
59
- {
60
- 'retention.ms': 24 * 60 * 60 * 1_000 # 1 day
61
- }
62
- )
63
- created(consumers_reports_topic)
64
- end
65
-
66
- if existing_topics_names.include?(consumers_metrics_topic)
67
- exists(consumers_metrics_topic)
68
- else
69
- creating(consumers_metrics_topic)
70
- # This topic needs to have one partition
71
- # Same as states - only most recent is relevant as it is a materialized state
72
- ::Karafka::Admin.create_topic(
73
- consumers_metrics_topic,
74
- 1,
75
- replication_factor,
76
- {
77
- 'cleanup.policy': 'compact',
78
- 'retention.ms': 60 * 60 * 1_000, # 1h
79
- 'segment.ms': 24 * 60 * 60 * 1_000, # 1 day
80
- 'segment.bytes': 104_857_600 # 100MB
81
- }
82
- )
83
- created(consumers_metrics_topic)
84
- end
85
-
86
- # Create only if needed
87
- if existing_topics_names.include?(consumers_states_topic)
88
- exists(consumers_states_topic)
89
- else
90
- creating(consumers_states_topic)
91
- # This topic needs to have one partition
92
- ::Karafka::Admin.create_topic(
93
- consumers_states_topic,
94
- 1,
95
- replication_factor,
96
- # We care only about the most recent state, previous are irrelevant. So we can easily
97
- # compact after one minute. We do not use this beyond the most recent collective
98
- # state, hence it all can easily go away. We also limit the segment size to at most
99
- # 100MB not to use more space ever.
100
- {
101
- 'cleanup.policy': 'compact',
102
- 'retention.ms': 60 * 60 * 1_000,
103
- 'segment.ms': 24 * 60 * 60 * 1_000, # 1 day
104
- 'segment.bytes': 104_857_600 # 100MB
105
- }
106
- )
107
- created(consumers_states_topic)
108
- end
109
- end
110
-
111
- private
112
-
113
- # @param topic_name [String] name of the topic that exists
114
- # @return [String] formatted message
115
- def exists(topic_name)
116
- puts("Topic #{topic_name} #{already} exists.")
117
- end
118
-
119
- # @param topic_name [String] name of the topic that we are creating
120
- # @return [String] formatted message
121
- def creating(topic_name)
122
- puts("Creating topic #{topic_name}...")
123
- end
124
-
125
- # @param topic_name [String] name of the topic that we created
126
- # @return [String] formatted message
127
- def created(topic_name)
128
- puts("Topic #{topic_name} #{successfully} created.")
129
- end
130
- end
131
- end
132
- end
133
- end
@@ -1,28 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Karafka
4
- module Web
5
- module Management
6
- # Removes the Web-UI topics from Kafka
7
- class DeleteTopics < Base
8
- # Removes the Web-UI topics
9
- def call
10
- [
11
- ::Karafka::Web.config.topics.consumers.states,
12
- ::Karafka::Web.config.topics.consumers.reports,
13
- ::Karafka::Web.config.topics.consumers.metrics,
14
- ::Karafka::Web.config.topics.errors
15
- ].each do |topic_name|
16
- if existing_topics_names.include?(topic_name.to_s)
17
- puts "Removing #{topic_name}..."
18
- ::Karafka::Admin.delete_topic(topic_name)
19
- puts "Topic #{topic_name} #{successfully} deleted."
20
- else
21
- puts "Topic #{topic_name} not found."
22
- end
23
- end
24
- end
25
- end
26
- end
27
- end
28
- end