karafka-web 0.9.1 → 0.10.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (436) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/.github/workflows/ci.yml +30 -0
  4. data/.gitignore +2 -0
  5. data/.ruby-version +1 -1
  6. data/CHANGELOG.md +98 -1
  7. data/Gemfile +2 -0
  8. data/Gemfile.lock +37 -25
  9. data/LICENSE +1 -1
  10. data/bin/build_assets +51 -0
  11. data/bin/release +6 -0
  12. data/certs/cert.pem +26 -0
  13. data/config/locales/pro_errors.yml +18 -0
  14. data/docker-compose.yml +1 -1
  15. data/gulpfile.js +73 -0
  16. data/karafka-web.gemspec +3 -3
  17. data/lib/karafka/web/config.rb +18 -10
  18. data/lib/karafka/web/contracts/base.rb +2 -0
  19. data/lib/karafka/web/contracts/config.rb +6 -1
  20. data/lib/karafka/web/errors.rb +12 -0
  21. data/lib/karafka/web/inflector.rb +1 -1
  22. data/lib/karafka/web/management/actions/enable.rb +17 -0
  23. data/lib/karafka/web/management/migrations/consumers_metrics/0_set_initial.rb +39 -0
  24. data/lib/karafka/web/management/migrations/consumers_metrics/1699543515_fill_missing_received_and_sent_bytes.rb +28 -0
  25. data/lib/karafka/web/management/migrations/consumers_metrics/1700234522_introduce_waiting.rb +26 -0
  26. data/lib/karafka/web/management/migrations/consumers_metrics/1700234522_remove_processing.rb +26 -0
  27. data/lib/karafka/web/management/migrations/consumers_metrics/1704722380_split_listeners_into_active_and_paused.rb +38 -0
  28. data/lib/karafka/web/management/migrations/consumers_metrics/1706607960_introduce_lag_total.rb +40 -0
  29. data/lib/karafka/web/management/migrations/consumers_metrics/1706611396_rename_lag_total_to_lag_hybrid.rb +38 -0
  30. data/lib/karafka/web/management/migrations/consumers_metrics/1716218393_populate_jobs_metrics.rb +26 -0
  31. data/lib/karafka/web/management/migrations/consumers_states/0_set_initial.rb +46 -0
  32. data/lib/karafka/web/management/migrations/consumers_states/1699543515_fill_missing_received_and_sent_bytes.rb +25 -0
  33. data/lib/karafka/web/management/migrations/consumers_states/1700234522_introduce_waiting.rb +22 -0
  34. data/lib/karafka/web/management/migrations/consumers_states/1700234522_remove_processing.rb +22 -0
  35. data/lib/karafka/web/management/migrations/consumers_states/1704722380_split_listeners_into_active_and_paused.rb +34 -0
  36. data/lib/karafka/web/management/migrations/consumers_states/1706607960_introduce_lag_total.rb +24 -0
  37. data/lib/karafka/web/management/migrations/consumers_states/1706611396_rename_lag_total_to_lag_hybrid.rb +23 -0
  38. data/lib/karafka/web/management/migrations/consumers_states/1716218393_add_jobs_counter.rb +24 -0
  39. data/lib/karafka/web/management/migrator.rb +5 -5
  40. data/lib/karafka/web/pro/commanding/commands/base.rb +8 -0
  41. data/lib/karafka/web/pro/commanding/commands/quiet.rb +4 -1
  42. data/lib/karafka/web/pro/commanding/commands/stop.rb +4 -1
  43. data/lib/karafka/web/pro/loader.rb +8 -0
  44. data/lib/karafka/web/pro/ui/app.rb +84 -7
  45. data/lib/karafka/web/pro/ui/controllers/commanding_controller.rb +4 -4
  46. data/lib/karafka/web/pro/ui/controllers/dlq_controller.rb +1 -1
  47. data/lib/karafka/web/pro/ui/controllers/errors_controller.rb +1 -0
  48. data/lib/karafka/web/pro/ui/controllers/explorer_controller.rb +6 -14
  49. data/lib/karafka/web/pro/ui/controllers/messages_controller.rb +5 -4
  50. data/lib/karafka/web/pro/ui/controllers/recurring_tasks_controller.rb +131 -0
  51. data/lib/karafka/web/pro/ui/controllers/search_controller.rb +73 -0
  52. data/lib/karafka/web/pro/ui/controllers/support_controller.rb +26 -0
  53. data/lib/karafka/web/pro/ui/controllers/topics_controller.rb +31 -0
  54. data/lib/karafka/web/pro/ui/controllers/ux_controller.rb +26 -0
  55. data/lib/karafka/web/pro/ui/lib/policies/config.rb +39 -0
  56. data/lib/karafka/web/pro/ui/lib/policies/contracts/config.rb +46 -0
  57. data/lib/karafka/web/pro/ui/lib/policies/messages.rb +76 -0
  58. data/lib/karafka/web/pro/ui/lib/policies/requests.rb +36 -0
  59. data/lib/karafka/web/pro/ui/lib/policies.rb +34 -0
  60. data/lib/karafka/web/pro/ui/lib/safe_runner.rb +98 -0
  61. data/lib/karafka/web/pro/ui/lib/search/config.rb +53 -0
  62. data/lib/karafka/web/pro/ui/lib/search/contracts/config.rb +101 -0
  63. data/lib/karafka/web/pro/ui/lib/search/contracts/form.rb +111 -0
  64. data/lib/karafka/web/pro/ui/lib/search/matchers/base.rb +59 -0
  65. data/lib/karafka/web/pro/ui/lib/search/matchers/raw_header_includes.rb +57 -0
  66. data/lib/karafka/web/pro/ui/lib/search/matchers/raw_key_includes.rb +41 -0
  67. data/lib/karafka/web/pro/ui/lib/search/matchers/raw_payload_includes.rb +45 -0
  68. data/lib/karafka/web/pro/ui/lib/search/normalizer.rb +47 -0
  69. data/lib/karafka/web/pro/ui/lib/search/runner.rb +230 -0
  70. data/lib/karafka/web/pro/ui/lib/search.rb +36 -0
  71. data/lib/karafka/web/pro/ui/views/cluster/_breadcrumbs.erb +4 -4
  72. data/lib/karafka/web/pro/ui/views/cluster/_tabs.erb +14 -24
  73. data/lib/karafka/web/pro/ui/views/cluster/index.erb +20 -22
  74. data/lib/karafka/web/pro/ui/views/cluster/show.erb +21 -25
  75. data/lib/karafka/web/pro/ui/views/commands/_backtrace.erb +4 -19
  76. data/lib/karafka/web/pro/ui/views/commands/_breadcrumbs.erb +3 -3
  77. data/lib/karafka/web/pro/ui/views/commands/_command.erb +6 -6
  78. data/lib/karafka/web/pro/ui/views/commands/_command_details.erb +1 -11
  79. data/lib/karafka/web/pro/ui/views/commands/_incompatible_schema.erb +3 -14
  80. data/lib/karafka/web/pro/ui/views/commands/_metadata.erb +33 -42
  81. data/lib/karafka/web/pro/ui/views/commands/_table.erb +9 -3
  82. data/lib/karafka/web/pro/ui/views/commands/index.erb +18 -12
  83. data/lib/karafka/web/pro/ui/views/commands/show.erb +24 -29
  84. data/lib/karafka/web/pro/ui/views/consumers/_breadcrumbs.erb +8 -8
  85. data/lib/karafka/web/pro/ui/views/consumers/_consumer.erb +13 -23
  86. data/lib/karafka/web/pro/ui/views/consumers/_consumer_controls.erb +52 -35
  87. data/lib/karafka/web/pro/ui/views/consumers/_consumer_performance.erb +1 -1
  88. data/lib/karafka/web/pro/ui/views/consumers/_tabs.erb +28 -30
  89. data/lib/karafka/web/pro/ui/views/consumers/consumer/_commands.erb +68 -28
  90. data/lib/karafka/web/pro/ui/views/consumers/consumer/_job.erb +1 -1
  91. data/lib/karafka/web/pro/ui/views/consumers/consumer/_metrics.erb +114 -133
  92. data/lib/karafka/web/pro/ui/views/consumers/consumer/_partition.erb +4 -4
  93. data/lib/karafka/web/pro/ui/views/consumers/consumer/_stopped.erb +6 -9
  94. data/lib/karafka/web/pro/ui/views/consumers/consumer/_subscription_group.erb +116 -126
  95. data/lib/karafka/web/pro/ui/views/consumers/consumer/_tabs.erb +26 -31
  96. data/lib/karafka/web/pro/ui/views/consumers/controls.erb +53 -57
  97. data/lib/karafka/web/pro/ui/views/consumers/details.erb +4 -17
  98. data/lib/karafka/web/pro/ui/views/consumers/index.erb +31 -34
  99. data/lib/karafka/web/pro/ui/views/consumers/pending_jobs.erb +41 -46
  100. data/lib/karafka/web/pro/ui/views/consumers/performance.erb +43 -47
  101. data/lib/karafka/web/pro/ui/views/consumers/running_jobs.erb +41 -46
  102. data/lib/karafka/web/pro/ui/views/consumers/subscriptions.erb +14 -17
  103. data/lib/karafka/web/pro/ui/views/dashboard/index.erb +67 -76
  104. data/lib/karafka/web/pro/ui/views/dlq/_breadcrumbs.erb +1 -1
  105. data/lib/karafka/web/pro/ui/views/dlq/_no_topics.erb +1 -7
  106. data/lib/karafka/web/pro/ui/views/dlq/_topic.erb +7 -10
  107. data/lib/karafka/web/pro/ui/views/dlq/index.erb +8 -10
  108. data/lib/karafka/web/pro/ui/views/errors/_breadcrumbs.erb +3 -3
  109. data/lib/karafka/web/pro/ui/views/errors/_error.erb +8 -5
  110. data/lib/karafka/web/pro/ui/views/errors/_selector.erb +12 -0
  111. data/lib/karafka/web/pro/ui/views/errors/_table.erb +5 -4
  112. data/lib/karafka/web/pro/ui/views/errors/index.erb +50 -15
  113. data/lib/karafka/web/pro/ui/views/errors/partition.erb +61 -14
  114. data/lib/karafka/web/pro/ui/views/errors/show.erb +28 -46
  115. data/lib/karafka/web/pro/ui/views/explorer/_breadcrumbs.erb +11 -3
  116. data/lib/karafka/web/pro/ui/views/explorer/_failed_deserialization.erb +8 -3
  117. data/lib/karafka/web/pro/ui/views/explorer/_message.erb +12 -6
  118. data/lib/karafka/web/pro/ui/views/explorer/_no_topics.erb +1 -5
  119. data/lib/karafka/web/pro/ui/views/explorer/_selector.erb +12 -0
  120. data/lib/karafka/web/pro/ui/views/explorer/_topic.erb +6 -8
  121. data/lib/karafka/web/pro/ui/views/explorer/index.erb +13 -15
  122. data/lib/karafka/web/pro/ui/views/explorer/message/_metadata.erb +68 -32
  123. data/lib/karafka/web/pro/ui/views/explorer/message/_payload.erb +17 -16
  124. data/lib/karafka/web/pro/ui/views/explorer/message/_resources_utilization.erb +127 -0
  125. data/lib/karafka/web/pro/ui/views/explorer/message/_too_big_to_be_displayed.erb +20 -0
  126. data/lib/karafka/web/pro/ui/views/explorer/messages/_detail.erb +1 -1
  127. data/lib/karafka/web/pro/ui/views/explorer/partition/_cleaned.erb +3 -5
  128. data/lib/karafka/web/pro/ui/views/explorer/partition/_empty.erb +3 -5
  129. data/lib/karafka/web/pro/ui/views/explorer/partition/_messages.erb +6 -3
  130. data/lib/karafka/web/pro/ui/views/explorer/partition.erb +67 -46
  131. data/lib/karafka/web/pro/ui/views/explorer/show.erb +85 -21
  132. data/lib/karafka/web/pro/ui/views/explorer/topic/_actions.erb +27 -0
  133. data/lib/karafka/web/pro/ui/views/explorer/topic/_empty.erb +3 -5
  134. data/lib/karafka/web/pro/ui/views/explorer/topic/_limited.erb +8 -10
  135. data/lib/karafka/web/pro/ui/views/explorer/topic.erb +24 -44
  136. data/lib/karafka/web/pro/ui/views/health/_breadcrumbs.erb +7 -7
  137. data/lib/karafka/web/pro/ui/views/health/_no_data.erb +1 -7
  138. data/lib/karafka/web/pro/ui/views/health/_partition.erb +3 -3
  139. data/lib/karafka/web/pro/ui/views/health/_partition_lags.erb +3 -3
  140. data/lib/karafka/web/pro/ui/views/health/_partition_offset.erb +2 -2
  141. data/lib/karafka/web/pro/ui/views/health/_partition_times.erb +3 -7
  142. data/lib/karafka/web/pro/ui/views/health/_table_metadata.erb +8 -0
  143. data/lib/karafka/web/pro/ui/views/health/_tabs.erb +32 -49
  144. data/lib/karafka/web/pro/ui/views/health/changes.erb +51 -51
  145. data/lib/karafka/web/pro/ui/views/health/cluster_lags.erb +28 -41
  146. data/lib/karafka/web/pro/ui/views/health/lags.erb +52 -52
  147. data/lib/karafka/web/pro/ui/views/health/offsets.erb +55 -55
  148. data/lib/karafka/web/pro/ui/views/health/overview.erb +60 -60
  149. data/lib/karafka/web/pro/ui/views/jobs/_job.erb +1 -1
  150. data/lib/karafka/web/pro/ui/views/jobs/_no_jobs.erb +1 -7
  151. data/lib/karafka/web/pro/ui/views/jobs/pending.erb +36 -38
  152. data/lib/karafka/web/pro/ui/views/jobs/running.erb +36 -38
  153. data/lib/karafka/web/pro/ui/views/recurring_tasks/_actions.erb +58 -0
  154. data/lib/karafka/web/pro/ui/views/recurring_tasks/_batch_actions.erb +45 -0
  155. data/lib/karafka/web/pro/ui/views/recurring_tasks/_breadcrumbs.erb +22 -0
  156. data/lib/karafka/web/pro/ui/views/recurring_tasks/_log.erb +26 -0
  157. data/lib/karafka/web/pro/ui/views/recurring_tasks/_not_active.erb +12 -0
  158. data/lib/karafka/web/pro/ui/views/recurring_tasks/_tabs.erb +17 -0
  159. data/lib/karafka/web/pro/ui/views/recurring_tasks/_task.erb +46 -0
  160. data/lib/karafka/web/pro/ui/views/recurring_tasks/logs.erb +34 -0
  161. data/lib/karafka/web/pro/ui/views/recurring_tasks/schedule.erb +43 -0
  162. data/lib/karafka/web/pro/ui/views/routing/_consumer_group.erb +7 -12
  163. data/lib/karafka/web/pro/ui/views/routing/_topic.erb +13 -11
  164. data/lib/karafka/web/pro/ui/views/routing/index.erb +7 -9
  165. data/lib/karafka/web/pro/ui/views/routing/show.erb +41 -33
  166. data/lib/karafka/web/pro/ui/views/search/_fix_errors.erb +3 -0
  167. data/lib/karafka/web/pro/ui/views/search/_metadata.erb +71 -0
  168. data/lib/karafka/web/pro/ui/views/search/_no_results.erb +3 -0
  169. data/lib/karafka/web/pro/ui/views/search/_no_search_criteria.erb +5 -0
  170. data/lib/karafka/web/pro/ui/views/search/_search_criteria.erb +37 -0
  171. data/lib/karafka/web/pro/ui/views/search/_search_modal.erb +139 -0
  172. data/lib/karafka/web/pro/ui/views/search/_timeout.erb +3 -0
  173. data/lib/karafka/web/pro/ui/views/search/index.erb +29 -0
  174. data/lib/karafka/web/pro/ui/views/shared/_navigation.erb +90 -28
  175. data/lib/karafka/web/pro/ui/views/topics/_breadcrumbs.erb +14 -6
  176. data/lib/karafka/web/pro/ui/views/topics/_partition_offsets.erb +10 -0
  177. data/lib/karafka/web/pro/ui/views/topics/_tabs.erb +26 -32
  178. data/lib/karafka/web/pro/ui/views/topics/_topic.erb +7 -10
  179. data/lib/karafka/web/pro/ui/views/topics/config.erb +21 -25
  180. data/lib/karafka/web/pro/ui/views/topics/distribution/_badges.erb +10 -5
  181. data/lib/karafka/web/pro/ui/views/topics/distribution/_chart.erb +3 -1
  182. data/lib/karafka/web/pro/ui/views/topics/distribution/_limited.erb +1 -1
  183. data/lib/karafka/web/pro/ui/views/topics/distribution.erb +34 -39
  184. data/lib/karafka/web/pro/ui/views/topics/index.erb +13 -15
  185. data/lib/karafka/web/pro/ui/views/topics/offsets.erb +24 -0
  186. data/lib/karafka/web/pro/ui/views/topics/replication.erb +20 -24
  187. data/lib/karafka/web/processing/consumers/aggregators/metrics.rb +1 -1
  188. data/lib/karafka/web/processing/consumers/aggregators/state.rb +1 -1
  189. data/lib/karafka/web/processing/consumers/contracts/aggregated_stats.rb +1 -0
  190. data/lib/karafka/web/tracking/consumers/contracts/job.rb +1 -1
  191. data/lib/karafka/web/tracking/consumers/contracts/report.rb +6 -0
  192. data/lib/karafka/web/tracking/consumers/listeners/connections.rb +8 -6
  193. data/lib/karafka/web/tracking/consumers/listeners/processing.rb +7 -1
  194. data/lib/karafka/web/tracking/consumers/listeners/tags.rb +1 -1
  195. data/lib/karafka/web/tracking/consumers/reporter.rb +6 -8
  196. data/lib/karafka/web/tracking/consumers/sampler.rb +16 -5
  197. data/lib/karafka/web/ui/app.rb +20 -1
  198. data/lib/karafka/web/ui/base.rb +26 -20
  199. data/lib/karafka/web/ui/controllers/base_controller.rb +7 -5
  200. data/lib/karafka/web/ui/controllers/dashboard_controller.rb +8 -0
  201. data/lib/karafka/web/ui/controllers/requests/params.rb +16 -2
  202. data/lib/karafka/web/ui/controllers/support_controller.rb +17 -0
  203. data/lib/karafka/web/ui/controllers/ux_controller.rb +17 -0
  204. data/lib/karafka/web/ui/helpers/application_helper.rb +83 -43
  205. data/lib/karafka/web/ui/helpers/paths_helper.rb +24 -0
  206. data/lib/karafka/web/ui/helpers/tailwind_helper.rb +90 -0
  207. data/lib/karafka/web/ui/lib/sorter.rb +1 -1
  208. data/lib/karafka/web/ui/models/metrics/aggregated.rb +1 -0
  209. data/lib/karafka/web/ui/models/metrics/charts/topics.rb +36 -20
  210. data/lib/karafka/web/ui/models/recurring_tasks/log.rb +26 -0
  211. data/lib/karafka/web/ui/models/recurring_tasks/schedule.rb +86 -0
  212. data/lib/karafka/web/ui/models/recurring_tasks/task.rb +30 -0
  213. data/lib/karafka/web/ui/models/status.rb +28 -1
  214. data/lib/karafka/web/ui/public/images/calendar.svg +3 -0
  215. data/lib/karafka/web/ui/public/javascripts/application.js +39 -15
  216. data/lib/karafka/web/ui/public/javascripts/application.min.js +64 -0
  217. data/lib/karafka/web/ui/public/javascripts/application.min.js.br +0 -0
  218. data/lib/karafka/web/ui/public/javascripts/application.min.js.gz +0 -0
  219. data/lib/karafka/web/ui/public/javascripts/charts/types/line.js +41 -9
  220. data/lib/karafka/web/ui/public/javascripts/components/btn_toggle_manager.js +37 -0
  221. data/lib/karafka/web/ui/public/javascripts/{live_poll.js → components/live_poll.js} +80 -8
  222. data/lib/karafka/web/ui/public/javascripts/{offset_datetime.js → components/offset_datetime.js} +1 -1
  223. data/lib/karafka/web/ui/public/javascripts/components/search.js +102 -0
  224. data/lib/karafka/web/ui/public/javascripts/components/tabs_manager.js +84 -0
  225. data/lib/karafka/web/ui/public/javascripts/components/theme_manager.js +66 -0
  226. data/lib/karafka/web/ui/public/javascripts/components/turbo_tracker.js +30 -0
  227. data/lib/karafka/web/ui/public/javascripts/libs/datepicker.js +2 -2
  228. data/lib/karafka/web/ui/public/javascripts/libs/turbo.js +6618 -0
  229. data/lib/karafka/web/ui/public/stylesheets/application.css +20 -113
  230. data/lib/karafka/web/ui/public/stylesheets/application.min.css +13 -0
  231. data/lib/karafka/web/ui/public/stylesheets/application.min.css.br +0 -0
  232. data/lib/karafka/web/ui/public/stylesheets/application.min.css.gz +0 -0
  233. data/lib/karafka/web/ui/public/stylesheets/libs/highlight_dark.min.css +8 -0
  234. data/lib/karafka/web/ui/public/stylesheets/libs/highlight_dark.min.css.br +0 -0
  235. data/lib/karafka/web/ui/public/stylesheets/libs/highlight_dark.min.css.gz +0 -0
  236. data/lib/karafka/web/ui/public/stylesheets/libs/highlight_light.min.css.br +0 -0
  237. data/lib/karafka/web/ui/public/stylesheets/libs/highlight_light.min.css.gz +0 -0
  238. data/lib/karafka/web/ui/public/stylesheets/libs/tailwind.css +403 -0
  239. data/lib/karafka/web/ui/views/cluster/_breadcrumbs.erb +3 -3
  240. data/lib/karafka/web/ui/views/cluster/_tabs.erb +14 -24
  241. data/lib/karafka/web/ui/views/cluster/brokers.erb +20 -22
  242. data/lib/karafka/web/ui/views/cluster/replication.erb +28 -32
  243. data/lib/karafka/web/ui/views/consumers/_assignments_badges.erb +1 -1
  244. data/lib/karafka/web/ui/views/consumers/_breadcrumbs.erb +5 -0
  245. data/lib/karafka/web/ui/views/consumers/_consumer.erb +9 -13
  246. data/lib/karafka/web/ui/views/consumers/_no_consumers.erb +2 -8
  247. data/lib/karafka/web/ui/views/consumers/_summary.erb +34 -45
  248. data/lib/karafka/web/ui/views/consumers/_tabs.erb +35 -0
  249. data/lib/karafka/web/ui/views/consumers/index.erb +31 -33
  250. data/lib/karafka/web/ui/views/dashboard/_counters.erb +76 -0
  251. data/lib/karafka/web/ui/views/dashboard/_feature_pro.erb +6 -2
  252. data/lib/karafka/web/ui/views/dashboard/_not_enough_data.erb +3 -15
  253. data/lib/karafka/web/ui/views/dashboard/_ranges_selector.erb +12 -12
  254. data/lib/karafka/web/ui/views/dashboard/index.erb +78 -52
  255. data/lib/karafka/web/ui/views/errors/_breadcrumbs.erb +2 -2
  256. data/lib/karafka/web/ui/views/errors/_detail.erb +1 -3
  257. data/lib/karafka/web/ui/views/errors/_error.erb +3 -5
  258. data/lib/karafka/web/ui/views/errors/index.erb +34 -44
  259. data/lib/karafka/web/ui/views/errors/show.erb +29 -47
  260. data/lib/karafka/web/ui/views/jobs/_breadcrumbs.erb +3 -3
  261. data/lib/karafka/web/ui/views/jobs/_job.erb +1 -1
  262. data/lib/karafka/web/ui/views/jobs/_no_jobs.erb +1 -7
  263. data/lib/karafka/web/ui/views/jobs/_tabs.erb +14 -24
  264. data/lib/karafka/web/ui/views/jobs/pending.erb +30 -32
  265. data/lib/karafka/web/ui/views/jobs/running.erb +30 -32
  266. data/lib/karafka/web/ui/views/layout.erb +37 -21
  267. data/lib/karafka/web/ui/views/routing/_breadcrumbs.erb +2 -2
  268. data/lib/karafka/web/ui/views/routing/_consumer_group.erb +7 -12
  269. data/lib/karafka/web/ui/views/routing/_topic.erb +3 -5
  270. data/lib/karafka/web/ui/views/routing/index.erb +7 -9
  271. data/lib/karafka/web/ui/views/routing/show.erb +30 -22
  272. data/lib/karafka/web/ui/views/shared/_become_pro.erb +8 -8
  273. data/lib/karafka/web/ui/views/shared/_brand.erb +2 -2
  274. data/lib/karafka/web/ui/views/shared/_breadcrumbs.erb +23 -0
  275. data/lib/karafka/web/ui/views/shared/_content.erb +2 -28
  276. data/lib/karafka/web/ui/views/shared/_controls.erb +15 -0
  277. data/lib/karafka/web/ui/views/shared/_flashes.erb +5 -7
  278. data/lib/karafka/web/ui/views/shared/_header.erb +16 -19
  279. data/lib/karafka/web/ui/views/shared/_navigation.erb +95 -28
  280. data/lib/karafka/web/ui/views/shared/_no_paginated_data.erb +5 -9
  281. data/lib/karafka/web/ui/views/shared/_pagination.erb +11 -11
  282. data/lib/karafka/web/ui/views/shared/_tab_nav.erb +4 -5
  283. data/lib/karafka/web/ui/views/shared/_title.erb +5 -0
  284. data/lib/karafka/web/ui/views/shared/alerts/_box_error.erb +15 -0
  285. data/lib/karafka/web/ui/views/shared/alerts/_box_info.erb +15 -0
  286. data/lib/karafka/web/ui/views/shared/alerts/_box_primary.erb +15 -0
  287. data/lib/karafka/web/ui/views/shared/alerts/_box_secondary.erb +15 -0
  288. data/lib/karafka/web/ui/views/shared/alerts/_box_success.erb +15 -0
  289. data/lib/karafka/web/ui/views/shared/alerts/_box_warning.erb +15 -0
  290. data/lib/karafka/web/ui/views/shared/alerts/_error.erb +4 -0
  291. data/lib/karafka/web/ui/views/shared/alerts/_info.erb +5 -2
  292. data/lib/karafka/web/ui/views/shared/alerts/_primary.erb +4 -0
  293. data/lib/karafka/web/ui/views/shared/alerts/_secondary.erb +4 -0
  294. data/lib/karafka/web/ui/views/shared/alerts/_success.erb +4 -0
  295. data/lib/karafka/web/ui/views/shared/alerts/_warning.erb +4 -0
  296. data/lib/karafka/web/ui/views/shared/charts/_line.erb +1 -1
  297. data/lib/karafka/web/ui/views/shared/exceptions/not_allowed.erb +14 -19
  298. data/lib/karafka/web/ui/views/shared/exceptions/not_found.erb +16 -21
  299. data/lib/karafka/web/ui/views/shared/exceptions/pro_only.erb +16 -28
  300. data/lib/karafka/web/ui/views/shared/icons/_arrow_down_on_square.erb +3 -0
  301. data/lib/karafka/web/ui/views/shared/icons/_arrow_down_tray.erb +3 -0
  302. data/lib/karafka/web/ui/views/shared/icons/_arrow_on_squares.erb +3 -0
  303. data/lib/karafka/web/ui/views/shared/icons/_arrow_path_rounded.erb +3 -0
  304. data/lib/karafka/web/ui/views/shared/icons/_arrow_uturn_right.erb +3 -0
  305. data/lib/karafka/web/ui/views/shared/icons/_arrows_right_left.erb +3 -0
  306. data/lib/karafka/web/ui/views/shared/icons/_blocks.erb +3 -0
  307. data/lib/karafka/web/ui/views/shared/icons/_book_open.erb +3 -0
  308. data/lib/karafka/web/ui/views/shared/icons/_bug.erb +3 -0
  309. data/lib/karafka/web/ui/views/shared/icons/_burger.erb +14 -0
  310. data/lib/karafka/web/ui/views/shared/icons/_calendar_days.erb +3 -0
  311. data/lib/karafka/web/ui/views/shared/icons/_chart_bar.erb +3 -0
  312. data/lib/karafka/web/ui/views/shared/icons/_check.erb +3 -0
  313. data/lib/karafka/web/ui/views/shared/icons/_check_badge.erb +3 -0
  314. data/lib/karafka/web/ui/views/shared/icons/_check_circle.erb +3 -0
  315. data/lib/karafka/web/ui/views/shared/icons/_circle_stack.erb +3 -0
  316. data/lib/karafka/web/ui/views/shared/icons/_cpu.erb +3 -0
  317. data/lib/karafka/web/ui/views/shared/icons/_document_glass.erb +3 -0
  318. data/lib/karafka/web/ui/views/shared/icons/_exclamation_triangle.erb +3 -0
  319. data/lib/karafka/web/ui/views/shared/icons/_eye.erb +4 -0
  320. data/lib/karafka/web/ui/views/shared/icons/_gear.erb +4 -0
  321. data/lib/karafka/web/ui/views/shared/icons/_github.erb +13 -0
  322. data/lib/karafka/web/ui/views/shared/icons/_globe.erb +3 -0
  323. data/lib/karafka/web/ui/views/shared/icons/_heart.erb +3 -0
  324. data/lib/karafka/web/ui/views/shared/icons/_home.erb +3 -0
  325. data/lib/karafka/web/ui/views/shared/icons/_info_circle.erb +3 -0
  326. data/lib/karafka/web/ui/views/shared/icons/_lifebuoy.erb +3 -0
  327. data/lib/karafka/web/ui/views/shared/icons/_light_bulb.erb +3 -0
  328. data/lib/karafka/web/ui/views/shared/icons/_list_bullets.erb +3 -0
  329. data/lib/karafka/web/ui/views/shared/icons/_magnifying_glass.erb +3 -0
  330. data/lib/karafka/web/ui/views/shared/icons/_moon.erb +3 -0
  331. data/lib/karafka/web/ui/views/shared/icons/_offices.erb +3 -0
  332. data/lib/karafka/web/ui/views/shared/icons/_pause.erb +3 -0
  333. data/lib/karafka/web/ui/views/shared/icons/_pause_circle.erb +3 -0
  334. data/lib/karafka/web/ui/views/shared/icons/_play.erb +3 -0
  335. data/lib/karafka/web/ui/views/shared/icons/_play_circle.erb +4 -0
  336. data/lib/karafka/web/ui/views/shared/icons/_question_circle.erb +3 -0
  337. data/lib/karafka/web/ui/views/shared/icons/_queue_list.erb +3 -0
  338. data/lib/karafka/web/ui/views/shared/icons/_refresh.erb +3 -0
  339. data/lib/karafka/web/ui/views/shared/icons/_slack.erb +16 -0
  340. data/lib/karafka/web/ui/views/shared/icons/_stop.erb +3 -0
  341. data/lib/karafka/web/ui/views/shared/icons/_sun.erb +3 -0
  342. data/lib/karafka/web/ui/views/shared/icons/_x_circle.erb +3 -0
  343. data/lib/karafka/web/ui/views/shared/icons/_x_mark.erb +3 -0
  344. data/lib/karafka/web/ui/views/status/_breadcrumbs.erb +1 -1
  345. data/lib/karafka/web/ui/views/status/_failure.erb +2 -13
  346. data/lib/karafka/web/ui/views/status/_halted.erb +2 -10
  347. data/lib/karafka/web/ui/views/status/_info.erb +2 -13
  348. data/lib/karafka/web/ui/views/status/_success.erb +2 -10
  349. data/lib/karafka/web/ui/views/status/_warning.erb +2 -13
  350. data/lib/karafka/web/ui/views/status/failures/_connection.erb +2 -2
  351. data/lib/karafka/web/ui/views/status/failures/_consumers_reports.erb +3 -3
  352. data/lib/karafka/web/ui/views/status/failures/_consumers_reports_schema_state.erb +4 -4
  353. data/lib/karafka/web/ui/views/status/failures/_enabled.erb +2 -2
  354. data/lib/karafka/web/ui/views/status/failures/_initial_consumers_metrics.erb +6 -6
  355. data/lib/karafka/web/ui/views/status/failures/_initial_consumers_state.erb +6 -6
  356. data/lib/karafka/web/ui/views/status/failures/_live_reporting.erb +2 -2
  357. data/lib/karafka/web/ui/views/status/failures/_materializing_lag.erb +11 -0
  358. data/lib/karafka/web/ui/views/status/failures/_partitions.erb +3 -3
  359. data/lib/karafka/web/ui/views/status/failures/_state_calculation.erb +2 -2
  360. data/lib/karafka/web/ui/views/status/failures/_topics.erb +3 -3
  361. data/lib/karafka/web/ui/views/status/info/_components.erb +59 -49
  362. data/lib/karafka/web/ui/views/status/show.erb +165 -154
  363. data/lib/karafka/web/ui/views/status/warnings/_connection.erb +3 -3
  364. data/lib/karafka/web/ui/views/status/warnings/_pro_subscription.erb +2 -2
  365. data/lib/karafka/web/ui/views/status/warnings/_replication.erb +2 -2
  366. data/lib/karafka/web/ui/views/status/warnings/_routing_topics_presence.erb +1 -1
  367. data/lib/karafka/web/ui/views/support/_breadcrumbs.erb +5 -0
  368. data/lib/karafka/web/ui/views/support/show.erb +71 -0
  369. data/lib/karafka/web/ui/views/ux/_alerts.erb +25 -0
  370. data/lib/karafka/web/ui/views/ux/_badges.erb +21 -0
  371. data/lib/karafka/web/ui/views/ux/_breadcrumbs.erb +5 -0
  372. data/lib/karafka/web/ui/views/ux/_buttons.erb +47 -0
  373. data/lib/karafka/web/ui/views/ux/_card_detail.erb +15 -0
  374. data/lib/karafka/web/ui/views/ux/_card_metric.erb +123 -0
  375. data/lib/karafka/web/ui/views/ux/_card_summary.erb +72 -0
  376. data/lib/karafka/web/ui/views/ux/_card_support.erb +39 -0
  377. data/lib/karafka/web/ui/views/ux/_code.erb +9 -0
  378. data/lib/karafka/web/ui/views/ux/_data_table.erb +82 -0
  379. data/lib/karafka/web/ui/views/ux/_headers.erb +2 -0
  380. data/lib/karafka/web/ui/views/ux/_icons.erb +9 -0
  381. data/lib/karafka/web/ui/views/ux/_pagination.erb +32 -0
  382. data/lib/karafka/web/ui/views/ux/_row_table.erb +52 -0
  383. data/lib/karafka/web/ui/views/ux/_status_rows.erb +65 -0
  384. data/lib/karafka/web/ui/views/ux/_tabs.erb +14 -0
  385. data/lib/karafka/web/ui/views/ux/_text.erb +2 -0
  386. data/lib/karafka/web/ui/views/ux/_topic_tiles.erb +42 -0
  387. data/lib/karafka/web/ui/views/ux/show.erb +19 -0
  388. data/lib/karafka/web/version.rb +1 -1
  389. data/lib/karafka/web.rb +2 -0
  390. data/package-lock.json +4163 -0
  391. data/package.json +15 -0
  392. data/postcss.config.js +6 -0
  393. data/tailwind.config.js +16 -0
  394. data.tar.gz.sig +0 -0
  395. metadata +209 -69
  396. metadata.gz.sig +1 -4
  397. data/certs/cert_chain.pem +0 -26
  398. data/lib/karafka/web/management/migrations/0_set_initial_consumers_metrics.rb +0 -36
  399. data/lib/karafka/web/management/migrations/0_set_initial_consumers_state.rb +0 -43
  400. data/lib/karafka/web/management/migrations/1699543515_fill_missing_received_and_sent_bytes_in_consumers_metrics.rb +0 -26
  401. data/lib/karafka/web/management/migrations/1699543515_fill_missing_received_and_sent_bytes_in_consumers_state.rb +0 -23
  402. data/lib/karafka/web/management/migrations/1700234522_introduce_waiting_in_consumers_metrics.rb +0 -24
  403. data/lib/karafka/web/management/migrations/1700234522_introduce_waiting_in_consumers_state.rb +0 -20
  404. data/lib/karafka/web/management/migrations/1700234522_remove_processing_from_consumers_metrics.rb +0 -24
  405. data/lib/karafka/web/management/migrations/1700234522_remove_processing_from_consumers_state.rb +0 -20
  406. data/lib/karafka/web/management/migrations/1704722380_split_listeners_into_active_and_paused_in_metrics.rb +0 -36
  407. data/lib/karafka/web/management/migrations/1704722380_split_listeners_into_active_and_paused_in_states.rb +0 -32
  408. data/lib/karafka/web/management/migrations/1706607960_introduce_lag_total_in_metrics.rb +0 -38
  409. data/lib/karafka/web/management/migrations/1706607960_introduce_lag_total_in_states.rb +0 -22
  410. data/lib/karafka/web/management/migrations/1706611396_rename_lag_total_to_lag_hybrid_in_metrics.rb +0 -36
  411. data/lib/karafka/web/management/migrations/1706611396_rename_lag_total_to_lag_hybrid_in_states.rb +0 -21
  412. data/lib/karafka/web/pro/ui/views/cluster/brokers.erb +0 -27
  413. data/lib/karafka/web/pro/ui/views/commands/_details.erb +0 -26
  414. data/lib/karafka/web/pro/ui/views/consumers/_counters.erb +0 -72
  415. data/lib/karafka/web/pro/ui/views/consumers/consumer/_title.erb +0 -5
  416. data/lib/karafka/web/pro/ui/views/errors/_title_with_select.erb +0 -31
  417. data/lib/karafka/web/pro/ui/views/explorer/message/_message_actions.erb +0 -18
  418. data/lib/karafka/web/pro/ui/views/explorer/message/_payload_actions.erb +0 -19
  419. data/lib/karafka/web/pro/ui/views/explorer/partition/_details.erb +0 -35
  420. data/lib/karafka/web/pro/ui/views/explorer/topic/_details.erb +0 -23
  421. data/lib/karafka/web/pro/ui/views/health/_consumer_group_header.erb +0 -14
  422. data/lib/karafka/web/ui/controllers/responses/deny.rb +0 -15
  423. data/lib/karafka/web/ui/helpers/alerts_helper.rb +0 -23
  424. data/lib/karafka/web/ui/lib/safe_runner.rb +0 -59
  425. data/lib/karafka/web/ui/models/visibility_filter.rb +0 -49
  426. data/lib/karafka/web/ui/public/javascripts/libs/bootstrap.min.js +0 -6
  427. data/lib/karafka/web/ui/public/javascripts/tabs_manager.js +0 -57
  428. data/lib/karafka/web/ui/public/stylesheets/libs/bootstrap.min.css +0 -6
  429. data/lib/karafka/web/ui/views/consumers/_counters.erb +0 -62
  430. data/lib/karafka/web/ui/views/errors/_watermark_offsets.erb +0 -10
  431. data/lib/karafka/web/ui/views/shared/_feature_pro.erb +0 -4
  432. data/lib/karafka/web/ui/views/shared/_footer.erb +0 -22
  433. data/lib/karafka/web/ui/views/shared/_live_poll.erb +0 -7
  434. /data/lib/karafka/web/management/migrations/{0_base.rb → base.rb} +0 -0
  435. /data/lib/karafka/web/ui/public/javascripts/{charts.js → components/charts.js} +0 -0
  436. /data/lib/karafka/web/ui/public/stylesheets/libs/{highlight.min.css → highlight_light.min.css} +0 -0
@@ -1,81 +1,70 @@
1
- <div id="summary" class="container text-center mb-5">
2
- <div class="row">
3
-
4
- <div class="col-lg-2 offset-lg-1 col-md-4 col-sm-6">
5
- <div class="card mb-0">
6
- <div class="card-body">
7
- <p class="card-text">
8
- <div class="stat mb-1">
1
+ <div id="summary" class="col-span-12">
2
+ <div class="mb-5 px-4 lg:px-10 text-center">
3
+ <div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-10 justify-center mb-10">
4
+ <div class="card-summary-container">
5
+ <div class="card-summary">
6
+ <div class="card-summary-body">
7
+ <div class="card-summary-value">
9
8
  <%= @counters.processes %>
10
9
  </div>
11
- <div class="desc">
10
+ <div class="card-summary-title">
12
11
  Processes
13
12
  </div>
14
- </p>
13
+ </div>
15
14
  </div>
16
15
  </div>
17
- </div>
18
16
 
19
- <div class="col-lg-2 col-md-4 col-sm-6">
20
- <div class="card mb-0">
21
- <div class="card-body">
22
- <p class="card-text">
23
- <div class="stat mb-1">
17
+ <div class="card-summary-container">
18
+ <div class="card-summary">
19
+ <div class="card-summary-body">
20
+ <div class="card-summary-value">
24
21
  <%= @counters.workers %>
25
22
  </div>
26
- <div class="desc">
23
+ <div class="card-summary-title">
27
24
  Workers
28
25
  </div>
29
- </p>
26
+ </div>
30
27
  </div>
31
28
  </div>
32
- </div>
33
29
 
34
- <div class="col-lg-2 col-md-4 col-sm-6 mt-sm-4 offset-lg-0 mt-lg-0 mt-md-0">
35
- <div class="card mb-0">
36
- <div class="card-body">
37
- <p class="card-text">
38
- <div class="stat mb-1">
30
+ <div class="card-summary-container">
31
+ <div class="card-summary">
32
+ <div class="card-summary-body">
33
+ <div class="card-summary-value">
39
34
  <%= @counters.listeners.fetch(:active) %>
40
35
  </div>
41
- <div class="desc">
36
+ <div class="card-summary-title">
42
37
  Active Listeners
43
38
  </div>
44
- </p>
39
+ </div>
45
40
  </div>
46
41
  </div>
47
- </div>
48
42
 
49
- <div class="col-lg-2 col-md-4 mt-md-4 col-sm-6 offset-md-2 mt-sm-4 offset-lg-0 mt-lg-0 mt-md-0">
50
- <div class="card mb-0">
51
- <div class="card-body">
52
- <p class="card-text">
53
- <div class="stat mb-1">
54
- <%= @counters.utilization.round(2) %>
55
- %
43
+ <div class="card-summary-container">
44
+ <div class="card-summary">
45
+ <div class="card-summary-body">
46
+ <div class="card-summary-value">
47
+ <%= @counters.utilization.round(2) %> %
56
48
  </div>
57
- <div class="desc">
49
+ <div class="card-summary-title">
58
50
  Utilization
59
51
  </div>
60
- </p>
52
+ </div>
61
53
  </div>
62
54
  </div>
63
- </div>
64
55
 
65
- <div class="col-lg-2 col-md-4 mt-md-4 col-sm-6 mt-sm-4 offset-sm-3 offset-lg-0 mt-lg-0 mt-md-0 offset-md-0">
66
- <div class="card mb-0">
67
- <div class="card-body">
68
- <p class="card-text">
69
- <div class="stat mb-1">
56
+ <div class="card-summary-container">
57
+ <div class="card-summary">
58
+ <div class="card-summary-body">
59
+ <div class="card-summary-value">
70
60
  <%= format_memory @counters.rss %>
71
61
  </div>
72
- <div class="desc">
62
+ <div class="card-summary-title">
73
63
  RSS
74
64
  </div>
75
- </p>
65
+ </div>
76
66
  </div>
77
67
  </div>
78
68
  </div>
79
-
80
69
  </div>
81
70
  </div>
@@ -0,0 +1,35 @@
1
+ <div class="tab-container-wrapper">
2
+ <div class="tab-container">
3
+ <a
4
+ href="<%= root_path('consumers', 'overview') %>"
5
+ class="custom-tab <%= nav_class(include: 'overview') %>"
6
+ title="Pro Feature"
7
+ >
8
+ Overview
9
+ </a>
10
+
11
+ <a
12
+ href="<%= root_path('consumers', 'performance') %>"
13
+ class="custom-tab disabled <%= nav_class(include: 'performance') %>"
14
+ title="Pro Feature"
15
+ >
16
+ Performance
17
+ </a>
18
+
19
+ <a
20
+ href="<%= root_path('consumers', 'controls') %>"
21
+ class="custom-tab disabled <%= nav_class(include: 'controls') %>"
22
+ title="Pro Feature"
23
+ >
24
+ Controls
25
+ </a>
26
+
27
+ <a
28
+ href="<%= root_path('commands') %>"
29
+ class="custom-tab disabled <%= nav_class(include: 'commands') %>"
30
+ title="Pro Feature"
31
+ >
32
+ Commands
33
+ </a>
34
+ </div>
35
+ </div>
@@ -1,37 +1,35 @@
1
- <%== partial 'consumers/counters' %>
1
+ <% view_title 'Consumers' %>
2
+
2
3
  <%== partial 'consumers/summary' %>
4
+ <%== partial 'consumers/tabs' %>
3
5
 
4
- <div class="container">
5
- <div class="row">
6
- <div class="col-sm-12">
7
- <% if @processes.empty? && params.current_page <= 1 %>
8
- <%== partial 'consumers/no_consumers' %>
9
- <% elsif @processes.empty? %>
10
- <%== partial 'shared/no_paginated_data' %>
11
- <% else %>
12
- <div class="table-responsive">
13
- <table class="processes bg-white table table-hover table-bordered table-striped mb-0 align-middle">
14
- <thead>
15
- <tr class="align-middle">
16
- <th><%== sort_link(:id) %></th>
17
- <th class="col-sm-2"><%== sort_link(:started_at, rev: true) %></th>
18
- <th class="col-sm-1">Memory</th>
19
- <th class="col-sm-1">Utilization</th>
20
- <th class="col-sm-1"><%== sort_link(:lag_hybrid) %></th>
21
- </tr>
22
- </thead>
23
- <tbody>
24
- <%==
25
- render_each(
26
- @processes,
27
- 'consumers/_consumer',
28
- local: :process
29
- )
30
- %>
31
- </tbody>
32
- </table>
33
- </div>
34
- <% end %>
6
+ <div class="col-span-12">
7
+ <% if @processes.empty? && params.current_page <= 1 %>
8
+ <%== partial 'consumers/no_consumers' %>
9
+ <% elsif @processes.empty? %>
10
+ <%== partial 'shared/no_paginated_data' %>
11
+ <% else %>
12
+ <div class="data-table-wrapper">
13
+ <table class="data-table">
14
+ <thead>
15
+ <tr>
16
+ <th><%== sort_link(:id) %></th>
17
+ <th class="col-sm-2"><%== sort_link(:started_at, rev: true) %></th>
18
+ <th class="col-sm-1">Memory</th>
19
+ <th class="col-sm-1">Utilization</th>
20
+ <th class="col-sm-1"><%== sort_link(:lag_hybrid) %></th>
21
+ </tr>
22
+ </thead>
23
+ <tbody>
24
+ <%==
25
+ render_each(
26
+ @processes,
27
+ 'consumers/_consumer',
28
+ local: :process
29
+ )
30
+ %>
31
+ </tbody>
32
+ </table>
35
33
  </div>
36
- </div>
34
+ <% end %>
37
35
  </div>
@@ -0,0 +1,76 @@
1
+ <div id="refreshable" class="col-span-12 mb-10">
2
+ <div class="card bg-base-100 border border-gray-300 rounded-md">
3
+ <div class="card-body p-2 text-sm">
4
+ <div class="w-full">
5
+ <ul class="list-none grid grid-cols-2 md:grid-cols-3 lg:grid-cols-9 text-center gap-4 mb-0 mt-0">
6
+ <li class="p-1">
7
+ <div class="count mb-1 text-md">
8
+ <%= number_with_delimiter @counters.messages, ' ' %>
9
+ </div>
10
+ <div class="desc text-gray-500">Messages</div>
11
+ </li>
12
+ <li class="p-1">
13
+ <div class="count mb-1 text-md">
14
+ <%= number_with_delimiter @counters.batches, ' ' %>
15
+ </div>
16
+ <div class="desc text-gray-500">Batches</div>
17
+ </li>
18
+ <li class="p-1">
19
+ <a href="<%= root_path('jobs/running') %>" class="hover:text-blue-600">
20
+ <div class="count mb-1 text-md">
21
+ <%= number_with_delimiter @counters.jobs, ' ' %>
22
+ </div>
23
+ <div class="desc text-gray-500">Jobs</div>
24
+ </a>
25
+ </li>
26
+ <li class="p-1">
27
+ <a href="<%= root_path('health/lags') %>" class="hover:text-blue-600">
28
+ <div class="count mb-1 text-md">
29
+ <%= number_with_delimiter @counters.lag_hybrid, ' ' %>
30
+ </div>
31
+ <div class="desc text-gray-500">Total lag</div>
32
+ </a>
33
+ </li>
34
+ <li class="p-1">
35
+ <a href="<%= root_path('jobs/running') %>" class="hover:text-blue-600">
36
+ <div class="count mb-1 text-md">
37
+ <%= number_with_delimiter @counters.busy, ' ' %>
38
+ </div>
39
+ <div class="desc text-gray-500">Running</div>
40
+ </a>
41
+ </li>
42
+ <li class="p-1">
43
+ <a href="<%= root_path('jobs/pending') %>" class="hover:text-blue-600">
44
+ <div class="count mb-1 text-md">
45
+ <%= number_with_delimiter @counters.pending, ' ' %>
46
+ </div>
47
+ <div class="desc text-gray-500">Pending</div>
48
+ </a>
49
+ </li>
50
+ <li class="p-1">
51
+ <a href="<%= root_path('errors') %>" class="hover:text-blue-600">
52
+ <div class="count mb-1 text-md">
53
+ <%= number_with_delimiter @counters.errors, ' ' %>
54
+ </div>
55
+ <div class="desc text-gray-500">Errors</div>
56
+ </a>
57
+ </li>
58
+ <li class="p-1">
59
+ <div class="count mb-1 text-md">
60
+ <%= number_with_delimiter @counters.retries, ' ' %>
61
+ </div>
62
+ <div class="desc text-gray-500">Retries</div>
63
+ </li>
64
+ <li class="p-1">
65
+ <a href="<%= root_path('dlq') %>" class="hover:text-blue-600">
66
+ <div class="count mb-1 text-md">
67
+ <%= number_with_delimiter @counters.dead, ' ' %>
68
+ </div>
69
+ <div class="desc text-gray-500">Dead</div>
70
+ </a>
71
+ </li>
72
+ </ul>
73
+ </div>
74
+ </div>
75
+ </div>
76
+ </div>
@@ -1,3 +1,7 @@
1
- <div class="mt-3">
2
- <%== partial 'shared/feature_pro' %>
1
+ <div class="alert alert-info bg-white mt-0 mb-6">
2
+ <%== icon(:info_circle) %>
3
+ <p>
4
+ This feature is available only to <a target="_blank" href="https://karafka.io/#become-pro">Pro</a>
5
+ users.
6
+ </p>
3
7
  </div>
@@ -1,15 +1,3 @@
1
- <div class="container">
2
- <div class="row">
3
- <div class="col-sm-12">
4
- <div class="alert alert-info" role="alert">
5
- <p>
6
- There needs to be more data to draw meaningful graphs.
7
- </p>
8
-
9
- <p class="mb-0">
10
- If you are sure you are running at least one <code>karafka server</code> instance and you do not see charts in a few minutes, please ensure that it can report to the <code><%= Karafka::Web.config.topics.consumers.reports %></code> topic and that Web-UI is correctly installed.
11
- </p>
12
- </div>
13
- </div>
14
- </div>
15
- </div>
1
+ <% alert_box_info('There needs to be more data to draw meaningful graphs.') do %>
2
+ If you are sure you are running at least one <code>karafka server</code> instance and you do not see charts in a few minutes, please ensure that it can report to the <code><%= Karafka::Web.config.topics.consumers.reports %></code> topic and that Web-UI is correctly installed.
3
+ <% end %>
@@ -1,36 +1,36 @@
1
- <div class="container">
2
- <div class="row">
3
- <div class="col-sm-12 text-end">
4
- <div class="btn-group btn-group-sm" role="group" aria-label="Small button group">
1
+ <div class="col-span-12">
2
+ <div class="container-fluid mx-auto">
3
+ <div class="flex justify-end">
4
+ <div class="btn-group">
5
5
  <%
6
6
  path = root_path('dashboard?range=seconds')
7
- active = params.current_range == :seconds ? 'active' : false
7
+ active = params.current_range == :seconds ? 'btn-active' : ''
8
8
  %>
9
- <a type="button" href="<%= path %>" class="btn btn-outline-primary <%= active %>">
9
+ <a href="<%= path %>" class="btn btn-outline btn-primary btn-sm <%= active %>">
10
10
  5 minutes
11
11
  </a>
12
12
 
13
13
  <%
14
14
  path = root_path('dashboard?range=minutes')
15
- active = params.current_range == :minutes ? 'active' : false
15
+ active = params.current_range == :minutes ? 'btn-active' : ''
16
16
  %>
17
- <a type="button" href="<%= path %>" class="btn btn-outline-primary <%= active %>">
17
+ <a href="<%= path %>" class="btn btn-outline btn-primary btn-sm <%= active %>">
18
18
  1 hour
19
19
  </a>
20
20
 
21
21
  <%
22
22
  path = root_path('dashboard?range=hours')
23
- active = params.current_range == :hours ? 'active' : false
23
+ active = params.current_range == :hours ? 'btn-active' : ''
24
24
  %>
25
- <a type="button" href="<%= path %>" class="btn btn-outline-primary <%= active %>">
25
+ <a href="<%= path %>" class="btn btn-outline btn-primary btn-sm <%= active %>">
26
26
  24 hours
27
27
  </a>
28
28
 
29
29
  <%
30
30
  path = root_path('dashboard?range=days')
31
- active = params.current_range == :days ? 'active' : false
31
+ active = params.current_range == :days ? 'btn-active' : ''
32
32
  %>
33
- <a type="button" href="<%= path %>" class="btn btn-outline-primary <%= active %>">
33
+ <a href="<%= path %>" class="btn btn-outline btn-primary btn-sm <%= active %>">
34
34
  7 days
35
35
  </a>
36
36
  </div>
@@ -1,3 +1,5 @@
1
+ <% view_title 'Dashboard' %>
2
+
1
3
  <%
2
4
  # Generates a nice set of semi-random data that does not change more often than once every
3
5
  # 24 hours not to make OSS users angry
@@ -8,72 +10,98 @@
8
10
  end
9
11
  %>
10
12
 
11
- <%== partial 'consumers/counters' %>
13
+ <%== partial 'dashboard/counters' %>
12
14
 
13
15
  <% if @aggregated.sufficient? %>
14
16
  <%== partial 'dashboard/ranges_selector' %>
15
17
 
16
- <div class="container">
17
- <div class="row">
18
- <div class="col-sm-12">
19
- <h5 class="mb-3">Processing metrics</h5>
18
+ <h2 class="h2">Processing Metrics</h2>
20
19
 
21
- <hr class="mb-4"/>
20
+ <div class="tab-container-wrapper" id="graphs1">
21
+ <div class="tab-container inline-tabs">
22
+ <%== partial 'shared/tab_nav', locals: { title: 'Consumed', id: 'consumed', active: true } %>
23
+ <%== partial 'shared/tab_nav', locals: { title: 'Batches', id: 'batches' } %>
24
+ <%== partial 'shared/tab_nav', locals: { title: 'Lags', id: 'lags', disabled: true } %>
25
+ <%== partial 'shared/tab_nav', locals: { title: 'Max LSO', id: 'max-lso' } %>
26
+ <%== partial 'shared/tab_nav', locals: { title: 'Pace', id: 'pace' } %>
27
+ </div>
28
+ </div>
22
29
 
23
- <ul class="nav nav-tabs" id="graphs1" role="tablist">
24
- <%== partial 'shared/tab_nav', locals: { title: 'Messages', id: 'messages', active: true } %>
25
- <%== partial 'shared/tab_nav', locals: { title: 'Batches', id: 'batches' } %>
26
- <%== partial 'shared/tab_nav', locals: { title: 'Topics Lags', id: 'topics-lags' } %>
27
- <%== partial 'shared/tab_nav', locals: { title: 'Topics pace', id: 'topics-pace' } %>
28
- <%== partial 'shared/tab_nav', locals: { title: 'Max LSO time', id: 'max-lso-time' } %>
29
- </ul>
30
+ <div class="col-span-12">
31
+ <div id="consumed" class="hidden">
32
+ <% data = @aggregated_charts.with(:messages, :errors) %>
33
+ <%== partial 'shared/charts/line', locals: { data: data, id: 'consumed' } %>
34
+ </div>
30
35
 
31
- <div class="tab-content">
32
- <div class="tab-pane show active" id="messages" role="tabpanel">
33
- <% data = @aggregated_charts.with(:messages, :errors) %>
34
- <%== partial 'shared/charts/line', locals: { data: data, id: 'messages' } %>
35
- </div>
36
+ <div id="batches" class="hidden">
37
+ <% data = @aggregated_charts.with(:batches, :errors, :dead, :retries) %>
38
+ <%== partial 'shared/charts/line', locals: { data: data, id: 'batches' } %>
39
+ </div>
36
40
 
37
- <div class="tab-pane" id="batches" role="tabpanel">
38
- <% data = @aggregated_charts.with(:batches, :errors, :dead, :retries) %>
39
- <%== partial 'shared/charts/line', locals: { data: data, id: 'batches' } %>
40
- </div>
41
+ <div id="lags" class="hidden">
42
+ <%== partial 'dashboard/feature_pro' %>
43
+ <% data = { enqueued: set.call, busy: set.call }.to_json %>
44
+ <%== partial 'shared/charts/line', locals: { data: data, id: 'lags', blurred: true } %>
45
+ </div>
41
46
 
42
- <div class="tab-pane" id="topics-lags" role="tabpanel">
43
- <%== partial 'dashboard/feature_pro' %>
44
- <% data = { enqueued: set.call, busy: set.call }.to_json %>
45
- <%== partial 'shared/charts/line', locals: { data: data, id: 'topics-lags', blurred: true } %>
46
- </div>
47
+ <div id="max-lso" class="hidden">
48
+ <%== partial 'shared/charts/line', locals: { data: @topics_charts.max_lso, id: 'max-lso' } %>
49
+ </div>
47
50
 
48
- <div class="tab-pane" id="topics-pace" role="tabpanel">
49
- <%== partial 'dashboard/feature_pro' %>
50
- <% data = { topic1: set.call(20), topic2: set.call(10), topic3: set.call(100) }.to_json %>
51
- <%== partial 'shared/charts/line', locals: { data: data, id: 'topics-pace', blurred: true } %>
52
- </div>
51
+ <div id="pace" class="hidden">
52
+ <%== partial 'shared/charts/line', locals: { data: @topics_charts.pace, id: 'pace' } %>
53
+ </div>
54
+ </div>
53
55
 
54
- <div class="tab-pane" id="max-lso-time" role="tabpanel">
55
- <%== partial 'dashboard/feature_pro' %>
56
- <% data = { max_lso: set.call(2, 0..5) }.to_json %>
57
- <%== partial 'shared/charts/line', locals: { data: data, id: 'max-lso-time', blurred: true } %>
58
- </div>
59
- </div>
60
- </div>
56
+ <h2 class="h2">Utilization Metrics</h2>
57
+
58
+ <div class="tab-container-wrapper" id="graphs2">
59
+ <div class="tab-container inline-tabs">
60
+ <%== partial 'shared/tab_nav', locals: { title: 'Utilization', id: 'utilization', active: true } %>
61
+ <%== partial 'shared/tab_nav', locals: { title: 'RSS', id: 'rss', disabled: true } %>
62
+ <%== partial 'shared/tab_nav', locals: { title: 'Concurrency', id: 'concurrency' } %>
63
+ <%== partial 'shared/tab_nav', locals: { title: 'Data transfers', id: 'data-transfers', disabled: true } %>
61
64
  </div>
62
65
  </div>
63
66
 
64
- <div class="container">
65
- <div class="row">
66
- <div class="col-sm-12">
67
- <h5 class="mb-3">Utilization metrics</h5>
67
+ <div class="col-span-12">
68
+ <div id="utilization" class="hidden">
69
+ <% data = @aggregated_charts.with(:utilization) %>
70
+ <%== partial 'shared/charts/line', locals: { data: data, id: 'utilization', label_type_y: 'percentage' } %>
71
+ </div>
72
+
73
+ <div id="rss" class="hidden">
74
+ <%== partial 'dashboard/feature_pro' %>
75
+ <% data = { rss: set.call(1_050), process_rss: set.call(1_000) }.to_json %>
76
+ <%== partial 'shared/charts/line', locals: { data: data, id: 'rss', blurred: true } %>
77
+ </div>
78
+
79
+ <div id="concurrency" class="hidden">
80
+ <% data = @aggregated_charts.with(:processes, :workers, :active_listeners, :standby_listeners) %>
81
+ <%== partial 'shared/charts/line', locals: { data: data, id: 'concurrency' } %>
82
+ </div>
83
+
84
+ <div id="data-transfers" class="hidden">
85
+ <%== partial 'dashboard/feature_pro' %>
86
+ <% data = { bytes_received: set.call(4, 10..15), bytes_sent: set.call(2, 0..5) }.to_json %>
87
+ <%== partial 'shared/charts/line', locals: { data: data, id: 'data-transfers', blurred: true } %>
88
+ </div>
89
+ </div>
90
+ <% else %>
91
+ <%== partial 'dashboard/not_enough_data' %>
92
+ <% end %>
93
+
68
94
 
69
- <hr class="mb-4"/>
70
95
 
71
- <ul class="nav nav-tabs" id="graphs2" role="tablist">
72
- <%== partial 'shared/tab_nav', locals: { title: 'Utilization', id: 'utilization', active: true } %>
73
- <%== partial 'shared/tab_nav', locals: { title: 'RSS', id: 'rss' } %>
74
- <%== partial 'shared/tab_nav', locals: { title: 'Concurrency', id: 'concurrency' } %>
75
- <%== partial 'shared/tab_nav', locals: { title: 'Data transfers', id: 'data-transfers' } %>
76
- </ul>
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+ <% if false && @aggregated.sufficient? %>
104
+ <%== partial 'dashboard/ranges_selector' %>
77
105
 
78
106
  <div class="tab-content">
79
107
  <div class="tab-pane show active" id="utilization" role="tabpanel">
@@ -101,6 +129,4 @@
101
129
  </div>
102
130
  </div>
103
131
  </div>
104
- <% else %>
105
- <%== partial 'dashboard/not_enough_data' %>
106
132
  <% end %>
@@ -1,11 +1,11 @@
1
- <li class="breadcrumb-item">
1
+ <li>
2
2
  <a href="<%= root_path('errors') %>">
3
3
  Errors
4
4
  </a>
5
5
  </li>
6
6
 
7
7
  <% if @error_message %>
8
- <li class="breadcrumb-item">
8
+ <li>
9
9
  <a href="<%= root_path('errors', @offset) %>">
10
10
  <%=
11
11
  type = @error_message.payload[:type]
@@ -40,9 +40,7 @@
40
40
  <% when :error_class %>
41
41
  <code><%= v %></code>
42
42
  <% when :type %>
43
- <span class="badge bg-secondary">
44
- <%= v %>
45
- </span>
43
+ <%== badge_secondary v %>
46
44
  <% else %>
47
45
  <%= v %>
48
46
  <% end %>
@@ -5,7 +5,7 @@
5
5
 
6
6
  <tr>
7
7
  <td>
8
- <span class="badge bg-secondary badge-topic">
8
+ <span class="badge badge-secondary">
9
9
  <% if error[:details].key?(:topic) %>
10
10
  <%= error[:details][:topic] %>: <%= error[:details][:partition] %>
11
11
  <% else %>
@@ -23,10 +23,8 @@
23
23
  <td>
24
24
  <%== relative_time error[:occurred_at] %>
25
25
  </td>
26
- <td class="text-center">
27
- <a href="<%= root_path('errors', error_msg.offset) %>" class="btn btn-sm btn-secondary text-white">
28
- Details
29
- </a>
26
+ <td>
27
+ <%== link_button_primary_sm 'Details', root_path('errors', error_msg.offset) %>
30
28
  </td>
31
29
  </tr>
32
30
  <% end %>