karafka-web 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +10 -0
  3. data/Gemfile.lock +13 -13
  4. data/lib/karafka/web/management/actions/enable.rb +74 -10
  5. data/lib/karafka/web/pro/ui/app.rb +13 -0
  6. data/lib/karafka/web/pro/ui/controllers/base_controller.rb +4 -0
  7. data/lib/karafka/web/pro/ui/controllers/cluster_controller.rb +66 -4
  8. data/lib/karafka/web/pro/ui/controllers/consumers/consumers_controller.rb +9 -2
  9. data/lib/karafka/web/pro/ui/controllers/consumers/controls_controller.rb +6 -0
  10. data/lib/karafka/web/pro/ui/controllers/consumers/jobs_controller.rb +8 -2
  11. data/lib/karafka/web/pro/ui/controllers/dlq_controller.rb +6 -0
  12. data/lib/karafka/web/pro/ui/controllers/explorer/explorer_controller.rb +6 -0
  13. data/lib/karafka/web/pro/ui/controllers/health_controller.rb +19 -3
  14. data/lib/karafka/web/pro/ui/controllers/jobs_controller.rb +25 -0
  15. data/lib/karafka/web/pro/ui/controllers/recurring_tasks_controller.rb +10 -1
  16. data/lib/karafka/web/pro/ui/controllers/requests/params.rb +67 -0
  17. data/lib/karafka/web/pro/ui/controllers/routing_controller.rb +23 -1
  18. data/lib/karafka/web/pro/ui/controllers/scheduled_messages/schedules_controller.rb +6 -0
  19. data/lib/karafka/web/pro/ui/controllers/topics/configs_controller.rb +6 -1
  20. data/lib/karafka/web/pro/ui/controllers/topics/distributions_controller.rb +1 -1
  21. data/lib/karafka/web/pro/ui/controllers/topics/offsets_controller.rb +1 -1
  22. data/lib/karafka/web/pro/ui/controllers/topics/replications_controller.rb +1 -1
  23. data/lib/karafka/web/pro/ui/controllers/topics/topics_controller.rb +6 -0
  24. data/lib/karafka/web/pro/ui/helpers/filtering_helper.rb +173 -0
  25. data/lib/karafka/web/pro/ui/helpers/topics_filtering_helper.rb +80 -0
  26. data/lib/karafka/web/pro/ui/lib/filtering.rb +128 -0
  27. data/lib/karafka/web/pro/ui/lib/search/matchers/base.rb +2 -2
  28. data/lib/karafka/web/pro/ui/routes/cluster.rb +0 -2
  29. data/lib/karafka/web/pro/ui/views/cluster/_brokers_table.erb +41 -0
  30. data/lib/karafka/web/pro/ui/views/cluster/_configs_table.erb +41 -0
  31. data/lib/karafka/web/pro/ui/views/cluster/_partition.erb +2 -2
  32. data/lib/karafka/web/pro/ui/views/cluster/index.erb +12 -20
  33. data/lib/karafka/web/pro/ui/views/cluster/replication.erb +39 -0
  34. data/lib/karafka/web/pro/ui/views/cluster/show.erb +13 -21
  35. data/lib/karafka/web/pro/ui/views/consumers/consumers/_consumer_performances_table.erb +56 -0
  36. data/lib/karafka/web/pro/ui/views/consumers/consumers/_consumers_table.erb +43 -0
  37. data/lib/karafka/web/pro/ui/views/consumers/consumers/consumer/_subscription_group.erb +10 -2
  38. data/lib/karafka/web/pro/ui/views/consumers/consumers/index.erb +8 -24
  39. data/lib/karafka/web/pro/ui/views/consumers/consumers/performance.erb +8 -37
  40. data/lib/karafka/web/pro/ui/views/consumers/consumers/subscriptions.erb +20 -6
  41. data/lib/karafka/web/pro/ui/views/consumers/controls/_processes_table.erb +45 -0
  42. data/lib/karafka/web/pro/ui/views/consumers/controls/index.erb +14 -27
  43. data/lib/karafka/web/pro/ui/views/consumers/jobs/_jobs_table.erb +48 -0
  44. data/lib/karafka/web/pro/ui/views/consumers/jobs/pending.erb +8 -29
  45. data/lib/karafka/web/pro/ui/views/consumers/jobs/running.erb +8 -29
  46. data/lib/karafka/web/pro/ui/views/dlq/index.erb +9 -1
  47. data/lib/karafka/web/pro/ui/views/explorer/explorer/index.erb +9 -1
  48. data/lib/karafka/web/pro/ui/views/health/_changes_table.erb +59 -0
  49. data/lib/karafka/web/pro/ui/views/health/_cluster_lags_table.erb +43 -0
  50. data/lib/karafka/web/pro/ui/views/health/_lags_table.erb +60 -0
  51. data/lib/karafka/web/pro/ui/views/health/_no_data.erb +5 -1
  52. data/lib/karafka/web/pro/ui/views/health/_offsets_table.erb +63 -0
  53. data/lib/karafka/web/pro/ui/views/health/_overview_table.erb +83 -0
  54. data/lib/karafka/web/pro/ui/views/health/_tabs.erb +6 -0
  55. data/lib/karafka/web/pro/ui/views/health/changes.erb +13 -43
  56. data/lib/karafka/web/pro/ui/views/health/cluster_lags.erb +11 -25
  57. data/lib/karafka/web/pro/ui/views/health/lags.erb +13 -44
  58. data/lib/karafka/web/pro/ui/views/health/offsets.erb +13 -47
  59. data/lib/karafka/web/pro/ui/views/health/overview.erb +13 -67
  60. data/lib/karafka/web/pro/ui/views/jobs/_jobs_table.erb +48 -0
  61. data/lib/karafka/web/pro/ui/views/jobs/pending.erb +8 -30
  62. data/lib/karafka/web/pro/ui/views/jobs/running.erb +8 -30
  63. data/lib/karafka/web/pro/ui/views/recurring_tasks/_tasks_table.erb +43 -0
  64. data/lib/karafka/web/pro/ui/views/recurring_tasks/schedule.erb +8 -24
  65. data/lib/karafka/web/pro/ui/views/routing/_consumer_group.erb +36 -32
  66. data/lib/karafka/web/pro/ui/views/routing/_details_table.erb +43 -0
  67. data/lib/karafka/web/pro/ui/views/routing/index.erb +18 -6
  68. data/lib/karafka/web/pro/ui/views/routing/show.erb +12 -40
  69. data/lib/karafka/web/pro/ui/views/scheduled_messages/schedules/index.erb +7 -1
  70. data/lib/karafka/web/pro/ui/views/shared/_filter_box.erb +61 -0
  71. data/lib/karafka/web/pro/ui/views/topics/configs/_configs_table.erb +42 -0
  72. data/lib/karafka/web/pro/ui/views/topics/configs/index.erb +13 -22
  73. data/lib/karafka/web/pro/ui/views/topics/replications/_partition.erb +2 -2
  74. data/lib/karafka/web/pro/ui/views/topics/replications/show.erb +12 -2
  75. data/lib/karafka/web/pro/ui/views/topics/topics/index.erb +9 -1
  76. data/lib/karafka/web/tracking/consumers/listeners/errors.rb +80 -14
  77. data/lib/karafka/web/ui/base.rb +4 -0
  78. data/lib/karafka/web/ui/controllers/base_controller.rb +1 -1
  79. data/lib/karafka/web/ui/controllers/cluster_controller.rb +21 -22
  80. data/lib/karafka/web/ui/controllers/consumers_controller.rb +1 -1
  81. data/lib/karafka/web/ui/controllers/jobs_controller.rb +23 -27
  82. data/lib/karafka/web/ui/controllers/requests/hookable.rb +5 -0
  83. data/lib/karafka/web/ui/controllers/routing_controller.rb +15 -1
  84. data/lib/karafka/web/ui/helpers/application_helper.rb +3 -278
  85. data/lib/karafka/web/ui/helpers/badges_helper.rb +66 -0
  86. data/lib/karafka/web/ui/helpers/formatting_helper.rb +77 -0
  87. data/lib/karafka/web/ui/helpers/partitions_helper.rb +167 -0
  88. data/lib/karafka/web/ui/helpers/sorting_helper.rb +78 -0
  89. data/lib/karafka/web/ui/lib/filter.rb +377 -0
  90. data/lib/karafka/web/ui/lib/hash_flattener.rb +37 -0
  91. data/lib/karafka/web/ui/lib/sorter.rb +3 -1
  92. data/lib/karafka/web/ui/models/jobs.rb +3 -2
  93. data/lib/karafka/web/ui/models/process.rb +12 -0
  94. data/lib/karafka/web/ui/public/javascripts/application.min.js.gz +0 -0
  95. data/lib/karafka/web/ui/public/stylesheets/application.css +9 -0
  96. data/lib/karafka/web/ui/public/stylesheets/application.min.css +4230 -1258
  97. data/lib/karafka/web/ui/public/stylesheets/application.min.css.br +0 -0
  98. data/lib/karafka/web/ui/public/stylesheets/application.min.css.gz +0 -0
  99. data/lib/karafka/web/ui/public/stylesheets/libs/highlight_dark.min.css.gz +0 -0
  100. data/lib/karafka/web/ui/public/stylesheets/libs/highlight_light.min.css.gz +0 -0
  101. data/lib/karafka/web/ui/views/cluster/_brokers_table.erb +21 -0
  102. data/lib/karafka/web/ui/views/cluster/_partition.erb +2 -2
  103. data/lib/karafka/web/ui/views/cluster/_partitions_table.erb +31 -0
  104. data/lib/karafka/web/ui/views/cluster/brokers.erb +1 -21
  105. data/lib/karafka/web/ui/views/cluster/replication.erb +1 -23
  106. data/lib/karafka/web/ui/views/consumers/_consumers_table.erb +22 -0
  107. data/lib/karafka/web/ui/views/consumers/index.erb +1 -22
  108. data/lib/karafka/web/ui/views/errors/_table.erb +28 -0
  109. data/lib/karafka/web/ui/views/errors/index.erb +1 -28
  110. data/lib/karafka/web/ui/views/jobs/_jobs_table.erb +22 -0
  111. data/lib/karafka/web/ui/views/jobs/pending.erb +1 -22
  112. data/lib/karafka/web/ui/views/jobs/running.erb +1 -22
  113. data/lib/karafka/web/ui/views/routing/_consumer_group.erb +18 -12
  114. data/lib/karafka/web/ui/views/routing/_details_table.erb +23 -0
  115. data/lib/karafka/web/ui/views/routing/show.erb +1 -29
  116. data/lib/karafka/web/ui/views/shared/_no_filter_results.erb +6 -0
  117. data/lib/karafka/web/version.rb +1 -1
  118. data/package-lock.json +98 -61
  119. metadata +35 -1
@@ -20,8 +20,16 @@
20
20
 
21
21
  <% view_title 'Explorer' %>
22
22
 
23
- <% if @topics.empty? %>
23
+ <% if filtering? || !@topics.empty? %>
24
+ <div class="col-span-12 mb-3">
25
+ <%== filter_box %>
26
+ </div>
27
+ <% end %>
28
+
29
+ <% if @topics.empty? && !filtering? %>
24
30
  <%== partial 'explorer/explorer/no_topics' %>
31
+ <% elsif @topics.empty? %>
32
+ <%== partial 'shared/no_filter_results' %>
25
33
  <% else %>
26
34
  <div class="topic-tiles">
27
35
  <%==
@@ -0,0 +1,59 @@
1
+ <%# Karafka Pro - Source Available Commercial Software %>
2
+ <%# Copyright (c) 2017-present Maciej Mensfeld. All rights reserved. %>
3
+ <%# This software is NOT open source. It is source-available commercial software %>
4
+ <%# requiring a paid license for use. It is NOT covered by LGPL. %>
5
+ <%# The author retains all right, title, and interest in this software, %>
6
+ <%# including all copyrights, patents, and other intellectual property rights. %>
7
+ <%# No patent rights are granted under this license. %>
8
+ <%# PROHIBITED: Use without a valid commercial license %>
9
+ <%# PROHIBITED: Redistribution, modification, or derivative works without authorization %>
10
+ <%# PROHIBITED: Reverse engineering, decompilation, or disassembly of this software %>
11
+ <%# PROHIBITED: Use as training data for AI/ML models or inclusion in datasets %>
12
+ <%# PROHIBITED: Scraping, crawling, or automated collection for any purpose %>
13
+ <%# PERMITTED: Reading, referencing, and linking for personal or commercial use %>
14
+ <%# PERMITTED: Runtime retrieval by AI assistants, coding agents, and RAG systems %>
15
+ <%# PERMITTED: for the purpose of providing contextual help to Karafka users %>
16
+ <%# Receipt, viewing, or possession of this software does not convey or %>
17
+ <%# imply any license or right beyond those expressly stated above. %>
18
+ <%# License: https://karafka.io/docs/Pro-License-Comm/ %>
19
+ <%# Contact: contact@karafka.io %>
20
+
21
+ <div class="data-table-wrapper">
22
+ <table class="data-table">
23
+ <thead>
24
+ <tr>
25
+ <th colspan="12">
26
+ <%= topic_name %>
27
+ </th>
28
+ </tr>
29
+ <tr>
30
+ <th rowspan="2"><%== sort_link('Partition', :id) %></th>
31
+ <th colspan="4">Offsets changes</th>
32
+ <th rowspan="2">
33
+ <%== sort_link('Pause state change', :poll_state_ch) %>
34
+ </th>
35
+ </tr>
36
+ <tr>
37
+ <th><%== sort_link('Committed', :committed_offset_fd) %></th>
38
+ <th><%== sort_link('Stored', :stored_offset_fd) %></th>
39
+ <th><%== sort_link('High', :hi_offset_fd) %></th>
40
+ <th><%== sort_link('Last stable', :lso_risk_state) %></th>
41
+ </tr>
42
+ </thead>
43
+ <tbody>
44
+ <%==
45
+ partial(
46
+ 'health/partitions_with_fallback',
47
+ locals: {
48
+ consumer_group_id: cg_name,
49
+ topic_details: topic_details,
50
+ topic_name: topic_name,
51
+ partition_partial: 'health/partition_times',
52
+ colspan: 5
53
+ }
54
+ )
55
+ %>
56
+ </tbody>
57
+ </table>
58
+ <%== partial 'health/table_metadata', locals: { details: cg_details } %>
59
+ </div>
@@ -0,0 +1,43 @@
1
+ <%# Karafka Pro - Source Available Commercial Software %>
2
+ <%# Copyright (c) 2017-present Maciej Mensfeld. All rights reserved. %>
3
+ <%# This software is NOT open source. It is source-available commercial software %>
4
+ <%# requiring a paid license for use. It is NOT covered by LGPL. %>
5
+ <%# The author retains all right, title, and interest in this software, %>
6
+ <%# including all copyrights, patents, and other intellectual property rights. %>
7
+ <%# No patent rights are granted under this license. %>
8
+ <%# PROHIBITED: Use without a valid commercial license %>
9
+ <%# PROHIBITED: Redistribution, modification, or derivative works without authorization %>
10
+ <%# PROHIBITED: Reverse engineering, decompilation, or disassembly of this software %>
11
+ <%# PROHIBITED: Use as training data for AI/ML models or inclusion in datasets %>
12
+ <%# PROHIBITED: Scraping, crawling, or automated collection for any purpose %>
13
+ <%# PERMITTED: Reading, referencing, and linking for personal or commercial use %>
14
+ <%# PERMITTED: Runtime retrieval by AI assistants, coding agents, and RAG systems %>
15
+ <%# PERMITTED: for the purpose of providing contextual help to Karafka users %>
16
+ <%# Receipt, viewing, or possession of this software does not convey or %>
17
+ <%# imply any license or right beyond those expressly stated above. %>
18
+ <%# License: https://karafka.io/docs/Pro-License-Comm/ %>
19
+ <%# Contact: contact@karafka.io %>
20
+
21
+ <table class="data-table">
22
+ <thead>
23
+ <tr>
24
+ <th colspan="12">
25
+ <%= topic_name %>
26
+ </th>
27
+ </tr>
28
+ <tr>
29
+ <th><%== sort_link('Partition', :id) %></th>
30
+ <th><%== sort_link(:lag) %></th>
31
+ <th><%== sort_link(:stored_offset) %></th>
32
+ </tr>
33
+ </thead>
34
+ <tbody>
35
+ <% partitions.each do |partition| %>
36
+ <tr>
37
+ <td><%= partition[:id] %></td>
38
+ <td><%== partition[:lag] %></td>
39
+ <td><%== partition[:stored_offset] %></td>
40
+ </tr>
41
+ <% end %>
42
+ </tbody>
43
+ </table>
@@ -0,0 +1,60 @@
1
+ <%# Karafka Pro - Source Available Commercial Software %>
2
+ <%# Copyright (c) 2017-present Maciej Mensfeld. All rights reserved. %>
3
+ <%# This software is NOT open source. It is source-available commercial software %>
4
+ <%# requiring a paid license for use. It is NOT covered by LGPL. %>
5
+ <%# The author retains all right, title, and interest in this software, %>
6
+ <%# including all copyrights, patents, and other intellectual property rights. %>
7
+ <%# No patent rights are granted under this license. %>
8
+ <%# PROHIBITED: Use without a valid commercial license %>
9
+ <%# PROHIBITED: Redistribution, modification, or derivative works without authorization %>
10
+ <%# PROHIBITED: Reverse engineering, decompilation, or disassembly of this software %>
11
+ <%# PROHIBITED: Use as training data for AI/ML models or inclusion in datasets %>
12
+ <%# PROHIBITED: Scraping, crawling, or automated collection for any purpose %>
13
+ <%# PERMITTED: Reading, referencing, and linking for personal or commercial use %>
14
+ <%# PERMITTED: Runtime retrieval by AI assistants, coding agents, and RAG systems %>
15
+ <%# PERMITTED: for the purpose of providing contextual help to Karafka users %>
16
+ <%# Receipt, viewing, or possession of this software does not convey or %>
17
+ <%# imply any license or right beyond those expressly stated above. %>
18
+ <%# License: https://karafka.io/docs/Pro-License-Comm/ %>
19
+ <%# Contact: contact@karafka.io %>
20
+
21
+ <div class="data-table-wrapper">
22
+ <table class="data-table">
23
+ <thead>
24
+ <tr>
25
+ <th colspan="12">
26
+ <%= topic_name %>
27
+ </th>
28
+ </tr>
29
+ <tr>
30
+ <th rowspan="2"><%== sort_link('Partition', :id) %></th>
31
+ <th colspan="2">Lags</th>
32
+ <th colspan="2">Trends</th>
33
+ <th colspan="12" rowspan="2">
34
+ <%== sort_link(:poll_state) %>
35
+ </th>
36
+ </tr>
37
+ <tr>
38
+ <th><%== sort_link(:lag) %></th>
39
+ <th><%== sort_link(:lag_stored) %></th>
40
+ <th><%== sort_link('Lag', :lag_d) %></th>
41
+ <th><%== sort_link('Lag stored', :lag_stored_d) %></th>
42
+ </tr>
43
+ </thead>
44
+ <tbody>
45
+ <%==
46
+ partial(
47
+ 'health/partitions_with_fallback',
48
+ locals: {
49
+ consumer_group_id: cg_name,
50
+ topic_details: topic_details,
51
+ topic_name: topic_name,
52
+ partition_partial: 'health/partition_lags',
53
+ colspan: 5
54
+ }
55
+ )
56
+ %>
57
+ </tbody>
58
+ </table>
59
+ <%== partial 'health/table_metadata', locals: { details: cg_details } %>
60
+ </div>
@@ -18,4 +18,8 @@
18
18
  <%# License: https://karafka.io/docs/Pro-License-Comm/ %>
19
19
  <%# Contact: contact@karafka.io %>
20
20
 
21
- <% empty_state('No health data is available. It may mean no processes are running.') %>
21
+ <% if filtering? %>
22
+ <%== partial 'shared/no_filter_results' %>
23
+ <% else %>
24
+ <% empty_state('No health data is available. It may mean no processes are running.') %>
25
+ <% end %>
@@ -0,0 +1,63 @@
1
+ <%# Karafka Pro - Source Available Commercial Software %>
2
+ <%# Copyright (c) 2017-present Maciej Mensfeld. All rights reserved. %>
3
+ <%# This software is NOT open source. It is source-available commercial software %>
4
+ <%# requiring a paid license for use. It is NOT covered by LGPL. %>
5
+ <%# The author retains all right, title, and interest in this software, %>
6
+ <%# including all copyrights, patents, and other intellectual property rights. %>
7
+ <%# No patent rights are granted under this license. %>
8
+ <%# PROHIBITED: Use without a valid commercial license %>
9
+ <%# PROHIBITED: Redistribution, modification, or derivative works without authorization %>
10
+ <%# PROHIBITED: Reverse engineering, decompilation, or disassembly of this software %>
11
+ <%# PROHIBITED: Use as training data for AI/ML models or inclusion in datasets %>
12
+ <%# PROHIBITED: Scraping, crawling, or automated collection for any purpose %>
13
+ <%# PERMITTED: Reading, referencing, and linking for personal or commercial use %>
14
+ <%# PERMITTED: Runtime retrieval by AI assistants, coding agents, and RAG systems %>
15
+ <%# PERMITTED: for the purpose of providing contextual help to Karafka users %>
16
+ <%# Receipt, viewing, or possession of this software does not convey or %>
17
+ <%# imply any license or right beyond those expressly stated above. %>
18
+ <%# License: https://karafka.io/docs/Pro-License-Comm/ %>
19
+ <%# Contact: contact@karafka.io %>
20
+
21
+ <div class="data-table-wrapper">
22
+ <table class="data-table">
23
+ <thead>
24
+ <tr>
25
+ <th colspan="12">
26
+ <%= topic_name %>
27
+ </th>
28
+ </tr>
29
+ <tr>
30
+ <th rowspan="2"><%== sort_link('Partition', :id) %></th>
31
+ <th rowspan="2"><%== sort_link(:lag_hybrid) %></th>
32
+ <th colspan="10">Offsets</th>
33
+ </tr>
34
+ <tr>
35
+ <th><%== sort_link(:committed_offset) %></th>
36
+ <th><%== sort_link('Committed change', :committed_offset_fd) %></th>
37
+ <th><%== sort_link(:stored_offset) %></th>
38
+ <th><%== sort_link('Stored change', :stored_offset_fd) %></th>
39
+ <th><%== sort_link(:lo_offset) %></th>
40
+ <th><%== sort_link(:hi_offset) %></th>
41
+ <th><%== sort_link('High change', :hi_offset_fd) %></th>
42
+ <th><%== sort_link(:ls_offset) %></th>
43
+ <th><%== sort_link('LSO change', :ls_offset_fd) %></th>
44
+ <th><%== sort_link('LSO state', :lso_risk_state) %></th>
45
+ </tr>
46
+ </thead>
47
+ <tbody>
48
+ <%==
49
+ partial(
50
+ 'health/partitions_with_fallback',
51
+ locals: {
52
+ consumer_group_id: cg_name,
53
+ topic_details: topic_details,
54
+ topic_name: topic_name,
55
+ partition_partial: 'health/partition_offset',
56
+ colspan: 11
57
+ }
58
+ )
59
+ %>
60
+ </tbody>
61
+ </table>
62
+ <%== partial 'health/table_metadata', locals: { details: cg_details } %>
63
+ </div>
@@ -0,0 +1,83 @@
1
+ <%# Karafka Pro - Source Available Commercial Software %>
2
+ <%# Copyright (c) 2017-present Maciej Mensfeld. All rights reserved. %>
3
+ <%# This software is NOT open source. It is source-available commercial software %>
4
+ <%# requiring a paid license for use. It is NOT covered by LGPL. %>
5
+ <%# The author retains all right, title, and interest in this software, %>
6
+ <%# including all copyrights, patents, and other intellectual property rights. %>
7
+ <%# No patent rights are granted under this license. %>
8
+ <%# PROHIBITED: Use without a valid commercial license %>
9
+ <%# PROHIBITED: Redistribution, modification, or derivative works without authorization %>
10
+ <%# PROHIBITED: Reverse engineering, decompilation, or disassembly of this software %>
11
+ <%# PROHIBITED: Use as training data for AI/ML models or inclusion in datasets %>
12
+ <%# PROHIBITED: Scraping, crawling, or automated collection for any purpose %>
13
+ <%# PERMITTED: Reading, referencing, and linking for personal or commercial use %>
14
+ <%# PERMITTED: Runtime retrieval by AI assistants, coding agents, and RAG systems %>
15
+ <%# PERMITTED: for the purpose of providing contextual help to Karafka users %>
16
+ <%# Receipt, viewing, or possession of this software does not convey or %>
17
+ <%# imply any license or right beyond those expressly stated above. %>
18
+ <%# License: https://karafka.io/docs/Pro-License-Comm/ %>
19
+ <%# Contact: contact@karafka.io %>
20
+
21
+ <div class="data-table-wrapper">
22
+ <table class="data-table">
23
+ <thead>
24
+ <tr>
25
+ <th colspan="7">
26
+ <%= topic_name %>
27
+ </th>
28
+ <th colspan="1" rowspan="1" class="options">
29
+ Options
30
+ </th>
31
+ </tr>
32
+ <tr>
33
+ <th colspan="1" rowspan="2">
34
+ <%== sort_link('Partition', :id) %>
35
+ </th>
36
+ <th colspan="1" rowspan="2">
37
+ <%== sort_link(:lag_hybrid) %>
38
+ </th>
39
+ <th colspan="1" rowspan="2">
40
+ <%== sort_link(:stored_offset) %>
41
+ </th>
42
+ <th colspan="3" rowspan="1">
43
+ States
44
+ </th>
45
+ <th colspan="1" rowspan="2">
46
+ <%== sort_link('Process ID', :id) %>
47
+ </th>
48
+ <th colspan="1" rowspan="2" class="options">
49
+ <%==
50
+ partial(
51
+ 'health/topic_edit_options',
52
+ locals: {
53
+ consumer_group_name: cg_name,
54
+ topic_name: topic_name,
55
+ topic_details: topic_details
56
+ }
57
+ )
58
+ %>
59
+ </th>
60
+ </tr>
61
+ <tr>
62
+ <th><%== sort_link(:fetch_state) %></th>
63
+ <th><%== sort_link(:poll_state) %></th>
64
+ <th><%== sort_link(:lso_risk_state) %></th>
65
+ </tr>
66
+ </thead>
67
+ <tbody>
68
+ <%==
69
+ partial(
70
+ 'health/partitions_with_fallback',
71
+ locals: {
72
+ consumer_group_id: cg_name,
73
+ topic_details: topic_details,
74
+ topic_name: topic_name,
75
+ partition_partial: 'health/partition',
76
+ colspan: 7
77
+ }
78
+ )
79
+ %>
80
+ </tbody>
81
+ </table>
82
+ <%== partial 'health/table_metadata', locals: { details: cg_details } %>
83
+ </div>
@@ -56,3 +56,9 @@
56
56
  </a>
57
57
  </div>
58
58
  </div>
59
+
60
+ <% if filtering? || !@stats.empty? %>
61
+ <div class="col-span-12">
62
+ <%== filter_box %>
63
+ </div>
64
+ <% end %>
@@ -27,51 +27,21 @@
27
27
  <%== partial 'health/no_data' %>
28
28
  <% end %>
29
29
 
30
- <% @stats.each_with_index do |(cg_name, details), index| %>
30
+ <% @stats.each do |cg_name, cg_details| %>
31
31
  <h2 class="h2"><%= cg_name %></h2>
32
32
 
33
- <% topics = details[:topics] %>
34
- <% topics.each_with_index do |(topic_name, topic_details), index| %>
35
- <div class="data-table-wrapper">
36
- <table class="data-table">
37
- <thead>
38
- <tr>
39
- <th colspan="12">
40
- <%= topic_name %>
41
- </th>
42
- </tr>
43
- <tr>
44
- <th rowspan="2"><%== sort_link('Partition', :id) %></th>
45
- <th colspan="4">Offsets changes</th>
46
- <th rowspan="2">
47
- <%== sort_link('Pause state change', :poll_state_ch) %>
48
- </th>
49
- </tr>
50
- <tr>
51
- <th><%== sort_link('Committed', :committed_offset_fd) %></th>
52
- <th><%== sort_link('Stored', :stored_offset_fd) %></th>
53
- <th><%== sort_link('High', :hi_offset_fd) %></th>
54
- <th><%== sort_link('Last stable', :lso_risk_state) %></th>
55
- </tr>
56
- </thead>
57
- <tbody>
58
- <%==
59
- partial(
60
- 'health/partitions_with_fallback',
61
- locals: {
62
- consumer_group_id: cg_name,
63
- topic_details: topic_details,
64
- topic_name: topic_name,
65
- partition_partial: 'health/partition_times',
66
- colspan: 5
67
- }
68
- )
69
- %>
70
- </tbody>
71
- </table>
72
-
73
- <%== partial 'health/table_metadata', locals: { details: details } %>
74
- </div>
33
+ <% cg_details[:topics].each do |topic_name, topic_details| %>
34
+ <%==
35
+ partial(
36
+ 'health/changes_table',
37
+ locals: {
38
+ cg_name: cg_name,
39
+ cg_details: cg_details,
40
+ topic_name: topic_name,
41
+ topic_details: topic_details
42
+ }
43
+ )
44
+ %>
75
45
  <% end %>
76
46
  <% end %>
77
47
  </div>
@@ -26,35 +26,21 @@
26
26
  <%== partial 'health/no_data' %>
27
27
  <% end %>
28
28
 
29
- <% @stats.each_with_index do |(cg_name, details), index| %>
29
+ <% @stats.each do |cg_name, cg_details| %>
30
30
  <div class="col-span-12 mb-3">
31
31
  <h2 class="h2"><%= cg_name %></h2>
32
32
 
33
33
  <div class="data-table-wrapper">
34
- <% details.each_with_index do |(topic_name, partitions), index| %>
35
- <table class="data-table">
36
- <thead>
37
- <tr>
38
- <th colspan="12">
39
- <%= topic_name %>
40
- </th>
41
- </tr>
42
- <tr>
43
- <th><%== sort_link('Partition', :id) %></th>
44
- <th><%== sort_link(:lag) %></th>
45
- <th><%== sort_link(:stored_offset) %></th>
46
- </tr>
47
- </thead>
48
- <tbody>
49
- <% partitions.each do |details| %>
50
- <tr>
51
- <td><%= details[:id] %></td>
52
- <td><%== details[:lag] %></td>
53
- <td><%== details[:stored_offset] %></td>
54
- </tr>
55
- <% end %>
56
- </tbody>
57
- </table>
34
+ <% cg_details.each do |topic_name, partitions| %>
35
+ <%==
36
+ partial(
37
+ 'health/cluster_lags_table',
38
+ locals: {
39
+ topic_name: topic_name,
40
+ partitions: partitions
41
+ }
42
+ )
43
+ %>
58
44
  <% end %>
59
45
  </div>
60
46
  </div>
@@ -27,52 +27,21 @@
27
27
  <%== partial 'health/no_data' %>
28
28
  <% end %>
29
29
 
30
- <% @stats.each_with_index do |(cg_name, details), index| %>
30
+ <% @stats.each do |cg_name, cg_details| %>
31
31
  <h2 class="h2"><%= cg_name %></h2>
32
32
 
33
- <% topics = details[:topics] %>
34
- <% topics.each_with_index do |(topic_name, topic_details), index| %>
35
- <div class="data-table-wrapper">
36
- <table class="data-table">
37
- <thead>
38
- <tr>
39
- <th colspan="12">
40
- <%= topic_name %>
41
- </th>
42
- </tr>
43
- <tr>
44
- <th rowspan="2"><%== sort_link('Partition', :id) %></th>
45
- <th colspan="2">Lags</th>
46
- <th colspan="2">Trends</th>
47
- <th colspan="12" rowspan="2">
48
- <%== sort_link(:poll_state) %>
49
- </th>
50
- </tr>
51
- <tr>
52
- <th><%== sort_link(:lag) %></th>
53
- <th><%== sort_link(:lag_stored) %></th>
54
- <th><%== sort_link('Lag', :lag_d) %></th>
55
- <th><%== sort_link('Lag stored', :lag_stored_d) %></th>
56
- </tr>
57
- </thead>
58
- <tbody>
59
- <%==
60
- partial(
61
- 'health/partitions_with_fallback',
62
- locals: {
63
- consumer_group_id: cg_name,
64
- topic_details: topic_details,
65
- topic_name: topic_name,
66
- partition_partial: 'health/partition_lags',
67
- colspan: 5
68
- }
69
- )
70
- %>
71
- </tbody>
72
- </table>
73
-
74
- <%== partial 'health/table_metadata', locals: { details: details } %>
75
- </div>
33
+ <% cg_details[:topics].each do |topic_name, topic_details| %>
34
+ <%==
35
+ partial(
36
+ 'health/lags_table',
37
+ locals: {
38
+ cg_name: cg_name,
39
+ cg_details: cg_details,
40
+ topic_name: topic_name,
41
+ topic_details: topic_details
42
+ }
43
+ )
44
+ %>
76
45
  <% end %>
77
46
  <% end %>
78
47
  </div>
@@ -27,55 +27,21 @@
27
27
  <%== partial 'health/no_data' %>
28
28
  <% end %>
29
29
 
30
- <% @stats.each_with_index do |(cg_name, details), index| %>
30
+ <% @stats.each do |cg_name, cg_details| %>
31
31
  <h2 class="h2"><%= cg_name %></h2>
32
32
 
33
- <% topics = details[:topics] %>
34
- <% topics.each_with_index do |(topic_name, topic_details), index| %>
35
- <div class="data-table-wrapper">
36
- <table class="data-table">
37
- <thead>
38
- <tr>
39
- <th colspan="12">
40
- <%= topic_name %>
41
- </th>
42
- </tr>
43
- <tr>
44
- <th rowspan="2"><%== sort_link('Partition', :id) %></th>
45
- <th rowspan="2"><%== sort_link(:lag_hybrid) %></th>
46
- <th colspan="10">Offsets</th>
47
- </tr>
48
- <tr>
49
- <th><%== sort_link(:committed_offset) %></th>
50
- <th><%== sort_link('Committed change', :committed_offset_fd) %></th>
51
- <th><%== sort_link(:stored_offset) %></th>
52
- <th><%== sort_link('Stored change', :stored_offset_fd) %></th>
53
- <th><%== sort_link(:lo_offset) %></th>
54
- <th><%== sort_link(:hi_offset) %></th>
55
- <th><%== sort_link('High change', :hi_offset_fd) %></th>
56
- <th><%== sort_link(:ls_offset) %></th>
57
- <th><%== sort_link('LSO change', :ls_offset_fd) %></th>
58
- <th><%== sort_link('LSO state', :lso_risk_state) %></th>
59
- </tr>
60
- </thead>
61
- <tbody>
62
- <%==
63
- partial(
64
- 'health/partitions_with_fallback',
65
- locals: {
66
- consumer_group_id: cg_name,
67
- topic_details: topic_details,
68
- topic_name: topic_name,
69
- partition_partial: 'health/partition_offset',
70
- colspan: 11
71
- }
72
- )
73
- %>
74
- </tbody>
75
- </table>
76
-
77
- <%== partial 'health/table_metadata', locals: { details: details } %>
78
- </div>
33
+ <% cg_details[:topics].each do |topic_name, topic_details| %>
34
+ <%==
35
+ partial(
36
+ 'health/offsets_table',
37
+ locals: {
38
+ cg_name: cg_name,
39
+ cg_details: cg_details,
40
+ topic_name: topic_name,
41
+ topic_details: topic_details
42
+ }
43
+ )
44
+ %>
79
45
  <% end %>
80
46
  <% end %>
81
47
  </div>