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
@@ -27,75 +27,21 @@
27
27
  <%== partial 'health/no_data' %>
28
28
  <% end %>
29
29
 
30
- <% @stats.each_with_index do |(cg_name, cg_details), index| %>
30
+ <% @stats.each do |cg_name, cg_details| %>
31
31
  <h2 class="h2"><%= cg_name %></h2>
32
32
 
33
- <% topics = cg_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="7">
40
- <%= topic_name %>
41
- </th>
42
- <th colspan="1" rowspan="1" class="options">
43
- Options
44
- </th>
45
- </tr>
46
- <tr>
47
- <th colspan="1" rowspan="2">
48
- <%== sort_link('Partition', :id) %>
49
- </th>
50
- <th colspan="1" rowspan="2">
51
- <%== sort_link(:lag_hybrid) %>
52
- </th>
53
- <th colspan="1" rowspan="2">
54
- <%== sort_link(:stored_offset) %>
55
- </th>
56
- <th colspan="3" rowspan="1">
57
- States
58
- </th>
59
- <th colspan="1" rowspan="2">
60
- <%== sort_link('Process ID', :id) %>
61
- </th>
62
- <th colspan="1" rowspan="2" class="options">
63
- <%==
64
- partial(
65
- 'health/topic_edit_options',
66
- locals: {
67
- consumer_group_name: cg_name,
68
- topic_name: topic_name,
69
- topic_details: topic_details
70
- }
71
- )
72
- %>
73
- </th>
74
- </tr>
75
- <tr>
76
- <th><%== sort_link(:fetch_state) %></th>
77
- <th><%== sort_link(:poll_state) %></th>
78
- <th><%== sort_link(:lso_risk_state) %></th>
79
- </tr>
80
- </thead>
81
- <tbody>
82
- <%==
83
- partial(
84
- 'health/partitions_with_fallback',
85
- locals: {
86
- consumer_group_id: cg_name,
87
- topic_details: topic_details,
88
- topic_name: topic_name,
89
- partition_partial: 'health/partition',
90
- colspan: 7
91
- }
92
- )
93
- %>
94
- </tbody>
95
- </table>
96
-
97
- <%== partial 'health/table_metadata', locals: { details: cg_details } %>
98
- </div>
33
+ <% cg_details[:topics].each do |topic_name, topic_details| %>
34
+ <%==
35
+ partial(
36
+ 'health/overview_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
+ %>
99
45
  <% end %>
100
46
  <% end %>
101
47
  </div>
@@ -0,0 +1,48 @@
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 rowspan="2"><%== sort_link('Process ID', :id) %></th>
26
+ <th rowspan="2"><%== sort_link(:topic) %></th>
27
+ <th rowspan="2"><%== sort_link(:consumer) %></th>
28
+ <th rowspan="2"><%== sort_link(:type) %></th>
29
+ <th rowspan="2"><%== sort_link(:messages) %></th>
30
+ <th colspan="3" class="text-center">Offsets</th>
31
+ <th rowspan="2"><%== sort_link(updated_at_label, :updated_at, rev: true) %></th>
32
+ </tr>
33
+ <tr>
34
+ <th><%== sort_link(:first_offset) %></th>
35
+ <th><%== sort_link(:last_offset) %></th>
36
+ <th><%== sort_link(:committed_offset) %></th>
37
+ </tr>
38
+ </thead>
39
+ <tbody>
40
+ <%==
41
+ each_partial(
42
+ @jobs,
43
+ 'jobs/job'
44
+ )
45
+ %>
46
+ </tbody>
47
+ </table>
48
+ </div>
@@ -23,39 +23,17 @@
23
23
  <%== partial 'jobs/tabs' %>
24
24
 
25
25
  <div class="col-span-12">
26
- <% if @jobs.empty? && params.current_page <= 1 %>
26
+ <% if !@jobs.empty? || filtering? %>
27
+ <%== filter_box %>
28
+ <% end %>
29
+
30
+ <% if @jobs.empty? && !filtering? && params.current_page <= 1 %>
27
31
  <%== partial 'jobs/no_jobs', locals: { type: 'pending' } %>
32
+ <% elsif @jobs.empty? && filtering? %>
33
+ <%== partial 'shared/no_filter_results' %>
28
34
  <% elsif @jobs.empty? %>
29
35
  <%== partial 'shared/no_paginated_data' %>
30
36
  <% else %>
31
- <div class="data-table-wrapper">
32
- <table class="data-table">
33
- <thead>
34
- <tr>
35
- <th rowspan="2"><%== sort_link('Process ID', :id) %></th>
36
- <th rowspan="2"><%== sort_link(:topic) %></th>
37
- <th rowspan="2"><%== sort_link(:consumer) %></th>
38
- <th rowspan="2"><%== sort_link(:type) %></th>
39
- <th rowspan="2"><%== sort_link(:messages) %></th>
40
- <th colspan="3" class="text-center">Offsets</th>
41
- <th rowspan="2"><%== sort_link('Created', :updated_at, rev: true) %></th>
42
- </tr>
43
-
44
- <tr>
45
- <th><%== sort_link(:first_offset) %></th>
46
- <th><%== sort_link(:last_offset) %></th>
47
- <th><%== sort_link(:committed_offset) %></th>
48
- </tr>
49
- </thead>
50
- <tbody>
51
- <%==
52
- each_partial(
53
- @jobs,
54
- 'jobs/job'
55
- )
56
- %>
57
- </tbody>
58
- </table>
59
- </div>
37
+ <%== partial 'jobs/jobs_table', locals: { updated_at_label: 'Created' } %>
60
38
  <% end %>
61
39
  </div>
@@ -23,39 +23,17 @@
23
23
  <%== partial 'jobs/tabs' %>
24
24
 
25
25
  <div class="col-span-12">
26
- <% if @jobs.empty? && params.current_page <= 1 %>
26
+ <% if !@jobs.empty? || filtering? %>
27
+ <%== filter_box %>
28
+ <% end %>
29
+
30
+ <% if @jobs.empty? && !filtering? && params.current_page <= 1 %>
27
31
  <%== partial 'jobs/no_jobs', locals: { type: 'running' } %>
32
+ <% elsif @jobs.empty? && filtering? %>
33
+ <%== partial 'shared/no_filter_results' %>
28
34
  <% elsif @jobs.empty? %>
29
35
  <%== partial 'shared/no_paginated_data' %>
30
36
  <% else %>
31
- <div class="data-table-wrapper">
32
- <table class="data-table">
33
- <thead>
34
- <tr>
35
- <th rowspan="2"><%== sort_link('Process ID', :id) %></th>
36
- <th rowspan="2"><%== sort_link(:topic) %></th>
37
- <th rowspan="2"><%== sort_link(:consumer) %></th>
38
- <th rowspan="2"><%== sort_link(:type) %></th>
39
- <th rowspan="2"><%== sort_link(:messages) %></th>
40
- <th colspan="3" class="text-center">Offsets</th>
41
- <th rowspan="2"><%== sort_link('Started', :updated_at, rev: true) %></th>
42
- </tr>
43
-
44
- <tr>
45
- <th><%== sort_link(:first_offset) %></th>
46
- <th><%== sort_link(:last_offset) %></th>
47
- <th><%== sort_link(:committed_offset) %></th>
48
- </tr>
49
- </thead>
50
- <tbody>
51
- <%==
52
- each_partial(
53
- @jobs,
54
- 'jobs/job'
55
- )
56
- %>
57
- </tbody>
58
- </table>
59
- </div>
37
+ <%== partial 'jobs/jobs_table', locals: { updated_at_label: 'Started' } %>
60
38
  <% end %>
61
39
  </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
+ <div class="data-table-wrapper">
22
+ <table class="data-table">
23
+ <thead>
24
+ <tr>
25
+ <th><%== sort_link('Task ID', :id) %></th>
26
+ <th><%== sort_link('Status', :enabled) %></th>
27
+ <th><%== sort_link(:cron) %></th>
28
+ <th><%== sort_link(:previous_time) %></th>
29
+ <th><%== sort_link(:next_time) %></th>
30
+ <th class="options">Options</th>
31
+ </tr>
32
+ </thead>
33
+ <tbody>
34
+ <%==
35
+ render_each(
36
+ @tasks,
37
+ 'recurring_tasks/_task',
38
+ local: :task
39
+ )
40
+ %>
41
+ </tbody>
42
+ </table>
43
+ </div>
@@ -33,30 +33,14 @@
33
33
  <% end %>
34
34
 
35
35
  <div class="col-span-12">
36
- <% if @schedule && !@tasks.empty? %>
37
- <div class="data-table-wrapper">
38
- <table class="data-table">
39
- <thead>
40
- <tr>
41
- <th><%== sort_link('Task ID', :id) %></th>
42
- <th><%== sort_link('Status', :enabled) %></th>
43
- <th><%== sort_link(:cron) %></th>
44
- <th><%== sort_link(:previous_time) %></th>
45
- <th><%== sort_link(:next_time) %></th>
46
- <th class="options">Options</th>
47
- </tr>
48
- </thead>
49
- <tbody>
50
- <%==
51
- render_each(
52
- @tasks,
53
- 'recurring_tasks/_task',
54
- local: :task
55
- )
56
- %>
57
- </tbody>
58
- </table>
59
- </div>
36
+ <% if @schedule && (filtering? || !@tasks.empty?) %>
37
+ <%== filter_box(labels: { id: 'Task ID' }) %>
38
+ <% end %>
39
+
40
+ <% if @schedule && @tasks.empty? && filtering? %>
41
+ <%== partial 'shared/no_filter_results' %>
42
+ <% elsif @schedule && !@tasks.empty? %>
43
+ <%== partial 'recurring_tasks/tasks_table' %>
60
44
  <% else %>
61
45
  <%== partial 'recurring_tasks/not_active' %>
62
46
  <% end %>
@@ -18,37 +18,41 @@
18
18
  <%# License: https://karafka.io/docs/Pro-License-Comm/ %>
19
19
  <%# Contact: contact@karafka.io %>
20
20
 
21
- <div class="col-span-12 mb-3">
22
- <h2 class="h2">
23
- <%= consumer_group.id %>
24
- </h2>
21
+ <% topics = visible_topics(consumer_group.topics, consumer_group: consumer_group.id) %>
25
22
 
26
- <div class="data-table-wrapper">
27
- <table class="data-table">
28
- <thead>
29
- <tr>
30
- <th>Subscription group</th>
31
- <th><%== sort_link('Topic', :name) %></th>
32
- <th>Type</th>
33
- <th>Assigned</th>
34
- <th><%== sort_link(:active?) %></th>
35
- <th class="options">Options</th>
36
- </tr>
37
- </thead>
38
- <tbody>
39
- <% consumer_group.topics.each do |topic| %>
40
- <%==
41
- partial(
42
- 'routing/topic',
43
- locals: {
44
- subscription_group: topic.subscription_group,
45
- consumer_group: consumer_group.id,
46
- topic: topic
47
- }
48
- )
49
- %>
50
- <% end %>
51
- </tbody>
52
- </table>
23
+ <% unless filtering? && topics.empty? %>
24
+ <div class="col-span-12 mb-3">
25
+ <h2 class="h2">
26
+ <%= consumer_group.id %>
27
+ </h2>
28
+
29
+ <div class="data-table-wrapper">
30
+ <table class="data-table">
31
+ <thead>
32
+ <tr>
33
+ <th>Subscription group</th>
34
+ <th><%== sort_link('Topic', :name) %></th>
35
+ <th>Type</th>
36
+ <th>Assigned</th>
37
+ <th><%== sort_link(:active?) %></th>
38
+ <th class="options">Options</th>
39
+ </tr>
40
+ </thead>
41
+ <tbody>
42
+ <% topics.each do |topic| %>
43
+ <%==
44
+ partial(
45
+ 'routing/topic',
46
+ locals: {
47
+ subscription_group: topic.subscription_group,
48
+ consumer_group: consumer_group.id,
49
+ topic: topic
50
+ }
51
+ )
52
+ %>
53
+ <% end %>
54
+ </tbody>
55
+ </table>
56
+ </div>
53
57
  </div>
54
- </div>
58
+ <% end %>
@@ -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
+ <div class="data-table-wrapper">
22
+ <table class="data-table">
23
+ <thead>
24
+ <tr>
25
+ <th><%== sort_link('Attribute', :name) %></th>
26
+ <th><%== sort_link(:value) %></th>
27
+ </tr>
28
+ </thead>
29
+ <tbody>
30
+ <% @details.each do |detail| %>
31
+ <%==
32
+ partial(
33
+ 'routing/detail',
34
+ locals: {
35
+ k: detail[:name],
36
+ v: detail[:value]
37
+ }
38
+ )
39
+ %>
40
+ <% end %>
41
+ </tbody>
42
+ </table>
43
+ </div>
@@ -20,9 +20,21 @@
20
20
 
21
21
  <% view_title 'Routing Details' %>
22
22
 
23
- <%==
24
- each_partial(
25
- @routes,
26
- 'routing/consumer_group'
27
- )
28
- %>
23
+ <% if filtering? || @routes.any? %>
24
+ <div class="col-span-12 mb-3">
25
+ <%== filter_box %>
26
+ </div>
27
+ <% end %>
28
+
29
+ <% if filtering? && @routes.none? { |cg| visible_topics(cg.topics, consumer_group: cg.id).any? } %>
30
+ <div class="col-span-12">
31
+ <%== partial 'shared/no_filter_results' %>
32
+ </div>
33
+ <% else %>
34
+ <%==
35
+ each_partial(
36
+ @routes,
37
+ 'routing/consumer_group'
38
+ )
39
+ %>
40
+ <% end %>
@@ -23,44 +23,16 @@
23
23
  view_title title
24
24
  %>
25
25
 
26
- <div class="data-table-wrapper">
27
- <table class="data-table">
28
- <tbody>
29
- <% flat_hash(@topic.subscription_group.kafka).each do |k, v| %>
30
- <%==
31
- partial(
32
- 'routing/detail',
33
- locals: {
34
- k: "kafka.#{k}",
35
- v: v
36
- }
37
- )
38
- %>
39
- <% end %>
26
+ <% if filtering? || !@details.empty? %>
27
+ <div class="col-span-12 mb-3">
28
+ <%== filter_box(labels: { name: 'Attribute' }) %>
29
+ </div>
30
+ <% end %>
40
31
 
41
- <% flat_hash(@topic.to_h.except(:kafka)).each do |k, v| %>
42
- <%==
43
- partial(
44
- 'routing/detail',
45
- locals: {
46
- k: k,
47
- v: v
48
- }
49
- )
50
- %>
51
- <% end %>
52
-
53
- <% flat_hash(@topic.subscription_group.multiplexing.to_h).each do |k, v| %>
54
- <%==
55
- partial(
56
- 'routing/detail',
57
- locals: {
58
- k: "multiplexing.#{k}",
59
- v: v
60
- }
61
- )
62
- %>
63
- <% end %>
64
- </tbody>
65
- </table>
66
- </div>
32
+ <% if filtering? && @details.empty? %>
33
+ <div class="col-span-12">
34
+ <%== partial 'shared/no_filter_results' %>
35
+ </div>
36
+ <% else %>
37
+ <%== partial 'routing/details_table' %>
38
+ <% end %>
@@ -21,8 +21,14 @@
21
21
  <% view_title 'Schedules' %>
22
22
 
23
23
  <div class="col-span-12">
24
- <% if @topics.empty? %>
24
+ <% if filtering? || !@topics.empty? %>
25
+ <%== filter_box %>
26
+ <% end %>
27
+
28
+ <% if @topics.empty? && !filtering? %>
25
29
  <%== partial 'scheduled_messages/schedules/no_groups' %>
30
+ <% elsif @topics.empty? %>
31
+ <%== partial 'shared/no_filter_results' %>
26
32
  <% else %>
27
33
  <% @topics.each do |topic| %>
28
34
  <div class="grid grid-cols-1 md:grid-cols-2 gap-8">
@@ -0,0 +1,61 @@
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
+ <form method="get" action="<%= request.path %>" class="filter-form flex gap-2 mb-6">
22
+ <% hidden_params.each do |key, value| %>
23
+ <input type="hidden" name="<%= key %>" value="<%= value %>">
24
+ <% end %>
25
+
26
+ <% if fielded %>
27
+ <div class="join grow">
28
+ <select name="filter[field]" class="select join-item">
29
+ <% fields.each do |field| %>
30
+ <option value="<%= field %>"<%= " selected" if field.to_s == selected %>><%= filter_field_label(field, labels) %></option>
31
+ <% end %>
32
+ </select>
33
+
34
+ <input
35
+ type="text"
36
+ name="<%= value_name %>"
37
+ value="<%= keyword %>"
38
+ placeholder="Filter..."
39
+ class="input w-full join-item"
40
+ autocomplete="off"
41
+ >
42
+ </div>
43
+ <% else %>
44
+ <input
45
+ type="text"
46
+ name="<%= value_name %>"
47
+ value="<%= keyword %>"
48
+ placeholder="Filter..."
49
+ class="input w-full grow"
50
+ autocomplete="off"
51
+ >
52
+ <% end %>
53
+
54
+ <button type="submit" class="btn btn-primary font-normal">Search</button>
55
+
56
+ <% if active %>
57
+ <a class="btn btn-outline font-normal" href="<%= clear_path %>">Reset</a>
58
+ <% else %>
59
+ <button type="button" class="btn btn-outline font-normal btn-disabled" disabled>Reset</button>
60
+ <% end %>
61
+ </form>
@@ -0,0 +1,42 @@
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><%== sort_link(:name) %></th>
26
+ <th><%== sort_link(:value) %></th>
27
+ <th><%== sort_link(:default?) %></th>
28
+ <th><%== sort_link(:sensitive?) %></th>
29
+ <th><%== sort_link(:read_only?) %></th>
30
+ <th class="options">Options</th>
31
+ </tr>
32
+ </thead>
33
+ <tbody>
34
+ <%==
35
+ each_partial(
36
+ @configs,
37
+ 'topics/configs/config'
38
+ )
39
+ %>
40
+ </tbody>
41
+ </table>
42
+ </div>