karafka-web 0.6.3 → 0.7.0
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 +13 -4
- data/CHANGELOG.md +119 -5
- data/Gemfile +1 -0
- data/Gemfile.lock +27 -24
- data/README.md +2 -0
- data/bin/rspecs +6 -0
- data/certs/cert_chain.pem +21 -21
- data/docker-compose.yml +22 -0
- data/karafka-web.gemspec +3 -3
- data/lib/karafka/web/app.rb +6 -2
- data/lib/karafka/web/cli.rb +51 -47
- data/lib/karafka/web/config.rb +33 -9
- data/lib/karafka/web/contracts/base.rb +32 -0
- data/lib/karafka/web/contracts/config.rb +63 -0
- data/lib/karafka/web/deserializer.rb +10 -1
- data/lib/karafka/web/errors.rb +29 -7
- data/lib/karafka/web/installer.rb +58 -148
- data/lib/karafka/web/management/base.rb +34 -0
- data/lib/karafka/web/management/clean_boot_file.rb +31 -0
- data/lib/karafka/web/management/create_initial_states.rb +101 -0
- data/lib/karafka/web/management/create_topics.rb +127 -0
- data/lib/karafka/web/management/delete_topics.rb +28 -0
- data/lib/karafka/web/management/enable.rb +82 -0
- data/lib/karafka/web/management/extend_boot_file.rb +37 -0
- data/lib/karafka/web/processing/consumer.rb +73 -17
- data/lib/karafka/web/processing/consumers/aggregators/base.rb +56 -0
- data/lib/karafka/web/processing/consumers/aggregators/metrics.rb +154 -0
- data/lib/karafka/web/processing/consumers/aggregators/state.rb +180 -0
- data/lib/karafka/web/processing/consumers/contracts/aggregated_stats.rb +32 -0
- data/lib/karafka/web/processing/consumers/contracts/metrics.rb +53 -0
- data/lib/karafka/web/processing/consumers/contracts/process.rb +19 -0
- data/lib/karafka/web/processing/consumers/contracts/state.rb +49 -0
- data/lib/karafka/web/processing/consumers/contracts/topic_stats.rb +21 -0
- data/lib/karafka/web/processing/consumers/metrics.rb +29 -0
- data/lib/karafka/web/processing/consumers/schema_manager.rb +56 -0
- data/lib/karafka/web/processing/consumers/state.rb +6 -9
- data/lib/karafka/web/processing/time_series_tracker.rb +130 -0
- data/lib/karafka/web/tracking/consumers/contracts/consumer_group.rb +2 -2
- data/lib/karafka/web/tracking/consumers/contracts/job.rb +2 -1
- data/lib/karafka/web/tracking/consumers/contracts/partition.rb +14 -1
- data/lib/karafka/web/tracking/consumers/contracts/report.rb +10 -8
- data/lib/karafka/web/tracking/consumers/contracts/subscription_group.rb +2 -2
- data/lib/karafka/web/tracking/consumers/contracts/topic.rb +2 -2
- data/lib/karafka/web/tracking/consumers/listeners/processing.rb +6 -2
- data/lib/karafka/web/tracking/consumers/listeners/statistics.rb +15 -1
- data/lib/karafka/web/tracking/consumers/reporter.rb +14 -6
- data/lib/karafka/web/tracking/consumers/sampler.rb +80 -39
- data/lib/karafka/web/tracking/contracts/error.rb +2 -1
- data/lib/karafka/web/ui/app.rb +20 -10
- data/lib/karafka/web/ui/base.rb +56 -6
- data/lib/karafka/web/ui/controllers/base.rb +28 -0
- data/lib/karafka/web/ui/controllers/become_pro.rb +1 -1
- data/lib/karafka/web/ui/controllers/cluster.rb +12 -6
- data/lib/karafka/web/ui/controllers/consumers.rb +4 -2
- data/lib/karafka/web/ui/controllers/dashboard.rb +32 -0
- data/lib/karafka/web/ui/controllers/errors.rb +19 -6
- data/lib/karafka/web/ui/controllers/jobs.rb +4 -2
- data/lib/karafka/web/ui/controllers/requests/params.rb +28 -0
- data/lib/karafka/web/ui/controllers/responses/redirect.rb +29 -0
- data/lib/karafka/web/ui/helpers/application_helper.rb +57 -14
- data/lib/karafka/web/ui/helpers/paths_helper.rb +48 -0
- data/lib/karafka/web/ui/lib/hash_proxy.rb +18 -6
- data/lib/karafka/web/ui/lib/paginations/base.rb +61 -0
- data/lib/karafka/web/ui/lib/paginations/offset_based.rb +96 -0
- data/lib/karafka/web/ui/lib/paginations/page_based.rb +70 -0
- data/lib/karafka/web/ui/lib/paginations/paginators/arrays.rb +33 -0
- data/lib/karafka/web/ui/lib/paginations/paginators/base.rb +23 -0
- data/lib/karafka/web/ui/lib/paginations/paginators/partitions.rb +52 -0
- data/lib/karafka/web/ui/lib/paginations/paginators/sets.rb +85 -0
- data/lib/karafka/web/ui/lib/paginations/watermark_offsets_based.rb +75 -0
- data/lib/karafka/web/ui/lib/ttl_cache.rb +82 -0
- data/lib/karafka/web/ui/models/cluster_info.rb +59 -0
- data/lib/karafka/web/ui/models/consumers_metrics.rb +46 -0
- data/lib/karafka/web/ui/models/{state.rb → consumers_state.rb} +6 -2
- data/lib/karafka/web/ui/models/health.rb +37 -7
- data/lib/karafka/web/ui/models/message.rb +123 -39
- data/lib/karafka/web/ui/models/metrics/aggregated.rb +196 -0
- data/lib/karafka/web/ui/models/metrics/charts/aggregated.rb +50 -0
- data/lib/karafka/web/ui/models/metrics/charts/topics.rb +109 -0
- data/lib/karafka/web/ui/models/metrics/topics.rb +101 -0
- data/lib/karafka/web/ui/models/partition.rb +27 -0
- data/lib/karafka/web/ui/models/process.rb +12 -1
- data/lib/karafka/web/ui/models/status.rb +110 -22
- data/lib/karafka/web/ui/models/visibility_filter.rb +33 -0
- data/lib/karafka/web/ui/pro/app.rb +87 -19
- data/lib/karafka/web/ui/pro/controllers/cluster.rb +11 -0
- data/lib/karafka/web/ui/pro/controllers/consumers.rb +13 -7
- data/lib/karafka/web/ui/pro/controllers/dashboard.rb +54 -0
- data/lib/karafka/web/ui/pro/controllers/dlq.rb +1 -2
- data/lib/karafka/web/ui/pro/controllers/errors.rb +46 -10
- data/lib/karafka/web/ui/pro/controllers/explorer.rb +145 -15
- data/lib/karafka/web/ui/pro/controllers/health.rb +10 -2
- data/lib/karafka/web/ui/pro/controllers/messages.rb +62 -0
- data/lib/karafka/web/ui/pro/controllers/routing.rb +44 -0
- data/lib/karafka/web/ui/pro/views/consumers/_breadcrumbs.erb +7 -1
- data/lib/karafka/web/ui/pro/views/consumers/_consumer.erb +1 -1
- data/lib/karafka/web/ui/pro/views/consumers/_counters.erb +7 -5
- data/lib/karafka/web/ui/pro/views/consumers/consumer/_job.erb +3 -3
- data/lib/karafka/web/ui/pro/views/consumers/consumer/_metrics.erb +5 -4
- data/lib/karafka/web/ui/pro/views/consumers/consumer/_partition.erb +13 -4
- data/lib/karafka/web/ui/pro/views/consumers/consumer/_subscription_group.erb +3 -2
- data/lib/karafka/web/ui/pro/views/consumers/consumer/_tabs.erb +7 -0
- data/lib/karafka/web/ui/pro/views/consumers/details.erb +21 -0
- data/lib/karafka/web/ui/pro/views/consumers/index.erb +4 -2
- data/lib/karafka/web/ui/pro/views/dashboard/_ranges_selector.erb +39 -0
- data/lib/karafka/web/ui/pro/views/dashboard/index.erb +82 -0
- data/lib/karafka/web/ui/pro/views/dlq/_topic.erb +1 -1
- data/lib/karafka/web/ui/pro/views/errors/_breadcrumbs.erb +8 -6
- data/lib/karafka/web/ui/pro/views/errors/_error.erb +2 -2
- data/lib/karafka/web/ui/pro/views/errors/_partition_option.erb +1 -1
- data/lib/karafka/web/ui/pro/views/errors/_table.erb +21 -0
- data/lib/karafka/web/ui/pro/views/errors/_title_with_select.erb +31 -0
- data/lib/karafka/web/ui/pro/views/errors/index.erb +9 -56
- data/lib/karafka/web/ui/pro/views/errors/partition.erb +17 -0
- data/lib/karafka/web/ui/pro/views/errors/show.erb +1 -1
- data/lib/karafka/web/ui/pro/views/explorer/_breadcrumbs.erb +6 -4
- data/lib/karafka/web/ui/pro/views/explorer/_filtered.erb +16 -0
- data/lib/karafka/web/ui/pro/views/explorer/_message.erb +14 -4
- data/lib/karafka/web/ui/pro/views/explorer/_no_topics.erb +7 -0
- data/lib/karafka/web/ui/pro/views/explorer/_partition_option.erb +3 -3
- data/lib/karafka/web/ui/pro/views/explorer/_topic.erb +1 -1
- data/lib/karafka/web/ui/pro/views/explorer/index.erb +12 -8
- data/lib/karafka/web/ui/pro/views/explorer/messages/_headers.erb +15 -0
- data/lib/karafka/web/ui/pro/views/explorer/messages/_key.erb +12 -0
- data/lib/karafka/web/ui/pro/views/explorer/partition/_details.erb +35 -0
- data/lib/karafka/web/ui/pro/views/explorer/partition/_messages.erb +1 -0
- data/lib/karafka/web/ui/pro/views/explorer/partition.erb +6 -4
- data/lib/karafka/web/ui/pro/views/explorer/show.erb +48 -5
- data/lib/karafka/web/ui/pro/views/explorer/topic/_details.erb +23 -0
- data/lib/karafka/web/ui/pro/views/explorer/topic/_empty.erb +3 -0
- data/lib/karafka/web/ui/pro/views/explorer/topic/_limited.erb +4 -0
- data/lib/karafka/web/ui/pro/views/explorer/topic.erb +51 -0
- data/lib/karafka/web/ui/pro/views/health/_breadcrumbs.erb +16 -0
- data/lib/karafka/web/ui/pro/views/health/_no_data.erb +9 -0
- data/lib/karafka/web/ui/pro/views/health/_partition.erb +17 -15
- data/lib/karafka/web/ui/pro/views/health/_partition_offset.erb +40 -0
- data/lib/karafka/web/ui/pro/views/health/_tabs.erb +27 -0
- data/lib/karafka/web/ui/pro/views/health/offsets.erb +71 -0
- data/lib/karafka/web/ui/pro/views/health/overview.erb +68 -0
- data/lib/karafka/web/ui/pro/views/jobs/_job.erb +6 -3
- data/lib/karafka/web/ui/pro/views/jobs/index.erb +4 -1
- data/lib/karafka/web/ui/pro/views/routing/_consumer_group.erb +37 -0
- data/lib/karafka/web/ui/pro/views/routing/_detail.erb +25 -0
- data/lib/karafka/web/ui/pro/views/routing/_topic.erb +23 -0
- data/lib/karafka/web/ui/pro/views/routing/index.erb +10 -0
- data/lib/karafka/web/ui/pro/views/routing/show.erb +26 -0
- data/lib/karafka/web/ui/pro/views/shared/_navigation.erb +7 -10
- data/lib/karafka/web/ui/public/images/logo-gray.svg +28 -0
- data/lib/karafka/web/ui/public/javascripts/application.js +30 -0
- data/lib/karafka/web/ui/public/javascripts/chart.min.js +14 -0
- data/lib/karafka/web/ui/public/javascripts/charts.js +330 -0
- data/lib/karafka/web/ui/public/javascripts/datepicker.js +6 -0
- data/lib/karafka/web/ui/public/javascripts/live_poll.js +39 -12
- data/lib/karafka/web/ui/public/javascripts/offset_datetime.js +74 -0
- data/lib/karafka/web/ui/public/javascripts/tabs.js +59 -0
- data/lib/karafka/web/ui/public/stylesheets/application.css +11 -0
- data/lib/karafka/web/ui/public/stylesheets/datepicker.min.css +12 -0
- data/lib/karafka/web/ui/views/cluster/_no_partitions.erb +3 -0
- data/lib/karafka/web/ui/views/cluster/_partition.erb +20 -22
- data/lib/karafka/web/ui/views/cluster/index.erb +6 -1
- data/lib/karafka/web/ui/views/consumers/_consumer.erb +1 -1
- data/lib/karafka/web/ui/views/consumers/_counters.erb +6 -4
- data/lib/karafka/web/ui/views/consumers/_summary.erb +3 -3
- data/lib/karafka/web/ui/views/consumers/index.erb +3 -1
- data/lib/karafka/web/ui/views/dashboard/_feature_pro.erb +3 -0
- data/lib/karafka/web/ui/views/dashboard/_not_enough_data.erb +15 -0
- data/lib/karafka/web/ui/views/dashboard/_ranges_selector.erb +23 -0
- data/lib/karafka/web/ui/views/dashboard/index.erb +95 -0
- data/lib/karafka/web/ui/views/errors/_detail.erb +12 -0
- data/lib/karafka/web/ui/views/errors/_error.erb +2 -2
- data/lib/karafka/web/ui/views/errors/show.erb +1 -1
- data/lib/karafka/web/ui/views/jobs/index.erb +3 -1
- data/lib/karafka/web/ui/views/layout.erb +10 -3
- data/lib/karafka/web/ui/views/routing/_consumer_group.erb +8 -6
- data/lib/karafka/web/ui/views/routing/_detail.erb +2 -2
- data/lib/karafka/web/ui/views/routing/_topic.erb +1 -1
- data/lib/karafka/web/ui/views/routing/show.erb +1 -1
- data/lib/karafka/web/ui/views/shared/_brand.erb +2 -2
- data/lib/karafka/web/ui/views/shared/_chart.erb +14 -0
- data/lib/karafka/web/ui/views/shared/_content.erb +2 -2
- data/lib/karafka/web/ui/views/shared/_feature_pro.erb +1 -1
- data/lib/karafka/web/ui/views/shared/_flashes.erb +9 -0
- data/lib/karafka/web/ui/views/shared/_footer.erb +22 -0
- data/lib/karafka/web/ui/views/shared/_header.erb +15 -9
- data/lib/karafka/web/ui/views/shared/_live_poll.erb +7 -0
- data/lib/karafka/web/ui/views/shared/_navigation.erb +5 -8
- data/lib/karafka/web/ui/views/shared/_no_paginated_data.erb +9 -0
- data/lib/karafka/web/ui/views/shared/_pagination.erb +17 -13
- data/lib/karafka/web/ui/views/shared/_tab_nav.erb +7 -0
- data/lib/karafka/web/ui/views/shared/exceptions/not_found.erb +34 -32
- data/lib/karafka/web/ui/views/shared/exceptions/pro_only.erb +45 -43
- data/lib/karafka/web/ui/views/status/failures/_consumers_reports_schema_state.erb +15 -0
- data/lib/karafka/web/ui/views/status/failures/_enabled.erb +8 -0
- data/lib/karafka/web/ui/views/status/failures/_initial_consumers_metrics.erb +11 -0
- data/lib/karafka/web/ui/views/status/failures/{_initial_state.erb → _initial_consumers_state.erb} +3 -3
- data/lib/karafka/web/ui/views/status/failures/_partitions.erb +14 -6
- data/lib/karafka/web/ui/views/status/info/_components.erb +21 -1
- data/lib/karafka/web/ui/views/status/show.erb +62 -5
- data/lib/karafka/web/ui/views/status/successes/_enabled.erb +1 -0
- data/lib/karafka/web/ui/views/status/warnings/_replication.erb +19 -0
- data/lib/karafka/web/version.rb +1 -1
- data/lib/karafka/web.rb +11 -0
- data.tar.gz.sig +0 -0
- metadata +124 -39
- metadata.gz.sig +0 -0
- data/lib/karafka/web/processing/consumers/aggregator.rb +0 -130
- data/lib/karafka/web/tracking/contracts/base.rb +0 -34
- data/lib/karafka/web/ui/lib/paginate_array.rb +0 -38
- data/lib/karafka/web/ui/pro/views/explorer/_encryption_enabled.erb +0 -18
- data/lib/karafka/web/ui/pro/views/explorer/partition/_watermark_offsets.erb +0 -10
- data/lib/karafka/web/ui/pro/views/health/index.erb +0 -60
- /data/lib/karafka/web/ui/pro/views/explorer/{_detail.erb → messages/_detail.erb} +0 -0
@@ -6,15 +6,21 @@
|
|
6
6
|
|
7
7
|
<title>Karafka</title>
|
8
8
|
|
9
|
-
<
|
10
|
-
<
|
11
|
-
<
|
12
|
-
<
|
13
|
-
<script type="text/javascript" src="<%= root_path('javascripts/application.js') %>"></script>
|
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
|
+
<link href="<%= asset_path('stylesheets/application.css') %>" rel="stylesheet">
|
14
13
|
|
15
|
-
<
|
16
|
-
<
|
17
|
-
<
|
14
|
+
<script type="module" 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>
|
18
|
+
<script type="text/javascript" src="<%= asset_path('javascripts/live_poll.js') %>"></script>
|
19
|
+
<script type="text/javascript" src="<%= asset_path('javascripts/tabs.js') %>"></script>
|
20
|
+
<script type="text/javascript" src="<%= asset_path('javascripts/charts.js') %>"></script>
|
21
|
+
<script type="text/javascript" src="<%= asset_path('javascripts/datepicker.js') %>"></script>
|
22
|
+
<script type="text/javascript" src="<%= asset_path('javascripts/offset_datetime.js') %>"></script>
|
23
|
+
<script type="text/javascript" src="<%= asset_path('javascripts/application.js') %>"></script>
|
18
24
|
|
19
|
-
<link rel="icon" href="<%=
|
25
|
+
<link rel="icon" href="<%= asset_path('images/favicon.ico') %>">
|
20
26
|
</head>
|
@@ -4,6 +4,11 @@
|
|
4
4
|
|
5
5
|
<div class="collapse navbar-collapse" id="navbarNav">
|
6
6
|
<ul class="navbar-nav">
|
7
|
+
<li class="nav-item ms-3">
|
8
|
+
<a class="nav-link <%= nav_class(start_with: '/dashboard') %>" href="<%= root_path('dashboard') %>">
|
9
|
+
Dashboard
|
10
|
+
</a>
|
11
|
+
</li>
|
7
12
|
<li class="nav-item ms-3">
|
8
13
|
<a class="nav-link <%= nav_class(start_with: '/consumers') %>" href="<%= root_path('consumers') %>">
|
9
14
|
Consumers
|
@@ -52,11 +57,3 @@
|
|
52
57
|
</li>
|
53
58
|
</ul>
|
54
59
|
</div>
|
55
|
-
|
56
|
-
<ul class="nav navbar-nav navbar-right">
|
57
|
-
<li>
|
58
|
-
<span class="btn btn-secondary btn-sm" id="live-poll" data-on="Live polling" data-off="Live poll">
|
59
|
-
Live poll
|
60
|
-
</a>
|
61
|
-
</li>
|
62
|
-
</ul>
|
@@ -1,28 +1,32 @@
|
|
1
|
-
<% if @
|
2
|
-
<div id="pagination" class="container mb-
|
1
|
+
<% if @pagination && @pagination.paginate? %>
|
2
|
+
<div id="pagination" class="container mb-4">
|
3
3
|
<div class="row">
|
4
4
|
<nav>
|
5
5
|
<ul class="pagination justify-content-center">
|
6
|
-
<li class="page-item <%= 'disabled'
|
7
|
-
<a class="page-link" href="<%= current_path(
|
6
|
+
<li class="page-item <%= 'disabled' unless @pagination.first_offset? %>">
|
7
|
+
<a class="page-link" href="<%= current_path(@pagination.offset_key => @pagination.first_offset) %>">
|
8
8
|
<span>«</span>
|
9
9
|
</a>
|
10
10
|
</li>
|
11
11
|
|
12
|
-
<li class="page-item <%= 'disabled'
|
13
|
-
<a class="page-link" href="<%= current_path(
|
12
|
+
<li class="page-item <%= 'disabled' unless @pagination.previous_offset? %>">
|
13
|
+
<a class="page-link" href="<%= current_path(@pagination.offset_key => @pagination.previous_offset) %>">
|
14
14
|
<span>‹ Prev</span>
|
15
15
|
</a>
|
16
16
|
</li>
|
17
17
|
|
18
|
-
|
19
|
-
<
|
20
|
-
<
|
21
|
-
|
22
|
-
|
18
|
+
<% if @pagination.current_offset? %>
|
19
|
+
<li class="page-item active disabled">
|
20
|
+
<a class="page-link" href="<%= current_path(@pagination.offset_key => @pagination.current_offset) %>">
|
21
|
+
<span>
|
22
|
+
<%= @pagination.current_label %>
|
23
|
+
</span>
|
24
|
+
</a>
|
25
|
+
</li>
|
26
|
+
<% end %>
|
23
27
|
|
24
|
-
<li class="page-item <%= 'disabled' unless @
|
25
|
-
<a class="page-link" href="<%= current_path(
|
28
|
+
<li class="page-item <%= 'disabled' unless @pagination.next_offset? %>">
|
29
|
+
<a class="page-link" href="<%= current_path(@pagination.offset_key => @pagination.next_offset) %>">
|
26
30
|
<span>Next ›</span>
|
27
31
|
</a>
|
28
32
|
</li>
|
@@ -1,41 +1,43 @@
|
|
1
|
-
<
|
2
|
-
<div
|
3
|
-
<div class="
|
4
|
-
<
|
1
|
+
<main>
|
2
|
+
<div id="content">
|
3
|
+
<div class="d-flex align-items-center justify-content-center vh-100">
|
4
|
+
<div class="error-message text-center">
|
5
|
+
<h1 class="display-1 fw-bold">404</h1>
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
</p>
|
12
|
-
|
13
|
-
<div class="lead">
|
14
|
-
<p class="mb-5">
|
15
|
-
The page you're looking for doesn't exist.
|
7
|
+
<p class="fs-3 md-5">
|
8
|
+
<span class="text-danger">
|
9
|
+
Oops!
|
10
|
+
</span>
|
11
|
+
Page not found.
|
16
12
|
</p>
|
17
13
|
|
18
|
-
<
|
19
|
-
|
20
|
-
|
14
|
+
<div class="lead">
|
15
|
+
<p class="mb-5">
|
16
|
+
The page you're looking for doesn't exist.
|
17
|
+
</p>
|
21
18
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
<li>You have used <code>bundle exec karafka-web install</code> to initialize the Web UI</li>
|
26
|
-
<li>You have a working connection with your Kafka cluster</li>
|
27
|
-
<li>The resource you requested exists</li>
|
28
|
-
</ul>
|
19
|
+
<p>
|
20
|
+
Please make sure, that:
|
21
|
+
</p>
|
29
22
|
|
30
|
-
|
31
|
-
|
32
|
-
|
23
|
+
<ul class="mb-5 text-start">
|
24
|
+
<li>You have visited the <a href="<%= root_path('status') %>">Status</a> page to troubleshoot any potential issues</li>
|
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>
|
27
|
+
<li>You have a working connection with your Kafka cluster</li>
|
28
|
+
<li>The resource you requested exists</li>
|
29
|
+
</ul>
|
33
30
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
31
|
+
<p class="mb-5">
|
32
|
+
If you were looking for a given process or other real-time information, the state might have changed, and the information you are looking for no longer exists.
|
33
|
+
</p>
|
34
|
+
|
35
|
+
<p>
|
36
|
+
<a href="<%= root_path %>" class="btn btn-primary">Go Home</a>
|
37
|
+
<a href="<%= root_path('status') %>" class="btn btn-success">Status page</a>
|
38
|
+
</p>
|
39
|
+
</div>
|
38
40
|
</div>
|
39
41
|
</div>
|
40
42
|
</div>
|
41
|
-
</
|
43
|
+
</main>
|
@@ -1,48 +1,50 @@
|
|
1
|
-
<
|
2
|
-
<div
|
3
|
-
|
4
|
-
|
5
|
-
<
|
6
|
-
|
7
|
-
|
8
|
-
<
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
<div class="lead">
|
17
|
-
<p class="mb-5">
|
18
|
-
Open Source software is great, but it is only sometimes sustainable, especially for projects with high-quality expectations.
|
19
|
-
|
20
|
-
Please help us make the Karafka ecosystem better by subscribing to our
|
21
|
-
<a target="_blank" href="https://karafka.io/#become-pro">Pro</a>
|
22
|
-
offering.
|
1
|
+
<main>
|
2
|
+
<div id="content">
|
3
|
+
<div class="d-flex align-items-center justify-content-center vh-100">
|
4
|
+
|
5
|
+
<div class="error-message text-center">
|
6
|
+
<h1 class="display-1 fw-bold">Pro feature</h1>
|
7
|
+
|
8
|
+
<p class="fs-3 md-5">
|
9
|
+
<span class="text-danger">
|
10
|
+
Oops!
|
11
|
+
</span>
|
12
|
+
This Web UI feature is available only to
|
13
|
+
<a href="karafka.io/#become-pro" target="_blank">Pro</a>
|
14
|
+
users.
|
23
15
|
</p>
|
24
16
|
|
25
|
-
<
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
<
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
17
|
+
<div class="lead">
|
18
|
+
<p class="mb-5">
|
19
|
+
Open Source software is great, but it is only sometimes sustainable, especially for projects with high-quality expectations.
|
20
|
+
|
21
|
+
Please help us make the Karafka ecosystem better by subscribing to our
|
22
|
+
<a target="_blank" href="https://karafka.io/#become-pro">Pro</a>
|
23
|
+
offering.
|
24
|
+
</p>
|
25
|
+
|
26
|
+
<p>
|
27
|
+
Karafka Pro includes:
|
28
|
+
</p>
|
29
|
+
|
30
|
+
<ul class="mb-5 text-start">
|
31
|
+
<li>Enhanced Web UI with all the features</li>
|
32
|
+
<li>Topics data explorer</li>
|
33
|
+
<li>Enhanced metrics reporting</li>
|
34
|
+
<li>High throughput data processing-related features</li>
|
35
|
+
<li>At Rest Encryption</li>
|
36
|
+
<li>Commercial-friendly license</li>
|
37
|
+
<li>Priority support</li>
|
38
|
+
<li>Architecture consultations</li>
|
39
|
+
</ul>
|
40
|
+
|
41
|
+
<p>
|
42
|
+
<a href="<%= root_path %>" class="btn btn-primary">Go Home</a>
|
43
|
+
<a href="https://karafka.io/#become-pro" class="btn btn-success" target="_blank">Become Pro!</a>
|
44
|
+
</p>
|
45
|
+
</div>
|
44
46
|
</div>
|
45
|
-
</div>
|
46
47
|
|
48
|
+
</div>
|
47
49
|
</div>
|
48
|
-
</
|
50
|
+
</main>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<p>
|
2
|
+
Incompatible consumer reports detected.
|
3
|
+
</p>
|
4
|
+
|
5
|
+
<p>
|
6
|
+
It means that the <code>karafka server</code> process responsible for Web-UI state materialization runs under an older version than the one that sends reports. This process stopped processing incoming reports and the Web-UI data will not be refreshed until the problem is resolved.
|
7
|
+
</p>
|
8
|
+
|
9
|
+
<p>
|
10
|
+
To fix this, you must ensure that all the <code>karafka server</code> processes run using the same <code>karafka-web</code> version.
|
11
|
+
</p>
|
12
|
+
|
13
|
+
<p class="mb-0">
|
14
|
+
Please note that this should not cause any dashboard metrics losses. Once it is resolved, Karafka Web-UI will catch up.
|
15
|
+
</p>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<p>
|
2
|
+
The initial consumers metrics for the Web UI were not created.
|
3
|
+
</p>
|
4
|
+
|
5
|
+
<p>
|
6
|
+
It means that the <code>bundle exec karafka-web migrate</code> was not executed or failed.
|
7
|
+
</p>
|
8
|
+
|
9
|
+
<p class="mb-0">
|
10
|
+
To fix this, you need to ensure that the <code>bundle exec karafka-web migrate</code> runs successfully.
|
11
|
+
</p>
|
data/lib/karafka/web/ui/views/status/failures/{_initial_state.erb → _initial_consumers_state.erb}
RENAMED
@@ -1,11 +1,11 @@
|
|
1
1
|
<p>
|
2
|
-
The initial state for the Web UI was not created.
|
2
|
+
The initial consumers state for the Web UI was not created.
|
3
3
|
</p>
|
4
4
|
|
5
5
|
<p>
|
6
6
|
It means that the <code>bundle exec karafka-web install</code> was not executed or failed.
|
7
7
|
</p>
|
8
8
|
|
9
|
-
<p>
|
10
|
-
To fix this, you need to ensure that the <code>bundle exec karafka-web
|
9
|
+
<p class="mb-0">
|
10
|
+
To fix this, you need to ensure that the <code>bundle exec karafka-web migrate</code> runs successfully.
|
11
11
|
</p>
|
@@ -1,11 +1,19 @@
|
|
1
1
|
<p>
|
2
|
-
|
3
|
-
<code><%= Karafka::Web.config.topics.consumers.states %></code>
|
4
|
-
and
|
5
|
-
<code><%= Karafka::Web.config.topics.consumers.reports %></code>
|
6
|
-
topics need to be configured with <strong>exactly</strong> one partition.
|
2
|
+
Following topics need to be configured with <strong>exactly</strong> one partition:
|
7
3
|
</p>
|
8
4
|
|
5
|
+
<ul>
|
6
|
+
<li>
|
7
|
+
<code><%= Karafka::Web.config.topics.consumers.states %></code>
|
8
|
+
</li>
|
9
|
+
<li>
|
10
|
+
<code><%= Karafka::Web.config.topics.consumers.reports %></code>
|
11
|
+
</li>
|
12
|
+
<li>
|
13
|
+
<code><%= Karafka::Web.config.topics.consumers.metrics %></code>
|
14
|
+
</li>
|
15
|
+
</ul>
|
16
|
+
|
9
17
|
<p>
|
10
18
|
Your current setup contains the following:
|
11
19
|
</p>
|
@@ -13,7 +21,7 @@
|
|
13
21
|
<ul class="mb-0">
|
14
22
|
<% details.each do |name, details| %>
|
15
23
|
<li>
|
16
|
-
<code><%= name %> </code> with <code><%= details[:partitions]
|
24
|
+
<code><%= name %> </code> with <code><%= details[:partitions] %></code> partitions.
|
17
25
|
</li>
|
18
26
|
<% end %>
|
19
27
|
</ul>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
Below you can find information about your setup. This can be helpful when debugging or reporting bugs and issues.
|
3
3
|
</p>
|
4
4
|
|
5
|
-
<p
|
5
|
+
<p>
|
6
6
|
<span class="badge bg-secondary">
|
7
7
|
<%= @sampler.ruby_version %>
|
8
8
|
</span>
|
@@ -36,4 +36,24 @@
|
|
36
36
|
waterdrop
|
37
37
|
<%= @sampler.waterdrop_version %>
|
38
38
|
</span>
|
39
|
+
|
40
|
+
<% if Object.const_defined?(:Rails, false) %>
|
41
|
+
<span class="badge bg-secondary">
|
42
|
+
rails
|
43
|
+
<%= Rails.gem_version %>
|
44
|
+
</span>
|
45
|
+
<% end %>
|
39
46
|
</p>
|
47
|
+
|
48
|
+
<hr/>
|
49
|
+
|
50
|
+
<p>
|
51
|
+
Below you can find information about internal Karafka Web-UI topics:
|
52
|
+
</p>
|
53
|
+
|
54
|
+
<ul class="mb-0">
|
55
|
+
<li>Errors: <code><%= Karafka::Web.config.topics.errors %></code></li>
|
56
|
+
<li>Consumers reports: <code><%= Karafka::Web.config.topics.consumers.reports %></code></li>
|
57
|
+
<li>Consumers states: <code><%= Karafka::Web.config.topics.consumers.states %></code></li>
|
58
|
+
<li>Consumers metrics: <code><%= Karafka::Web.config.topics.consumers.metrics %></code></li>
|
59
|
+
</ul>
|
@@ -1,8 +1,23 @@
|
|
1
1
|
<%== view_title('Web UI status details') %>
|
2
2
|
|
3
|
-
<div class="container
|
3
|
+
<div class="container">
|
4
4
|
<div class="row">
|
5
5
|
<div class="col-lg-10 offset-md-1">
|
6
|
+
<%==
|
7
|
+
partial(
|
8
|
+
"status/#{@status.enabled.to_s}",
|
9
|
+
locals: {
|
10
|
+
title: 'Web-UI setup in karafka.rb',
|
11
|
+
description: partial(
|
12
|
+
"status/#{@status.enabled.partial_namespace}/enabled",
|
13
|
+
locals: {
|
14
|
+
details: @status.enabled.details
|
15
|
+
}
|
16
|
+
)
|
17
|
+
}
|
18
|
+
)
|
19
|
+
%>
|
20
|
+
|
6
21
|
<%==
|
7
22
|
partial(
|
8
23
|
"status/#{@status.connection.to_s}",
|
@@ -50,13 +65,43 @@
|
|
50
65
|
|
51
66
|
<%==
|
52
67
|
partial(
|
53
|
-
"status/#{@status.
|
68
|
+
"status/#{@status.replication.to_s}",
|
69
|
+
locals: {
|
70
|
+
title: 'Replication factors',
|
71
|
+
description: partial(
|
72
|
+
'status/warnings/replication',
|
73
|
+
locals: {
|
74
|
+
details: @status.replication.details
|
75
|
+
}
|
76
|
+
)
|
77
|
+
}
|
78
|
+
)
|
79
|
+
%>
|
80
|
+
|
81
|
+
<%==
|
82
|
+
partial(
|
83
|
+
"status/#{@status.initial_consumers_state.to_s}",
|
54
84
|
locals: {
|
55
|
-
title: 'Initial state presence',
|
85
|
+
title: 'Initial consumers state presence',
|
56
86
|
description: partial(
|
57
|
-
'status/failures/
|
87
|
+
'status/failures/initial_consumers_state',
|
58
88
|
locals: {
|
59
|
-
details: @status.
|
89
|
+
details: @status.initial_consumers_state.details
|
90
|
+
}
|
91
|
+
)
|
92
|
+
}
|
93
|
+
)
|
94
|
+
%>
|
95
|
+
|
96
|
+
<%==
|
97
|
+
partial(
|
98
|
+
"status/#{@status.initial_consumers_metrics.to_s}",
|
99
|
+
locals: {
|
100
|
+
title: 'Initial consumers metrics presence',
|
101
|
+
description: partial(
|
102
|
+
'status/failures/initial_consumers_metrics',
|
103
|
+
locals: {
|
104
|
+
details: @status.initial_consumers_metrics.details
|
60
105
|
}
|
61
106
|
)
|
62
107
|
}
|
@@ -93,6 +138,18 @@
|
|
93
138
|
)
|
94
139
|
%>
|
95
140
|
|
141
|
+
<%==
|
142
|
+
partial(
|
143
|
+
"status/#{@status.consumers_reports_schema_state.to_s}",
|
144
|
+
locals: {
|
145
|
+
title: 'Consumers reports schema compatibility',
|
146
|
+
description: partial(
|
147
|
+
'status/failures/consumers_reports_schema_state'
|
148
|
+
)
|
149
|
+
}
|
150
|
+
)
|
151
|
+
%>
|
152
|
+
|
96
153
|
<%==
|
97
154
|
partial(
|
98
155
|
"status/#{@status.pro_subscription.to_s}",
|
@@ -0,0 +1 @@
|
|
1
|
+
<%# Expected to be empty. No content on success needed. %>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<p>
|
2
|
+
It is recommended to have a replication factor greater than <code>1</code> for all the Karafka Web UI topics in a production environment.
|
3
|
+
</p>
|
4
|
+
|
5
|
+
<p>
|
6
|
+
Current replication factors for Karafka Web UI topics:
|
7
|
+
</p>
|
8
|
+
|
9
|
+
<ul>
|
10
|
+
<% details.each do |name, details| %>
|
11
|
+
<li>
|
12
|
+
<code><%= name %></code>: <code><%= details[:replication] %></code>
|
13
|
+
</li>
|
14
|
+
<% end %>
|
15
|
+
</ul>
|
16
|
+
|
17
|
+
<p>
|
18
|
+
Please ensure all those topics have a replication factor of at least <code>2</code>.
|
19
|
+
</p>
|
data/lib/karafka/web/version.rb
CHANGED
data/lib/karafka/web.rb
CHANGED
@@ -5,6 +5,8 @@
|
|
5
5
|
roda
|
6
6
|
etc
|
7
7
|
open3
|
8
|
+
zlib
|
9
|
+
securerandom
|
8
10
|
].each { |lib| require lib }
|
9
11
|
|
10
12
|
module Karafka
|
@@ -30,7 +32,16 @@ module Karafka
|
|
30
32
|
# Activates all the needed routing and sets up listener, etc
|
31
33
|
# This needs to run **after** the optional configuration of the web component
|
32
34
|
def enable!
|
35
|
+
# Make sure config is as expected
|
36
|
+
# It should be configured before enabling the Web UI
|
37
|
+
Contracts::Config.new.validate!(config.to_h)
|
38
|
+
|
33
39
|
Installer.new.enable!
|
40
|
+
|
41
|
+
# Inject correct settings for the Web-UI sessions plugin based on the user configuration
|
42
|
+
# We cannot configure this automatically like other Roda plugins because it requires safe
|
43
|
+
# custom values provided by our user
|
44
|
+
App.engine.plugin(:sessions, **config.ui.sessions.to_h)
|
34
45
|
end
|
35
46
|
end
|
36
47
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|