karafka-web 0.8.1 → 0.9.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (274) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/.github/workflows/ci.yml +5 -16
  4. data/CHANGELOG.md +47 -0
  5. data/Gemfile.lock +33 -35
  6. data/LICENSE +3 -3
  7. data/bin/rspecs +1 -1
  8. data/config/locales/pro_errors.yml +11 -0
  9. data/config/locales/slogans.yml +62 -0
  10. data/docker-compose.yml +1 -1
  11. data/karafka-web.gemspec +4 -2
  12. data/lib/karafka/web/app.rb +1 -1
  13. data/lib/karafka/web/config.rb +19 -0
  14. data/lib/karafka/web/contracts/config.rb +6 -0
  15. data/lib/karafka/web/installer.rb +4 -1
  16. data/lib/karafka/web/management/actions/create_topics.rb +21 -0
  17. data/lib/karafka/web/management/actions/delete_topics.rb +1 -0
  18. data/lib/karafka/web/management/actions/enable.rb +11 -5
  19. data/lib/karafka/web/management/migrations/0_base.rb +1 -1
  20. data/lib/karafka/web/pro/commanding/commands/base.rb +33 -0
  21. data/lib/karafka/web/pro/commanding/commands/probe.rb +41 -0
  22. data/lib/karafka/web/pro/commanding/commands/quiet.rb +31 -0
  23. data/lib/karafka/web/pro/commanding/commands/stop.rb +31 -0
  24. data/lib/karafka/web/pro/commanding/config.rb +57 -0
  25. data/lib/karafka/web/pro/commanding/contracts/config.rb +60 -0
  26. data/lib/karafka/web/pro/commanding/dispatcher.rb +93 -0
  27. data/lib/karafka/web/pro/commanding/listener.rb +97 -0
  28. data/lib/karafka/web/pro/commanding/manager.rb +98 -0
  29. data/lib/karafka/web/pro/commanding/matcher.rb +50 -0
  30. data/lib/karafka/web/pro/commanding.rb +40 -0
  31. data/lib/karafka/web/pro/loader.rb +40 -0
  32. data/lib/karafka/web/{ui/pro → pro/ui}/app.rb +103 -22
  33. data/lib/karafka/web/{ui/pro/controllers/cluster.rb → pro/ui/controllers/base_controller.rb} +4 -5
  34. data/lib/karafka/web/pro/ui/controllers/cluster_controller.rb +54 -0
  35. data/lib/karafka/web/pro/ui/controllers/commanding_controller.rb +118 -0
  36. data/lib/karafka/web/pro/ui/controllers/commands_controller.rb +96 -0
  37. data/lib/karafka/web/{ui/pro/controllers/consumers.rb → pro/ui/controllers/consumers_controller.rb} +31 -4
  38. data/lib/karafka/web/{ui/pro/controllers/dashboard.rb → pro/ui/controllers/dashboard_controller.rb} +5 -3
  39. data/lib/karafka/web/pro/ui/controllers/dlq_controller.rb +60 -0
  40. data/lib/karafka/web/{ui/pro/controllers/errors.rb → pro/ui/controllers/errors_controller.rb} +5 -7
  41. data/lib/karafka/web/{ui/pro/controllers/explorer.rb → pro/ui/controllers/explorer_controller.rb} +24 -19
  42. data/lib/karafka/web/{ui/pro/controllers/health.rb → pro/ui/controllers/health_controller.rb} +16 -3
  43. data/lib/karafka/web/{ui/pro/controllers/jobs.rb → pro/ui/controllers/jobs_controller.rb} +4 -4
  44. data/lib/karafka/web/{ui/pro/controllers/messages.rb → pro/ui/controllers/messages_controller.rb} +8 -6
  45. data/lib/karafka/web/{ui/pro/controllers/routing.rb → pro/ui/controllers/routing_controller.rb} +6 -22
  46. data/lib/karafka/web/{ui/pro/controllers/status.rb → pro/ui/controllers/status_controller.rb} +3 -3
  47. data/lib/karafka/web/pro/ui/controllers/topics_controller.rb +99 -0
  48. data/lib/karafka/web/pro/ui/lib/patterns_detector.rb +50 -0
  49. data/lib/karafka/web/pro/ui/views/cluster/_breadcrumbs.erb +29 -0
  50. data/lib/karafka/web/pro/ui/views/cluster/_broker.erb +13 -0
  51. data/lib/karafka/web/pro/ui/views/cluster/_config.erb +13 -0
  52. data/lib/karafka/web/pro/ui/views/cluster/_tabs.erb +27 -0
  53. data/lib/karafka/web/pro/ui/views/cluster/brokers.erb +27 -0
  54. data/lib/karafka/web/pro/ui/views/cluster/index.erb +27 -0
  55. data/lib/karafka/web/pro/ui/views/cluster/show.erb +27 -0
  56. data/lib/karafka/web/pro/ui/views/commands/_backtrace.erb +20 -0
  57. data/lib/karafka/web/pro/ui/views/commands/_breadcrumbs.erb +21 -0
  58. data/lib/karafka/web/pro/ui/views/commands/_command.erb +60 -0
  59. data/lib/karafka/web/pro/ui/views/commands/_command_details.erb +11 -0
  60. data/lib/karafka/web/pro/ui/views/commands/_details.erb +26 -0
  61. data/lib/karafka/web/pro/ui/views/commands/_empty.erb +3 -0
  62. data/lib/karafka/web/pro/ui/views/commands/_incompatible_schema.erb +14 -0
  63. data/lib/karafka/web/pro/ui/views/commands/_metadata.erb +50 -0
  64. data/lib/karafka/web/pro/ui/views/commands/_table.erb +23 -0
  65. data/lib/karafka/web/pro/ui/views/commands/index.erb +17 -0
  66. data/lib/karafka/web/pro/ui/views/commands/show.erb +38 -0
  67. data/lib/karafka/web/{ui/pro → pro/ui}/views/consumers/_breadcrumbs.erb +20 -4
  68. data/lib/karafka/web/{ui/pro → pro/ui}/views/consumers/_consumer.erb +2 -21
  69. data/lib/karafka/web/pro/ui/views/consumers/_consumer_controls.erb +78 -0
  70. data/lib/karafka/web/pro/ui/views/consumers/_consumer_performance.erb +59 -0
  71. data/lib/karafka/web/{ui/pro → pro/ui}/views/consumers/_counters.erb +7 -5
  72. data/lib/karafka/web/pro/ui/views/consumers/_tabs.erb +35 -0
  73. data/lib/karafka/web/pro/ui/views/consumers/consumer/_commands.erb +32 -0
  74. data/lib/karafka/web/pro/ui/views/consumers/consumer/_no_jobs.erb +7 -0
  75. data/lib/karafka/web/pro/ui/views/consumers/consumer/_no_subscriptions.erb +7 -0
  76. data/lib/karafka/web/{ui/pro → pro/ui}/views/consumers/consumer/_subscription_group.erb +20 -9
  77. data/lib/karafka/web/pro/ui/views/consumers/consumer/_title.erb +5 -0
  78. data/lib/karafka/web/pro/ui/views/consumers/controls.erb +67 -0
  79. data/lib/karafka/web/{ui/pro → pro/ui}/views/consumers/details.erb +6 -1
  80. data/lib/karafka/web/pro/ui/views/consumers/index.erb +39 -0
  81. data/lib/karafka/web/{ui/pro → pro/ui}/views/consumers/pending_jobs.erb +15 -7
  82. data/lib/karafka/web/pro/ui/views/consumers/performance.erb +52 -0
  83. data/lib/karafka/web/{ui/pro → pro/ui}/views/consumers/running_jobs.erb +15 -7
  84. data/lib/karafka/web/pro/ui/views/consumers/subscriptions.erb +28 -0
  85. data/lib/karafka/web/{ui/pro → pro/ui}/views/dashboard/index.erb +10 -10
  86. data/lib/karafka/web/pro/ui/views/dlq/_no_topics.erb +7 -0
  87. data/lib/karafka/web/{ui/pro → pro/ui}/views/dlq/index.erb +1 -1
  88. data/lib/karafka/web/{ui/pro → pro/ui}/views/errors/_error.erb +2 -6
  89. data/lib/karafka/web/pro/ui/views/errors/_table.erb +23 -0
  90. data/lib/karafka/web/pro/ui/views/explorer/_failed_deserialization.erb +4 -0
  91. data/lib/karafka/web/{ui/pro → pro/ui}/views/explorer/_message.erb +7 -1
  92. data/lib/karafka/web/pro/ui/views/explorer/_no_topics.erb +5 -0
  93. data/lib/karafka/web/{ui/pro → pro/ui}/views/explorer/index.erb +1 -6
  94. data/lib/karafka/web/{ui/pro → pro/ui}/views/explorer/message/_metadata.erb +33 -9
  95. data/lib/karafka/web/{ui/pro → pro/ui}/views/explorer/message/_payload.erb +4 -4
  96. data/lib/karafka/web/{ui/pro → pro/ui}/views/explorer/message/_payload_actions.erb +1 -1
  97. data/lib/karafka/web/pro/ui/views/explorer/messages/_headers.erb +33 -0
  98. data/lib/karafka/web/pro/ui/views/explorer/messages/_key.erb +20 -0
  99. data/lib/karafka/web/pro/ui/views/explorer/partition/_cleaned.erb +5 -0
  100. data/lib/karafka/web/pro/ui/views/explorer/partition/_empty.erb +5 -0
  101. data/lib/karafka/web/pro/ui/views/explorer/partition/_messages.erb +21 -0
  102. data/lib/karafka/web/pro/ui/views/explorer/topic/_empty.erb +5 -0
  103. data/lib/karafka/web/pro/ui/views/explorer/topic/_limited.erb +10 -0
  104. data/lib/karafka/web/{ui/pro → pro/ui}/views/health/_breadcrumbs.erb +8 -0
  105. data/lib/karafka/web/pro/ui/views/health/_no_data.erb +7 -0
  106. data/lib/karafka/web/{ui/pro → pro/ui}/views/health/_partition.erb +1 -1
  107. data/lib/karafka/web/{ui/pro → pro/ui}/views/health/_partition_lags.erb +6 -3
  108. data/lib/karafka/web/{ui/pro → pro/ui}/views/health/_tabs.erb +11 -1
  109. data/lib/karafka/web/{ui/pro → pro/ui}/views/health/changes.erb +15 -10
  110. data/lib/karafka/web/pro/ui/views/health/cluster_lags.erb +54 -0
  111. data/lib/karafka/web/{ui/pro → pro/ui}/views/health/lags.erb +16 -10
  112. data/lib/karafka/web/{ui/pro → pro/ui}/views/health/offsets.erb +17 -14
  113. data/lib/karafka/web/{ui/pro → pro/ui}/views/health/overview.erb +23 -9
  114. data/lib/karafka/web/{ui/pro → pro/ui}/views/jobs/_job.erb +1 -1
  115. data/lib/karafka/web/pro/ui/views/jobs/_no_jobs.erb +7 -0
  116. data/lib/karafka/web/{ui/pro → pro/ui}/views/jobs/pending.erb +12 -8
  117. data/lib/karafka/web/{ui/pro → pro/ui}/views/jobs/running.erb +12 -8
  118. data/lib/karafka/web/{ui/pro → pro/ui}/views/routing/_consumer_group.erb +2 -2
  119. data/lib/karafka/web/{ui/pro → pro/ui}/views/routing/index.erb +1 -1
  120. data/lib/karafka/web/{ui/pro → pro/ui}/views/routing/show.erb +1 -1
  121. data/lib/karafka/web/{ui/pro → pro/ui}/views/shared/_navigation.erb +14 -0
  122. data/lib/karafka/web/pro/ui/views/topics/_breadcrumbs.erb +37 -0
  123. data/lib/karafka/web/pro/ui/views/topics/_partition.erb +16 -0
  124. data/lib/karafka/web/pro/ui/views/topics/_tabs.erb +37 -0
  125. data/lib/karafka/web/pro/ui/views/topics/_topic.erb +12 -0
  126. data/lib/karafka/web/pro/ui/views/topics/config.erb +29 -0
  127. data/lib/karafka/web/pro/ui/views/topics/distribution/_badges.erb +7 -0
  128. data/lib/karafka/web/pro/ui/views/topics/distribution/_chart.erb +2 -0
  129. data/lib/karafka/web/pro/ui/views/topics/distribution/_empty_partitions.erb +1 -0
  130. data/lib/karafka/web/pro/ui/views/topics/distribution/_limited.erb +10 -0
  131. data/lib/karafka/web/pro/ui/views/topics/distribution/_partition.erb +10 -0
  132. data/lib/karafka/web/pro/ui/views/topics/distribution.erb +47 -0
  133. data/lib/karafka/web/pro/ui/views/topics/index.erb +16 -0
  134. data/lib/karafka/web/pro/ui/views/topics/replication.erb +28 -0
  135. data/lib/karafka/web/processing/consumers/aggregators/base.rb +1 -1
  136. data/lib/karafka/web/processing/consumers/aggregators/metrics.rb +1 -1
  137. data/lib/karafka/web/processing/consumers/aggregators/state.rb +4 -4
  138. data/lib/karafka/web/tracking/consumers/contracts/report.rb +1 -1
  139. data/lib/karafka/web/tracking/consumers/contracts/subscription_group.rb +1 -1
  140. data/lib/karafka/web/tracking/consumers/listeners/booting.rb +36 -0
  141. data/lib/karafka/web/tracking/consumers/listeners/errors.rb +2 -2
  142. data/lib/karafka/web/tracking/consumers/reporter.rb +3 -3
  143. data/lib/karafka/web/tracking/consumers/sampler.rb +10 -4
  144. data/lib/karafka/web/tracking/contracts/error.rb +1 -1
  145. data/lib/karafka/web/tracking/producers/listeners/booting.rb +26 -0
  146. data/lib/karafka/web/tracking/producers/listeners/errors.rb +2 -2
  147. data/lib/karafka/web/tracking/producers/reporter.rb +1 -1
  148. data/lib/karafka/web/tracking/producers/sampler.rb +1 -1
  149. data/lib/karafka/web/tracking/sampler.rb +3 -3
  150. data/lib/karafka/web/tracking/scheduler.rb +0 -5
  151. data/lib/karafka/web/ui/app.rb +13 -9
  152. data/lib/karafka/web/ui/base.rb +1 -0
  153. data/lib/karafka/web/ui/controllers/{base.rb → base_controller.rb} +15 -2
  154. data/lib/karafka/web/ui/controllers/{become_pro.rb → become_pro_controller.rb} +1 -1
  155. data/lib/karafka/web/ui/controllers/{cluster.rb → cluster_controller.rb} +4 -4
  156. data/lib/karafka/web/ui/controllers/{consumers.rb → consumers_controller.rb} +3 -3
  157. data/lib/karafka/web/ui/controllers/{dashboard.rb → dashboard_controller.rb} +1 -1
  158. data/lib/karafka/web/ui/controllers/{errors.rb → errors_controller.rb} +2 -2
  159. data/lib/karafka/web/ui/controllers/{jobs.rb → jobs_controller.rb} +5 -5
  160. data/lib/karafka/web/ui/controllers/{routing.rb → routing_controller.rb} +2 -2
  161. data/lib/karafka/web/ui/controllers/{status.rb → status_controller.rb} +1 -1
  162. data/lib/karafka/web/ui/helpers/alerts_helper.rb +23 -0
  163. data/lib/karafka/web/ui/helpers/application_helper.rb +55 -1
  164. data/lib/karafka/web/ui/lib/paginations/offset_based.rb +3 -4
  165. data/lib/karafka/web/ui/lib/safe_runner.rb +59 -0
  166. data/lib/karafka/web/ui/models/broker.rb +66 -0
  167. data/lib/karafka/web/ui/models/health.rb +28 -2
  168. data/lib/karafka/web/ui/models/message.rb +9 -3
  169. data/lib/karafka/web/ui/models/process.rb +19 -5
  170. data/lib/karafka/web/ui/models/processes.rb +2 -2
  171. data/lib/karafka/web/ui/models/topic.rb +78 -0
  172. data/lib/karafka/web/ui/public/javascripts/application.js +18 -1
  173. data/lib/karafka/web/ui/public/javascripts/charts/data_formatting_utility.js +71 -0
  174. data/lib/karafka/web/ui/public/javascripts/charts/dataset_state_manager.js +49 -0
  175. data/lib/karafka/web/ui/public/javascripts/charts/types/bar.js +123 -0
  176. data/lib/karafka/web/ui/public/javascripts/charts/types/line.js +143 -0
  177. data/lib/karafka/web/ui/public/javascripts/charts.js +10 -325
  178. data/lib/karafka/web/ui/public/javascripts/live_poll.js +5 -5
  179. data/lib/karafka/web/ui/public/javascripts/tabs_manager.js +57 -0
  180. data/lib/karafka/web/ui/public/stylesheets/application.css +7 -6
  181. data/lib/karafka/web/ui/views/cluster/_breadcrumbs.erb +3 -3
  182. data/lib/karafka/web/ui/views/cluster/_no_partitions.erb +1 -3
  183. data/lib/karafka/web/ui/views/cluster/_tabs.erb +3 -3
  184. data/lib/karafka/web/ui/views/cluster/brokers.erb +19 -19
  185. data/lib/karafka/web/ui/views/cluster/replication.erb +37 -0
  186. data/lib/karafka/web/ui/views/consumers/_assignments_badges.erb +24 -0
  187. data/lib/karafka/web/ui/views/consumers/_consumer.erb +2 -15
  188. data/lib/karafka/web/ui/views/consumers/_counters.erb +1 -1
  189. data/lib/karafka/web/ui/views/consumers/_summary.erb +5 -5
  190. data/lib/karafka/web/ui/views/consumers/index.erb +22 -20
  191. data/lib/karafka/web/ui/views/dashboard/index.erb +9 -9
  192. data/lib/karafka/web/ui/views/errors/_cleaned.erb +1 -3
  193. data/lib/karafka/web/ui/views/errors/_error.erb +2 -6
  194. data/lib/karafka/web/ui/views/errors/_no_errors.erb +1 -3
  195. data/lib/karafka/web/ui/views/errors/index.erb +22 -20
  196. data/lib/karafka/web/ui/views/jobs/_job.erb +4 -1
  197. data/lib/karafka/web/ui/views/jobs/_no_jobs.erb +1 -3
  198. data/lib/karafka/web/ui/views/jobs/pending.erb +4 -3
  199. data/lib/karafka/web/ui/views/jobs/running.erb +4 -3
  200. data/lib/karafka/web/ui/views/routing/_consumer_group.erb +2 -2
  201. data/lib/karafka/web/ui/views/routing/index.erb +1 -1
  202. data/lib/karafka/web/ui/views/routing/show.erb +1 -1
  203. data/lib/karafka/web/ui/views/shared/_become_pro.erb +3 -3
  204. data/lib/karafka/web/ui/views/shared/_header.erb +16 -10
  205. data/lib/karafka/web/ui/views/shared/_navigation.erb +17 -3
  206. data/lib/karafka/web/ui/views/shared/_not_a_message.erb +5 -0
  207. data/lib/karafka/web/ui/views/shared/alerts/_info.erb +3 -0
  208. data/lib/karafka/web/ui/views/shared/charts/_bar.erb +7 -0
  209. data/lib/karafka/web/ui/views/shared/{_chart.erb → charts/_line.erb} +1 -1
  210. data/lib/karafka/web/ui/views/shared/exceptions/not_found.erb +1 -1
  211. data/lib/karafka/web/ui/views/status/show.erb +1 -1
  212. data/lib/karafka/web/version.rb +1 -1
  213. data/lib/karafka/web.rb +19 -2
  214. data.tar.gz.sig +0 -0
  215. metadata +191 -120
  216. metadata.gz.sig +0 -0
  217. data/lib/karafka/web/ui/pro/controllers/dlq.rb +0 -43
  218. data/lib/karafka/web/ui/pro/views/consumers/consumer/_no_jobs.erb +0 -9
  219. data/lib/karafka/web/ui/pro/views/consumers/consumer/_no_subscriptions.erb +0 -9
  220. data/lib/karafka/web/ui/pro/views/consumers/index.erb +0 -36
  221. data/lib/karafka/web/ui/pro/views/consumers/subscriptions.erb +0 -23
  222. data/lib/karafka/web/ui/pro/views/dlq/_no_topics.erb +0 -9
  223. data/lib/karafka/web/ui/pro/views/errors/_table.erb +0 -21
  224. data/lib/karafka/web/ui/pro/views/explorer/_failed_deserialization.erb +0 -4
  225. data/lib/karafka/web/ui/pro/views/explorer/_no_topics.erb +0 -7
  226. data/lib/karafka/web/ui/pro/views/explorer/messages/_headers.erb +0 -15
  227. data/lib/karafka/web/ui/pro/views/explorer/messages/_key.erb +0 -12
  228. data/lib/karafka/web/ui/pro/views/explorer/partition/_cleaned.erb +0 -3
  229. data/lib/karafka/web/ui/pro/views/explorer/partition/_empty.erb +0 -3
  230. data/lib/karafka/web/ui/pro/views/explorer/partition/_messages.erb +0 -19
  231. data/lib/karafka/web/ui/pro/views/explorer/topic/_empty.erb +0 -3
  232. data/lib/karafka/web/ui/pro/views/explorer/topic/_limited.erb +0 -4
  233. data/lib/karafka/web/ui/pro/views/health/_no_data.erb +0 -9
  234. data/lib/karafka/web/ui/pro/views/jobs/_no_jobs.erb +0 -9
  235. data/lib/karafka/web/ui/public/javascripts/tabs.js +0 -59
  236. data/lib/karafka/web/ui/views/cluster/topics.erb +0 -35
  237. /data/lib/karafka/web/{ui/pro → pro/ui}/views/consumers/consumer/_consumer_group.erb +0 -0
  238. /data/lib/karafka/web/{ui/pro → pro/ui}/views/consumers/consumer/_job.erb +0 -0
  239. /data/lib/karafka/web/{ui/pro → pro/ui}/views/consumers/consumer/_metrics.erb +0 -0
  240. /data/lib/karafka/web/{ui/pro → pro/ui}/views/consumers/consumer/_partition.erb +0 -0
  241. /data/lib/karafka/web/{ui/pro → pro/ui}/views/consumers/consumer/_stopped.erb +0 -0
  242. /data/lib/karafka/web/{ui/pro → pro/ui}/views/consumers/consumer/_tabs.erb +0 -0
  243. /data/lib/karafka/web/{ui/pro → pro/ui}/views/dlq/_breadcrumbs.erb +0 -0
  244. /data/lib/karafka/web/{ui/pro → pro/ui}/views/dlq/_topic.erb +0 -0
  245. /data/lib/karafka/web/{ui/pro → pro/ui}/views/errors/_breadcrumbs.erb +0 -0
  246. /data/lib/karafka/web/{ui/pro → pro/ui}/views/errors/_partition_option.erb +0 -0
  247. /data/lib/karafka/web/{ui/pro → pro/ui}/views/errors/_title_with_select.erb +0 -0
  248. /data/lib/karafka/web/{ui/pro → pro/ui}/views/errors/index.erb +0 -0
  249. /data/lib/karafka/web/{ui/pro → pro/ui}/views/errors/partition.erb +0 -0
  250. /data/lib/karafka/web/{ui/pro → pro/ui}/views/errors/show.erb +0 -0
  251. /data/lib/karafka/web/{ui/pro → pro/ui}/views/explorer/_breadcrumbs.erb +0 -0
  252. /data/lib/karafka/web/{ui/pro → pro/ui}/views/explorer/_filtered.erb +0 -0
  253. /data/lib/karafka/web/{ui/pro → pro/ui}/views/explorer/_partition_option.erb +0 -0
  254. /data/lib/karafka/web/{ui/pro → pro/ui}/views/explorer/_topic.erb +0 -0
  255. /data/lib/karafka/web/{ui/pro → pro/ui}/views/explorer/message/_message_actions.erb +0 -0
  256. /data/lib/karafka/web/{ui/pro → pro/ui}/views/explorer/messages/_detail.erb +0 -0
  257. /data/lib/karafka/web/{ui/pro → pro/ui}/views/explorer/partition/_details.erb +0 -0
  258. /data/lib/karafka/web/{ui/pro → pro/ui}/views/explorer/partition.erb +0 -0
  259. /data/lib/karafka/web/{ui/pro → pro/ui}/views/explorer/show.erb +0 -0
  260. /data/lib/karafka/web/{ui/pro → pro/ui}/views/explorer/topic/_details.erb +0 -0
  261. /data/lib/karafka/web/{ui/pro → pro/ui}/views/explorer/topic.erb +0 -0
  262. /data/lib/karafka/web/{ui/pro → pro/ui}/views/health/_consumer_group_header.erb +0 -0
  263. /data/lib/karafka/web/{ui/pro → pro/ui}/views/health/_partition_offset.erb +0 -0
  264. /data/lib/karafka/web/{ui/pro → pro/ui}/views/health/_partition_times.erb +0 -0
  265. /data/lib/karafka/web/{ui/pro → pro/ui}/views/routing/_detail.erb +0 -0
  266. /data/lib/karafka/web/{ui/pro → pro/ui}/views/routing/_topic.erb +0 -0
  267. /data/lib/karafka/web/ui/public/javascripts/{bootstrap.min.js → libs/bootstrap.min.js} +0 -0
  268. /data/lib/karafka/web/ui/public/javascripts/{chart.min.js → libs/chart.min.js} +0 -0
  269. /data/lib/karafka/web/ui/public/javascripts/{datepicker.js → libs/datepicker.js} +0 -0
  270. /data/lib/karafka/web/ui/public/javascripts/{highlight.min.js → libs/highlight.min.js} +0 -0
  271. /data/lib/karafka/web/ui/public/javascripts/{timeago.min.js → libs/timeago.min.js} +0 -0
  272. /data/lib/karafka/web/ui/public/stylesheets/{bootstrap.min.css → libs/bootstrap.min.css} +0 -0
  273. /data/lib/karafka/web/ui/public/stylesheets/{datepicker.min.css → libs/datepicker.min.css} +0 -0
  274. /data/lib/karafka/web/ui/public/stylesheets/{highlight.min.css → libs/highlight.min.css} +0 -0
@@ -4,21 +4,27 @@
4
4
  <meta name="description" content="Karafka application dashboard">
5
5
  <meta name="author" content="Maciej Mensfeld">
6
6
 
7
- <title>Karafka</title>
7
+ <title>Karafka Web UI</title>
8
+
9
+ <link href="<%= asset_path('stylesheets/libs/bootstrap.min.css') %>" rel="stylesheet">
10
+ <link href="<%= asset_path('stylesheets/libs/highlight.min.css') %>" rel="stylesheet">
11
+ <link href="<%= asset_path('stylesheets/libs/datepicker.min.css') %>" rel="stylesheet">
8
12
 
9
- <link href="<%= asset_path('stylesheets/bootstrap.min.css') %>" rel="stylesheet">
10
- <link href="<%= asset_path('stylesheets/highlight.min.css') %>" rel="stylesheet">
11
- <link href="<%= asset_path('stylesheets/datepicker.min.css') %>" rel="stylesheet">
12
13
  <link href="<%= asset_path('stylesheets/application.css') %>" rel="stylesheet">
13
14
 
14
- <script type="text/javascript" src="<%= asset_path('javascripts/chart.min.js') %>"></script>
15
- <script type="text/javascript" src="<%= asset_path('javascripts/timeago.min.js') %>"></script>
16
- <script type="text/javascript" src="<%= asset_path('javascripts/bootstrap.min.js') %>"></script>
17
- <script type="text/javascript" src="<%= asset_path('javascripts/highlight.min.js') %>"></script>
15
+ <script type="text/javascript" src="<%= asset_path('javascripts/libs/chart.min.js') %>"></script>
16
+ <script type="text/javascript" src="<%= asset_path('javascripts/libs/timeago.min.js') %>"></script>
17
+ <script type="text/javascript" src="<%= asset_path('javascripts/libs/bootstrap.min.js') %>"></script>
18
+ <script type="text/javascript" src="<%= asset_path('javascripts/libs/highlight.min.js') %>"></script>
19
+ <script type="text/javascript" src="<%= asset_path('javascripts/libs/datepicker.js') %>"></script>
20
+
18
21
  <script type="text/javascript" src="<%= asset_path('javascripts/live_poll.js') %>"></script>
19
- <script type="text/javascript" src="<%= asset_path('javascripts/tabs.js') %>"></script>
22
+ <script type="text/javascript" src="<%= asset_path('javascripts/tabs_manager.js') %>"></script>
23
+ <script type="text/javascript" src="<%= asset_path('javascripts/charts/dataset_state_manager.js') %>"></script>
24
+ <script type="text/javascript" src="<%= asset_path('javascripts/charts/data_formatting_utility.js') %>"></script>
25
+ <script type="text/javascript" src="<%= asset_path('javascripts/charts/types/line.js') %>"></script>
26
+ <script type="text/javascript" src="<%= asset_path('javascripts/charts/types/bar.js') %>"></script>
20
27
  <script type="text/javascript" src="<%= asset_path('javascripts/charts.js') %>"></script>
21
- <script type="text/javascript" src="<%= asset_path('javascripts/datepicker.js') %>"></script>
22
28
  <script type="text/javascript" src="<%= asset_path('javascripts/offset_datetime.js') %>"></script>
23
29
  <script type="text/javascript" src="<%= asset_path('javascripts/application.js') %>"></script>
24
30
 
@@ -9,11 +9,13 @@
9
9
  Dashboard
10
10
  </a>
11
11
  </li>
12
+
12
13
  <li class="nav-item ms-3">
13
14
  <a class="nav-link <%= nav_class(start_with: '/consumers') %>" href="<%= root_path('consumers') %>">
14
15
  Consumers
15
16
  </a>
16
17
  </li>
18
+
17
19
  <li class="nav-item ms-3">
18
20
  <a class="nav-link <%= nav_class(start_with: '/jobs') %>" href="<%= root_path('jobs/running') %>">
19
21
  Jobs
@@ -21,35 +23,47 @@
21
23
  </li>
22
24
 
23
25
  <li class="nav-item ms-3">
24
- <a class="nav-link text-muted <%= nav_class(start_with: '/health') %>" href="<%= root_path('health') %>" title="Pro feature">
26
+ <a class="nav-link text-muted" href="<%= root_path('health') %>" title="Pro feature">
25
27
  Health
26
28
  </a>
27
29
  </li>
30
+
28
31
  <li class="nav-item ms-3">
29
32
  <a class="nav-link <%= nav_class(start_with: '/routing') %>" href="<%= root_path('routing') %>">
30
33
  Routing
31
34
  </a>
32
35
  </li>
36
+
33
37
  <li class="nav-item ms-3">
34
- <a class="nav-link text-muted <%= nav_class(start_with: '/explorer') %>" href="<%= root_path('explorer') %>" title="Pro feature">
38
+ <a class="nav-link text-muted" href="<%= root_path('explorer') %>" title="Pro feature">
35
39
  Explorer
36
40
  </a>
37
41
  </li>
42
+
38
43
  <li class="nav-item ms-3">
39
44
  <a class="nav-link <%= nav_class(start_with: '/errors') %>" href="<%= root_path('errors') %>">
40
45
  Errors
41
46
  </a>
42
47
  </li>
48
+
43
49
  <li class="nav-item ms-3">
44
- <a class="nav-link text-muted <%= nav_class(start_with: '/dlq') %>" href="<%= root_path('dlq') %>" title="Pro feature">
50
+ <a class="nav-link text-muted" href="<%= root_path('dlq') %>" title="Pro feature">
45
51
  Dead
46
52
  </a>
47
53
  </li>
54
+
48
55
  <li class="nav-item ms-3">
49
56
  <a class="nav-link <%= nav_class(start_with: '/cluster') %>" href="<%= root_path('cluster') %>">
50
57
  Cluster
51
58
  </a>
52
59
  </li>
60
+
61
+ <li class="nav-item ms-3">
62
+ <a class="nav-link text-muted" href="<%= root_path('topics') %>" title="Pro feature">
63
+ Topics
64
+ </a>
65
+ </li>
66
+
53
67
  <li class="nav-item ms-3">
54
68
  <a class="nav-link <%= nav_class(start_with: '/status') %>" href="<%= root_path('status') %>">
55
69
  Status
@@ -0,0 +1,5 @@
1
+ <tr>
2
+ <td colspan="100" class="text-center text-muted">
3
+ This offset does not contain meaningful data. The message may have been compacted or is a system entry.
4
+ </td>
5
+ </tr>
@@ -0,0 +1,3 @@
1
+ <div class="alert alert-info" role="alert">
2
+ <%= message %>
3
+ </div>
@@ -0,0 +1,7 @@
1
+ <div class="chartjs-wrapper">
2
+ <canvas
3
+ id="<%= id %>-chart"
4
+ class="chartjs chartjs-bar"
5
+ data-datasets="<%= data %>"
6
+ ></canvas>
7
+ </div>
@@ -6,7 +6,7 @@
6
6
  <div class="mt-4 chartjs-wrapper">
7
7
  <canvas
8
8
  id="<%= id %>-chart"
9
- class="chartjs <%= 'blurred' if blurred %>"
9
+ class="chartjs chartjs-line <%= 'blurred' if blurred %>"
10
10
  data-datasets="<%= data %>"
11
11
  data-label_type_y="<%= label_type_y %>"
12
12
  data-label_type_x="<%= label_type_x %>"
@@ -23,7 +23,7 @@
23
23
  <ul class="mb-5 text-start">
24
24
  <li>You have visited the <a href="<%= root_path('status') %>">Status</a> page to troubleshoot any potential issues</li>
25
25
  <li>All the topics required by Karafka Web exist</li>
26
- <li>You have used <code>bundle exec karafka-web install</code> to initialize the Web UI</li>
26
+ <li>You have used <code>bundle exec karafka-web migrate</code> to initialize the Web UI</li>
27
27
  <li>You have a working connection with your Kafka cluster</li>
28
28
  <li>The resource you requested exists</li>
29
29
  </ul>
@@ -1,4 +1,4 @@
1
- <%== view_title('Web UI status details') %>
1
+ <%== view_title('Web UI Status Details', hr: true) %>
2
2
 
3
3
  <div class="container">
4
4
  <div class="row">
@@ -3,6 +3,6 @@
3
3
  module Karafka
4
4
  module Web
5
5
  # Current gem version
6
- VERSION = '0.8.1'
6
+ VERSION = '0.9.0.rc1'
7
7
  end
8
8
  end
data/lib/karafka/web.rb CHANGED
@@ -15,8 +15,9 @@ module Karafka
15
15
  class << self
16
16
  # @return [WaterDrop::Producer, nil] waterdrop messages producer or nil if not yet fully
17
17
  # initialized. It may not be fully initialized until the configuration is done
18
+ # @note Do NOT memoize producer as it may be updated after forking
18
19
  def producer
19
- @producer ||= Web.config.producer
20
+ Web.config.producer
20
21
  end
21
22
 
22
23
  # @return [String] root path of this gem
@@ -27,7 +28,13 @@ module Karafka
27
28
  # Sets up the whole configuration
28
29
  # @param [Block] block configuration block
29
30
  def setup(&block)
31
+ Pro::Loader.pre_setup_all(config) if Karafka.pro?
32
+
30
33
  Config.configure(&block)
34
+
35
+ Pro::Loader.post_setup_all(config) if Karafka.pro?
36
+
37
+ @configured = true
31
38
  end
32
39
 
33
40
  # @return [Karafka::Web::Config] config instance
@@ -38,6 +45,9 @@ module Karafka
38
45
  # Activates all the needed routing and sets up listener, etc
39
46
  # This needs to run **after** the optional configuration of the web component
40
47
  def enable!
48
+ # Run the setup to initialize components if user did not run it prior himself
49
+ setup unless @configured
50
+
41
51
  # Make sure config is as expected
42
52
  # It should be configured before enabling the Web UI
43
53
  Contracts::Config.new.validate!(config.to_h)
@@ -49,6 +59,13 @@ module Karafka
49
59
  # custom values provided by our user
50
60
  App.engine.plugin(:sessions, **config.ui.sessions.to_h)
51
61
  end
62
+
63
+ # @return [Array<String>] Web UI slogans we use to encourage people to support Karafka
64
+ def slogans
65
+ @slogans ||= YAML.load_file(
66
+ gem_root.join('config', 'locales', 'slogans.yml')
67
+ ).dig('en', 'slogans')
68
+ end
52
69
  end
53
70
  end
54
71
  end
@@ -58,7 +75,7 @@ require_relative 'web/inflector'
58
75
  loader = Zeitwerk::Loader.new
59
76
 
60
77
  # Make sure pro is not loaded unless Pro
61
- loader.ignore(Karafka::Web.gem_root.join('lib/karafka/web/ui/pro'))
78
+ loader.ignore(Karafka::Web.gem_root.join('lib/karafka/web/pro'))
62
79
 
63
80
  # If license is detected, we can use loader without limitations
64
81
  Karafka::Licenser.detect do
data.tar.gz.sig CHANGED
Binary file