karafka-web 0.7.9 → 0.8.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/.github/workflows/ci.yml +21 -6
- data/.ruby-version +1 -1
- data/CHANGELOG.md +66 -0
- data/Gemfile.lock +22 -22
- data/docker-compose.yml +3 -1
- data/karafka-web.gemspec +2 -2
- data/lib/karafka/web/config.rb +16 -3
- data/lib/karafka/web/contracts/config.rb +7 -2
- data/lib/karafka/web/errors.rb +12 -0
- data/lib/karafka/web/inflector.rb +33 -0
- data/lib/karafka/web/installer.rb +20 -11
- data/lib/karafka/web/management/actions/base.rb +36 -0
- data/lib/karafka/web/management/actions/clean_boot_file.rb +33 -0
- data/lib/karafka/web/management/actions/create_initial_states.rb +77 -0
- data/lib/karafka/web/management/actions/create_topics.rb +139 -0
- data/lib/karafka/web/management/actions/delete_topics.rb +30 -0
- data/lib/karafka/web/management/actions/enable.rb +117 -0
- data/lib/karafka/web/management/actions/extend_boot_file.rb +39 -0
- data/lib/karafka/web/management/actions/migrate_states_data.rb +18 -0
- data/lib/karafka/web/management/migrations/0_base.rb +58 -0
- data/lib/karafka/web/management/migrations/0_set_initial_consumers_metrics.rb +36 -0
- data/lib/karafka/web/management/migrations/0_set_initial_consumers_state.rb +43 -0
- data/lib/karafka/web/management/migrations/1699543515_fill_missing_received_and_sent_bytes_in_consumers_metrics.rb +26 -0
- data/lib/karafka/web/management/migrations/1699543515_fill_missing_received_and_sent_bytes_in_consumers_state.rb +23 -0
- data/lib/karafka/web/management/migrations/1700234522_introduce_waiting_in_consumers_metrics.rb +24 -0
- data/lib/karafka/web/management/migrations/1700234522_introduce_waiting_in_consumers_state.rb +20 -0
- data/lib/karafka/web/management/migrations/1700234522_remove_processing_from_consumers_metrics.rb +24 -0
- data/lib/karafka/web/management/migrations/1700234522_remove_processing_from_consumers_state.rb +20 -0
- data/lib/karafka/web/management/migrations/1704722380_split_listeners_into_active_and_paused_in_metrics.rb +36 -0
- data/lib/karafka/web/management/migrations/1704722380_split_listeners_into_active_and_paused_in_states.rb +32 -0
- data/lib/karafka/web/management/migrator.rb +117 -0
- data/lib/karafka/web/processing/consumer.rb +39 -38
- data/lib/karafka/web/processing/consumers/aggregators/metrics.rb +15 -7
- data/lib/karafka/web/processing/consumers/aggregators/state.rb +8 -3
- data/lib/karafka/web/processing/consumers/contracts/aggregated_stats.rb +5 -1
- data/lib/karafka/web/processing/publisher.rb +59 -0
- data/lib/karafka/web/tracking/consumers/contracts/job.rb +3 -2
- data/lib/karafka/web/tracking/consumers/contracts/partition.rb +1 -0
- data/lib/karafka/web/tracking/consumers/contracts/report.rb +6 -1
- data/lib/karafka/web/tracking/consumers/contracts/subscription_group.rb +10 -1
- data/lib/karafka/web/tracking/consumers/listeners/connections.rb +49 -0
- data/lib/karafka/web/tracking/consumers/listeners/pausing.rb +7 -4
- data/lib/karafka/web/tracking/consumers/listeners/processing.rb +78 -70
- data/lib/karafka/web/tracking/consumers/listeners/statistics.rb +40 -13
- data/lib/karafka/web/tracking/consumers/sampler.rb +82 -25
- data/lib/karafka/web/tracking/helpers/ttls/array.rb +72 -0
- data/lib/karafka/web/tracking/helpers/ttls/hash.rb +34 -0
- data/lib/karafka/web/tracking/helpers/ttls/stats.rb +49 -0
- data/lib/karafka/web/tracking/helpers/ttls/windows.rb +32 -0
- data/lib/karafka/web/tracking/reporter.rb +1 -0
- data/lib/karafka/web/ui/app.rb +22 -4
- data/lib/karafka/web/ui/base.rb +18 -2
- data/lib/karafka/web/ui/controllers/base.rb +34 -4
- data/lib/karafka/web/ui/controllers/become_pro.rb +1 -1
- data/lib/karafka/web/ui/controllers/cluster.rb +33 -9
- data/lib/karafka/web/ui/controllers/consumers.rb +8 -2
- data/lib/karafka/web/ui/controllers/dashboard.rb +2 -2
- data/lib/karafka/web/ui/controllers/errors.rb +2 -2
- data/lib/karafka/web/ui/controllers/jobs.rb +55 -5
- data/lib/karafka/web/ui/controllers/requests/params.rb +5 -0
- data/lib/karafka/web/ui/controllers/responses/deny.rb +15 -0
- data/lib/karafka/web/ui/controllers/responses/file.rb +23 -0
- data/lib/karafka/web/ui/controllers/responses/{data.rb → render.rb} +3 -3
- data/lib/karafka/web/ui/controllers/routing.rb +11 -2
- data/lib/karafka/web/ui/controllers/status.rb +1 -1
- data/lib/karafka/web/ui/helpers/application_helper.rb +70 -0
- data/lib/karafka/web/ui/lib/hash_proxy.rb +29 -14
- data/lib/karafka/web/ui/lib/sorter.rb +170 -0
- data/lib/karafka/web/ui/models/counters.rb +6 -0
- data/lib/karafka/web/ui/models/health.rb +23 -2
- data/lib/karafka/web/ui/models/jobs.rb +48 -0
- data/lib/karafka/web/ui/models/metrics/charts/aggregated.rb +33 -0
- data/lib/karafka/web/ui/models/metrics/charts/topics.rb +1 -10
- data/lib/karafka/web/ui/models/process.rb +2 -1
- data/lib/karafka/web/ui/models/status.rb +23 -7
- data/lib/karafka/web/ui/models/topic.rb +3 -1
- data/lib/karafka/web/ui/models/visibility_filter.rb +16 -0
- data/lib/karafka/web/ui/pro/app.rb +44 -6
- data/lib/karafka/web/ui/pro/controllers/cluster.rb +1 -0
- data/lib/karafka/web/ui/pro/controllers/consumers.rb +52 -6
- data/lib/karafka/web/ui/pro/controllers/dashboard.rb +1 -1
- data/lib/karafka/web/ui/pro/controllers/dlq.rb +1 -1
- data/lib/karafka/web/ui/pro/controllers/errors.rb +3 -3
- data/lib/karafka/web/ui/pro/controllers/explorer.rb +8 -8
- data/lib/karafka/web/ui/pro/controllers/health.rb +34 -2
- data/lib/karafka/web/ui/pro/controllers/jobs.rb +11 -0
- data/lib/karafka/web/ui/pro/controllers/messages.rb +42 -0
- data/lib/karafka/web/ui/pro/controllers/routing.rb +11 -2
- data/lib/karafka/web/ui/pro/views/consumers/_breadcrumbs.erb +8 -2
- data/lib/karafka/web/ui/pro/views/consumers/_consumer.erb +14 -8
- data/lib/karafka/web/ui/pro/views/consumers/_counters.erb +8 -6
- data/lib/karafka/web/ui/pro/views/consumers/consumer/_job.erb +4 -1
- data/lib/karafka/web/ui/pro/views/consumers/consumer/_no_jobs.erb +1 -1
- data/lib/karafka/web/ui/pro/views/consumers/consumer/_partition.erb +1 -3
- data/lib/karafka/web/ui/pro/views/consumers/consumer/_subscription_group.erb +28 -11
- data/lib/karafka/web/ui/pro/views/consumers/consumer/_tabs.erb +10 -3
- data/lib/karafka/web/ui/pro/views/consumers/index.erb +3 -3
- data/lib/karafka/web/ui/pro/views/consumers/pending_jobs.erb +43 -0
- data/lib/karafka/web/ui/pro/views/consumers/{jobs.erb → running_jobs.erb} +11 -10
- data/lib/karafka/web/ui/pro/views/dashboard/index.erb +7 -1
- data/lib/karafka/web/ui/pro/views/explorer/message/_message_actions.erb +18 -0
- data/lib/karafka/web/ui/pro/views/explorer/message/_metadata.erb +43 -0
- data/lib/karafka/web/ui/pro/views/explorer/message/_payload.erb +21 -0
- data/lib/karafka/web/ui/pro/views/explorer/message/_payload_actions.erb +19 -0
- data/lib/karafka/web/ui/pro/views/explorer/show.erb +9 -84
- data/lib/karafka/web/ui/pro/views/health/_breadcrumbs.erb +8 -0
- data/lib/karafka/web/ui/pro/views/health/_partition.erb +1 -3
- data/lib/karafka/web/ui/pro/views/health/_partition_offset.erb +4 -4
- data/lib/karafka/web/ui/pro/views/health/_partition_times.erb +32 -0
- data/lib/karafka/web/ui/pro/views/health/_tabs.erb +9 -0
- data/lib/karafka/web/ui/pro/views/health/changes.erb +66 -0
- data/lib/karafka/web/ui/pro/views/health/offsets.erb +14 -14
- data/lib/karafka/web/ui/pro/views/health/overview.erb +11 -11
- data/lib/karafka/web/ui/pro/views/jobs/_job.erb +1 -1
- data/lib/karafka/web/ui/pro/views/jobs/_no_jobs.erb +1 -1
- data/lib/karafka/web/ui/pro/views/jobs/pending.erb +39 -0
- data/lib/karafka/web/ui/pro/views/jobs/running.erb +39 -0
- data/lib/karafka/web/ui/pro/views/routing/_consumer_group.erb +2 -2
- data/lib/karafka/web/ui/pro/views/routing/_topic.erb +9 -0
- data/lib/karafka/web/ui/pro/views/routing/show.erb +12 -0
- data/lib/karafka/web/ui/pro/views/shared/_navigation.erb +1 -1
- data/lib/karafka/web/ui/public/javascripts/application.js +10 -0
- data/lib/karafka/web/ui/public/stylesheets/application.css +4 -0
- data/lib/karafka/web/ui/views/cluster/_breadcrumbs.erb +16 -0
- data/lib/karafka/web/ui/views/cluster/_tabs.erb +27 -0
- data/lib/karafka/web/ui/views/cluster/brokers.erb +27 -0
- data/lib/karafka/web/ui/views/cluster/topics.erb +35 -0
- data/lib/karafka/web/ui/views/consumers/_counters.erb +8 -6
- data/lib/karafka/web/ui/views/consumers/_summary.erb +2 -2
- data/lib/karafka/web/ui/views/consumers/index.erb +3 -3
- data/lib/karafka/web/ui/views/dashboard/_ranges_selector.erb +23 -7
- data/lib/karafka/web/ui/views/dashboard/index.erb +19 -8
- data/lib/karafka/web/ui/views/errors/show.erb +2 -23
- data/lib/karafka/web/ui/views/jobs/_breadcrumbs.erb +17 -1
- data/lib/karafka/web/ui/views/jobs/_job.erb +1 -1
- data/lib/karafka/web/ui/views/jobs/_no_jobs.erb +1 -1
- data/lib/karafka/web/ui/views/jobs/_tabs.erb +27 -0
- data/lib/karafka/web/ui/views/jobs/{index.erb → pending.erb} +9 -7
- data/lib/karafka/web/ui/{pro/views/jobs/index.erb → views/jobs/running.erb} +9 -11
- data/lib/karafka/web/ui/views/routing/_consumer_group.erb +14 -12
- data/lib/karafka/web/ui/views/shared/_navigation.erb +1 -1
- data/lib/karafka/web/ui/views/shared/_pagination.erb +1 -1
- data/lib/karafka/web/ui/views/shared/exceptions/not_allowed.erb +37 -0
- data/lib/karafka/web/ui/views/status/show.erb +17 -2
- data/lib/karafka/web/ui/views/status/warnings/_routing_topics_presence.erb +15 -0
- data/lib/karafka/web/version.rb +1 -1
- data/lib/karafka/web.rb +6 -2
- data.tar.gz.sig +0 -0
- metadata +61 -26
- metadata.gz.sig +0 -0
- data/lib/karafka/web/management/base.rb +0 -34
- data/lib/karafka/web/management/clean_boot_file.rb +0 -31
- data/lib/karafka/web/management/create_initial_states.rb +0 -101
- data/lib/karafka/web/management/create_topics.rb +0 -133
- data/lib/karafka/web/management/delete_topics.rb +0 -28
- data/lib/karafka/web/management/enable.rb +0 -102
- data/lib/karafka/web/management/extend_boot_file.rb +0 -37
- data/lib/karafka/web/tracking/ttl_array.rb +0 -59
- data/lib/karafka/web/tracking/ttl_hash.rb +0 -16
- data/lib/karafka/web/ui/pro/views/dashboard/_ranges_selector.erb +0 -39
- data/lib/karafka/web/ui/views/cluster/index.erb +0 -74
@@ -0,0 +1,21 @@
|
|
1
|
+
<% if @visibility_filter.payload?(@message) %>
|
2
|
+
<div class="row">
|
3
|
+
<div class="col-sm-12 mb-4">
|
4
|
+
<% if @payload_error %>
|
5
|
+
<%== partial 'explorer/failed_deserialization' %>
|
6
|
+
<% end %>
|
7
|
+
|
8
|
+
<div class="card">
|
9
|
+
<div class="card-body">
|
10
|
+
<% if @payload_error %>
|
11
|
+
<pre class="m-0 p-0"><code class="wrapped json p-0 m-0"><%= @message.raw_payload %></code></pre>
|
12
|
+
<% else %>
|
13
|
+
<pre class="m-0 p-0"><code class="wrapped json p-0 m-0"><%= @pretty_payload %></code></pre>
|
14
|
+
<% end %>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
<% else %>
|
20
|
+
<%== partial 'explorer/filtered' %>
|
21
|
+
<% end %>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<div class="float-end text-end">
|
2
|
+
<% if @visibility_filter.download?(@message) %>
|
3
|
+
<a
|
4
|
+
href="<%= root_path('messages', @message.topic, @message.partition, @message.offset, 'download') %>"
|
5
|
+
class="btn btn-secondary btn-sm"
|
6
|
+
>
|
7
|
+
⇓ Download raw
|
8
|
+
</a>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<% if @visibility_filter.export?(@message) && !@payload_error %>
|
12
|
+
<a
|
13
|
+
href="<%= root_path('messages', @message.topic, @message.partition, @message.offset, 'export') %>"
|
14
|
+
class="btn btn-secondary btn-sm"
|
15
|
+
>
|
16
|
+
⇓ Export as JSON
|
17
|
+
</a>
|
18
|
+
<% end %>
|
19
|
+
</div>
|
@@ -1,22 +1,5 @@
|
|
1
|
-
<%
|
2
|
-
republish_path = root_path('messages', @message.topic, @message.partition, @message.offset, 'republish')
|
3
|
-
surrounding_path = explorer_path(@message.topic, @message.partition, @message.offset, 'surrounding')
|
4
|
-
%>
|
5
|
-
|
6
1
|
<div class="container">
|
7
|
-
|
8
|
-
<div class="col-sm-12 text-end">
|
9
|
-
<a href="<%= surrounding_path %>" class="btn btn-secondary btn-sm float-end ms-1">
|
10
|
-
⇋
|
11
|
-
Surrounding
|
12
|
-
</a>
|
13
|
-
|
14
|
-
<form action="<%= republish_path %>" method="post" class="confirm-action float-end">
|
15
|
-
<%== csrf_tag(republish_path) %>
|
16
|
-
<input type="submit" value="⟳ Republish" class="btn btn-primary btn-sm"/>
|
17
|
-
</form>
|
18
|
-
</div>
|
19
|
-
</div>
|
2
|
+
<%== partial 'explorer/message/message_actions' %>
|
20
3
|
|
21
4
|
<div class="row mb-4">
|
22
5
|
<div class="col-sm-12">
|
@@ -28,81 +11,23 @@
|
|
28
11
|
</div>
|
29
12
|
</div>
|
30
13
|
|
31
|
-
|
32
|
-
<div class="col-sm-12">
|
33
|
-
<table class="processes bg-white table table-hover table-bordered table-striped mb-0 align-middle">
|
34
|
-
<tbody>
|
35
|
-
<% @message.metadata.to_h.except(:received_at, :key, :headers).each do |k, v| %>
|
36
|
-
<%==
|
37
|
-
partial(
|
38
|
-
'explorer/messages/detail',
|
39
|
-
locals: {
|
40
|
-
k: k,
|
41
|
-
v: v
|
42
|
-
}
|
43
|
-
)
|
44
|
-
%>
|
45
|
-
<% end %>
|
46
|
-
|
47
|
-
<%==
|
48
|
-
partial(
|
49
|
-
'explorer/messages/detail',
|
50
|
-
locals: {
|
51
|
-
k: 'bytesize',
|
52
|
-
v: format_memory(((@message.raw_payload&.bytesize || 0) / 1024.to_f).round(4))
|
53
|
-
}
|
54
|
-
)
|
55
|
-
%>
|
56
|
-
|
57
|
-
<%==
|
58
|
-
partial(
|
59
|
-
'explorer/messages/key',
|
60
|
-
locals: { message: @message }
|
61
|
-
)
|
62
|
-
%>
|
63
|
-
|
64
|
-
<%==
|
65
|
-
partial(
|
66
|
-
'explorer/messages/headers',
|
67
|
-
locals: { message: @message }
|
68
|
-
)
|
69
|
-
%>
|
70
|
-
</tbody>
|
71
|
-
</table>
|
72
|
-
</div>
|
73
|
-
</div>
|
14
|
+
<%== partial 'explorer/message/metadata' %>
|
74
15
|
</div>
|
75
16
|
|
76
17
|
<div class="container">
|
77
18
|
<div class="row mb-4">
|
78
19
|
<div class="col-sm-12">
|
79
|
-
<h5 class="mb-2">
|
20
|
+
<h5 class="mb-2 float-start">
|
80
21
|
Payload
|
81
22
|
</h5>
|
82
|
-
<hr/>
|
83
23
|
|
84
|
-
|
85
|
-
</div>
|
24
|
+
<%== partial 'explorer/message/payload_actions' %>
|
86
25
|
|
87
|
-
|
88
|
-
<div class="row">
|
89
|
-
<div class="col-sm-12 mb-4">
|
90
|
-
<% if @payload_error %>
|
91
|
-
<%== partial 'explorer/failed_deserialization' %>
|
92
|
-
<% end %>
|
26
|
+
<div class="clearfix"></div>
|
93
27
|
|
94
|
-
|
95
|
-
<div class="card-body">
|
96
|
-
<% if @payload_error %>
|
97
|
-
<pre class="m-0 p-0"><code class="wrapped json p-0 m-0"><%= @message.raw_payload %></code></pre>
|
98
|
-
<% else %>
|
99
|
-
<pre class="m-0 p-0"><code class="wrapped json p-0 m-0"><%= @pretty_payload %></code></pre>
|
100
|
-
<% end %>
|
101
|
-
</div>
|
102
|
-
</div>
|
103
|
-
</div>
|
28
|
+
<hr/>
|
104
29
|
</div>
|
105
|
-
|
106
|
-
|
107
|
-
|
30
|
+
</div>
|
31
|
+
|
32
|
+
<%== partial 'explorer/message/payload' %>
|
108
33
|
</div>
|
@@ -22,9 +22,7 @@
|
|
22
22
|
</span>
|
23
23
|
</td>
|
24
24
|
<td>
|
25
|
-
|
26
|
-
<%= details.poll_state %>
|
27
|
-
</span>
|
25
|
+
<%== poll_state_with_change_time_label(details.poll_state, details.poll_state_ch) %>
|
28
26
|
</td>
|
29
27
|
<td>
|
30
28
|
<span class="badge bg-success <%= lso_risk_state_bg(details) %> bg-opacity-100">
|
@@ -9,13 +9,13 @@
|
|
9
9
|
<%== offset_with_label topic_name, partition_id, details.committed_offset %>
|
10
10
|
</td>
|
11
11
|
<td>
|
12
|
-
<%== relative_time(Time.now - details.committed_offset_fd / 1_000) %>
|
12
|
+
<%== relative_time(Time.now - details.committed_offset_fd / 1_000.0) %>
|
13
13
|
</td>
|
14
14
|
<td>
|
15
15
|
<%== offset_with_label topic_name, partition_id, details.stored_offset %>
|
16
16
|
</td>
|
17
17
|
<td>
|
18
|
-
<%== relative_time(Time.now - details.stored_offset_fd / 1_000) %>
|
18
|
+
<%== relative_time(Time.now - details.stored_offset_fd / 1_000.0) %>
|
19
19
|
</td>
|
20
20
|
<td>
|
21
21
|
<%== offset_with_label topic_name, partition_id, details.lo_offset %>
|
@@ -24,13 +24,13 @@
|
|
24
24
|
<%== offset_with_label topic_name, partition_id, details.hi_offset %>
|
25
25
|
</td>
|
26
26
|
<td>
|
27
|
-
<%== relative_time(Time.now - details.hi_offset_fd / 1_000) %>
|
27
|
+
<%== relative_time(Time.now - details.hi_offset_fd / 1_000.0) %>
|
28
28
|
</td>
|
29
29
|
<td>
|
30
30
|
<%== offset_with_label topic_name, partition_id, details.ls_offset %>
|
31
31
|
</td>
|
32
32
|
<td>
|
33
|
-
<%== relative_time(Time.now - details.ls_offset_fd / 1_000) %>
|
33
|
+
<%== relative_time(Time.now - details.ls_offset_fd / 1_000.0) %>
|
34
34
|
</td>
|
35
35
|
<td>
|
36
36
|
<span class="badge bg-success <%= lso_risk_state_bg(details) %> bg-opacity-100">
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<tr class="align-middle <%= lso_risk_state_bg(details) %> status-row-<%= details.process.status %>">
|
2
|
+
<td>
|
3
|
+
<%= partition_id %>
|
4
|
+
</td>
|
5
|
+
<td>
|
6
|
+
<%== relative_time(Time.now - details.committed_offset_fd / 1_000.0) %>
|
7
|
+
</td>
|
8
|
+
<td>
|
9
|
+
<%== relative_time(Time.now - details.stored_offset_fd / 1_000.0) %>
|
10
|
+
</td>
|
11
|
+
<td>
|
12
|
+
<%== relative_time(Time.now - details.hi_offset_fd / 1_000.0) %>
|
13
|
+
</td>
|
14
|
+
<td>
|
15
|
+
<%== relative_time(Time.now - details.ls_offset_fd / 1_000.0) %>
|
16
|
+
</td>
|
17
|
+
<td>
|
18
|
+
<% change_in_seconds = details.poll_state_ch / 1_000.0 %>
|
19
|
+
|
20
|
+
<% if details.poll_state == 'active' %>
|
21
|
+
<span class="badge bg-secondary">
|
22
|
+
N/A
|
23
|
+
</span>
|
24
|
+
<% elsif change_in_seconds >= 60 * 60 * 31 * 12 %>
|
25
|
+
<span class="badge bg-secondary">
|
26
|
+
Until manual resume
|
27
|
+
</span>
|
28
|
+
<% else %>
|
29
|
+
<%== relative_time(Time.now + change_in_seconds) %>
|
30
|
+
<% end %>
|
31
|
+
</td>
|
32
|
+
</tr>
|
@@ -0,0 +1,66 @@
|
|
1
|
+
<%== view_title('Consumers groups changes details') %>
|
2
|
+
|
3
|
+
<% if @stats.empty? %>
|
4
|
+
<%== partial 'health/no_data' %>
|
5
|
+
<% else %>
|
6
|
+
<%== partial 'health/tabs' %>
|
7
|
+
<% end %>
|
8
|
+
|
9
|
+
|
10
|
+
<% @stats.each_with_index do |(cg_name, details), index| %>
|
11
|
+
<div class="container mb-5">
|
12
|
+
<div class="row mb-4">
|
13
|
+
<div class="col-sm-8">
|
14
|
+
<h4 class="mb-4"><%= cg_name %></h4>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
<div class="col-sm-4">
|
18
|
+
<span class="float-end">
|
19
|
+
Last rebalance:
|
20
|
+
<span class="badge bg-secondary">
|
21
|
+
<%== relative_time(details[:rebalanced_at]) %>
|
22
|
+
</span>
|
23
|
+
</span>
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
|
27
|
+
<div class="row mb-3">
|
28
|
+
<div class="col-sm-12">
|
29
|
+
<% topics = details[:topics] %>
|
30
|
+
<% topics.each_with_index do |(topic_name, partitions), index| %>
|
31
|
+
<table class="processes bg-white table table-hover table-bordered table-striped align-middle <%= (index+1 < topics.size) ? 'mb-5' : 'mb-3' %>">
|
32
|
+
<thead>
|
33
|
+
<tr class="align-middle">
|
34
|
+
<th colspan="12">
|
35
|
+
<h5 class="mb-0"><%= topic_name %></h4>
|
36
|
+
</th>
|
37
|
+
</tr>
|
38
|
+
<tr class="align-middle">
|
39
|
+
<th><%== sort_link('Partition', :id) %></th>
|
40
|
+
<th><%== sort_link('Committed offset change', :committed_offset_fd) %></th>
|
41
|
+
<th><%== sort_link('Stored offset change', :stored_offset_fd) %></th>
|
42
|
+
<th><%== sort_link('High offset change', :hi_offset_fd) %></th>
|
43
|
+
<th><%== sort_link('Last stable offset state', :lso_risk_state) %></th>
|
44
|
+
<th><%== sort_link('Pause state change', :poll_state_ch) %></th>
|
45
|
+
</tr>
|
46
|
+
</thead>
|
47
|
+
<tbody>
|
48
|
+
<% partitions.each do |partition_id, details| %>
|
49
|
+
<%==
|
50
|
+
partial(
|
51
|
+
'health/partition_times',
|
52
|
+
locals: {
|
53
|
+
topic_name: topic_name,
|
54
|
+
partition_id: partition_id,
|
55
|
+
details: details
|
56
|
+
}
|
57
|
+
)
|
58
|
+
%>
|
59
|
+
<% end %>
|
60
|
+
</tbody>
|
61
|
+
</table>
|
62
|
+
<% end %>
|
63
|
+
</div>
|
64
|
+
</div>
|
65
|
+
</div>
|
66
|
+
<% end %>
|
@@ -25,7 +25,7 @@
|
|
25
25
|
|
26
26
|
<div class="row mb-3">
|
27
27
|
<div class="col-sm-12">
|
28
|
-
<% topics = details[:topics]
|
28
|
+
<% topics = details[:topics] %>
|
29
29
|
<% topics.each_with_index do |(topic_name, partitions), index| %>
|
30
30
|
<table class="processes bg-white table table-hover table-bordered table-striped align-middle <%= (index+1 < topics.size) ? 'mb-5' : 'mb-3' %>">
|
31
31
|
<thead>
|
@@ -35,22 +35,22 @@
|
|
35
35
|
</th>
|
36
36
|
</tr>
|
37
37
|
<tr class="align-middle">
|
38
|
-
<th
|
39
|
-
<th
|
40
|
-
<th
|
41
|
-
<th
|
42
|
-
<th
|
43
|
-
<th
|
44
|
-
<th
|
45
|
-
<th
|
46
|
-
<th
|
47
|
-
<th
|
48
|
-
<th
|
49
|
-
<th
|
38
|
+
<th><%== sort_link('Partition', :id) %></th>
|
39
|
+
<th><%== sort_link(:lag_stored) %></th>
|
40
|
+
<th><%== sort_link(:committed_offset) %></th>
|
41
|
+
<th><%== sort_link('Committed offset change', :committed_offset_fd) %></th>
|
42
|
+
<th><%== sort_link(:stored_offset) %></th>
|
43
|
+
<th><%== sort_link('Stored offset change', :stored_offset_fd) %></th>
|
44
|
+
<th><%== sort_link('Low offset', :lo_offset) %></th>
|
45
|
+
<th><%== sort_link('High offset', :hi_offset) %></th>
|
46
|
+
<th><%== sort_link('High offset change', :hi_offset_fd) %></th>
|
47
|
+
<th><%== sort_link('Last stable offset', :ls_offset) %></th>
|
48
|
+
<th><%== sort_link('Last stable offset change', :ls_offset_fd) %></th>
|
49
|
+
<th><%== sort_link('Last stable offset state', :lso_risk_state) %></th>
|
50
50
|
</tr>
|
51
51
|
</thead>
|
52
52
|
<tbody>
|
53
|
-
<% partitions.
|
53
|
+
<% partitions.each do |partition_id, details| %>
|
54
54
|
<%==
|
55
55
|
partial(
|
56
56
|
'health/partition_offset',
|
@@ -25,7 +25,7 @@
|
|
25
25
|
|
26
26
|
<div class="row mb-3">
|
27
27
|
<div class="col-sm-12">
|
28
|
-
<% topics = details[:topics]
|
28
|
+
<% topics = details[:topics] %>
|
29
29
|
<% topics.each_with_index do |(topic_name, partitions), index| %>
|
30
30
|
<table class="processes bg-white table table-hover table-bordered table-striped align-middle <%= (index+1 < topics.size) ? 'mb-5' : 'mb-3' %>">
|
31
31
|
<thead>
|
@@ -35,19 +35,19 @@
|
|
35
35
|
</th>
|
36
36
|
</tr>
|
37
37
|
<tr class="align-middle">
|
38
|
-
<th
|
39
|
-
<th
|
40
|
-
<th
|
41
|
-
<th
|
42
|
-
<th
|
43
|
-
<th
|
44
|
-
<th
|
45
|
-
<th
|
46
|
-
<th
|
38
|
+
<th><%== sort_link('Partition', :id) %></th>
|
39
|
+
<th><%== sort_link(:lag_stored) %></th>
|
40
|
+
<th><%== sort_link('Lag stored trend', :lag_stored_d) %></th>
|
41
|
+
<th><%== sort_link(:committed_offset) %></th>
|
42
|
+
<th><%== sort_link(:stored_offset) %></th>
|
43
|
+
<th><%== sort_link(:fetch_state) %></th>
|
44
|
+
<th><%== sort_link(:poll_state) %></th>
|
45
|
+
<th><%== sort_link('LSO state', :lso_risk_state) %></th>
|
46
|
+
<th><%== sort_link('Process name', :name) %></th>
|
47
47
|
</tr>
|
48
48
|
</thead>
|
49
49
|
<tbody>
|
50
|
-
<% partitions.
|
50
|
+
<% partitions.each do |partition_id, details| %>
|
51
51
|
<%==
|
52
52
|
partial(
|
53
53
|
'health/partition',
|
@@ -0,0 +1,39 @@
|
|
1
|
+
<%== view_title('Pending jobs overview', hr: false) %>
|
2
|
+
|
3
|
+
<%== partial 'jobs/tabs' %>
|
4
|
+
|
5
|
+
<% if @jobs.empty? && params.current_page <= 1 %>
|
6
|
+
<%== partial 'jobs/no_jobs', locals: { type: 'pending' } %>
|
7
|
+
<% elsif @jobs.empty? %>
|
8
|
+
<%== partial 'shared/no_paginated_data' %>
|
9
|
+
<% else %>
|
10
|
+
<div class="container">
|
11
|
+
<div class="row mb-5">
|
12
|
+
<div class="col-sm-12">
|
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('Process', :name) %></th>
|
17
|
+
<th><%== sort_link(:topic) %></th>
|
18
|
+
<th><%== sort_link(:consumer) %></th>
|
19
|
+
<th><%== sort_link(:type) %></th>
|
20
|
+
<th><%== sort_link(:messages) %></th>
|
21
|
+
<th><%== sort_link(:first_offset) %></th>
|
22
|
+
<th><%== sort_link(:last_offset) %></th>
|
23
|
+
<th><%== sort_link(:committed_offset) %></th>
|
24
|
+
<th><%== sort_link('Created at', :updated_at, rev: true) %></th>
|
25
|
+
</tr>
|
26
|
+
</thead>
|
27
|
+
<tbody>
|
28
|
+
<%==
|
29
|
+
each_partial(
|
30
|
+
@jobs,
|
31
|
+
'jobs/job'
|
32
|
+
)
|
33
|
+
%>
|
34
|
+
</tbody>
|
35
|
+
</table>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
</div>
|
39
|
+
<% end %>
|
@@ -0,0 +1,39 @@
|
|
1
|
+
<%== view_title('Running jobs overview', hr: false) %>
|
2
|
+
|
3
|
+
<%== partial 'jobs/tabs' %>
|
4
|
+
|
5
|
+
<% if @jobs.empty? && params.current_page <= 1 %>
|
6
|
+
<%== partial 'jobs/no_jobs', locals: { type: 'running' } %>
|
7
|
+
<% elsif @jobs.empty? %>
|
8
|
+
<%== partial 'shared/no_paginated_data' %>
|
9
|
+
<% else %>
|
10
|
+
<div class="container">
|
11
|
+
<div class="row mb-5">
|
12
|
+
<div class="col-sm-12">
|
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('Process', :name) %></th>
|
17
|
+
<th><%== sort_link(:topic) %></th>
|
18
|
+
<th><%== sort_link(:consumer) %></th>
|
19
|
+
<th><%== sort_link(:type) %></th>
|
20
|
+
<th><%== sort_link(:messages) %></th>
|
21
|
+
<th><%== sort_link(:first_offset) %></th>
|
22
|
+
<th><%== sort_link(:last_offset) %></th>
|
23
|
+
<th><%== sort_link(:committed_offset) %></th>
|
24
|
+
<th><%== sort_link('Started at', :updated_at, rev: true) %></th>
|
25
|
+
</tr>
|
26
|
+
</thead>
|
27
|
+
<tbody>
|
28
|
+
<%==
|
29
|
+
each_partial(
|
30
|
+
@jobs,
|
31
|
+
'jobs/job'
|
32
|
+
)
|
33
|
+
%>
|
34
|
+
</tbody>
|
35
|
+
</table>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
</div>
|
39
|
+
<% end %>
|
@@ -13,9 +13,9 @@
|
|
13
13
|
<thead>
|
14
14
|
<tr class="align-middle">
|
15
15
|
<th>Subscription group</th>
|
16
|
-
<th
|
16
|
+
<th><%== sort_link('Topic', :name) %></th>
|
17
17
|
<th>Type</th>
|
18
|
-
<th
|
18
|
+
<th><%== sort_link('Active', :active?) %></th>
|
19
19
|
<th></th>
|
20
20
|
</tr>
|
21
21
|
</thead>
|
@@ -9,6 +9,15 @@
|
|
9
9
|
<span class="badge bg-secondary">
|
10
10
|
<%= topic.patterns.type %>
|
11
11
|
</span>
|
12
|
+
|
13
|
+
<% if subscription_group.multiplexing? %>
|
14
|
+
<span class="badge bg-secondary">
|
15
|
+
multiplexing
|
16
|
+
<%= subscription_group.multiplexing.min %>
|
17
|
+
-
|
18
|
+
<%= subscription_group.multiplexing.max %>
|
19
|
+
</span>
|
20
|
+
<% end %>
|
12
21
|
</td>
|
13
22
|
<td>
|
14
23
|
<span class="badge bg-<%= topic.active? ? 'success' : 'warning text-dark' %>">
|
@@ -19,6 +19,18 @@
|
|
19
19
|
)
|
20
20
|
%>
|
21
21
|
<% end %>
|
22
|
+
|
23
|
+
<% flat_hash(@topic.subscription_group.multiplexing.to_h).each do |k, v| %>
|
24
|
+
<%==
|
25
|
+
partial(
|
26
|
+
'routing/detail',
|
27
|
+
locals: {
|
28
|
+
k: "multiplexing.#{k}",
|
29
|
+
v: v
|
30
|
+
}
|
31
|
+
)
|
32
|
+
%>
|
33
|
+
<% end %>
|
22
34
|
</tbody>
|
23
35
|
</table>
|
24
36
|
</div>
|
@@ -15,7 +15,7 @@
|
|
15
15
|
</a>
|
16
16
|
</li>
|
17
17
|
<li class="nav-item ms-3">
|
18
|
-
<a class="nav-link <%= nav_class(start_with: '/jobs') %>" href="<%= root_path('jobs') %>">
|
18
|
+
<a class="nav-link <%= nav_class(start_with: '/jobs') %>" href="<%= root_path('jobs/running') %>">
|
19
19
|
Jobs
|
20
20
|
</a>
|
21
21
|
</li>
|
@@ -6,6 +6,16 @@ function updateTimeAgo() {
|
|
6
6
|
timeago.render(selection);
|
7
7
|
timeago.cancel()
|
8
8
|
}
|
9
|
+
|
10
|
+
var selection = document.getElementsByClassName('time-title')
|
11
|
+
var title = null
|
12
|
+
|
13
|
+
for (var i = 0; i < selection.length; i++) {
|
14
|
+
let element = selection[i]
|
15
|
+
|
16
|
+
title = element.getAttribute('title')
|
17
|
+
element.setAttribute('title', timeago.format(title))
|
18
|
+
}
|
9
19
|
}
|
10
20
|
|
11
21
|
// To prevent from flickering, the UI is initially hidden and visible when all the JS components
|
@@ -3,3 +3,19 @@
|
|
3
3
|
Cluster informations
|
4
4
|
</a>
|
5
5
|
</li>
|
6
|
+
|
7
|
+
<% if current_path.include?('/brokers') %>
|
8
|
+
<li class="breadcrumb-item">
|
9
|
+
<a href="<%= root_path('cluster', 'brokers') %>">
|
10
|
+
Brokers
|
11
|
+
</a>
|
12
|
+
</li>
|
13
|
+
<% end %>
|
14
|
+
|
15
|
+
<% if current_path.include?('/topics') %>
|
16
|
+
<li class="breadcrumb-item">
|
17
|
+
<a href="<%= root_path('cluster', 'topics') %>">
|
18
|
+
Topics
|
19
|
+
</a>
|
20
|
+
</li>
|
21
|
+
<% end %>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<div class="container">
|
2
|
+
<div class="row mb-4">
|
3
|
+
<div class="col-sm-12">
|
4
|
+
|
5
|
+
<ul class="nav nav-tabs">
|
6
|
+
<li class="nav-item">
|
7
|
+
<a
|
8
|
+
class="nav-link <%= nav_class(include: 'brokers') %>"
|
9
|
+
href="<%= root_path('cluster', 'brokers') %>"
|
10
|
+
>
|
11
|
+
Brokers
|
12
|
+
</a>
|
13
|
+
</li>
|
14
|
+
|
15
|
+
<li class="nav-item">
|
16
|
+
<a
|
17
|
+
class="nav-link <%= nav_class(include: 'topics') %>"
|
18
|
+
href="<%= root_path('cluster', 'topics') %>"
|
19
|
+
>
|
20
|
+
Topics
|
21
|
+
</a>
|
22
|
+
</li>
|
23
|
+
</ul>
|
24
|
+
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
</div>
|