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
@@ -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
|
@@ -16,7 +21,7 @@
|
|
16
21
|
</li>
|
17
22
|
|
18
23
|
<li class="nav-item ms-3">
|
19
|
-
<a class="nav-link <%= nav_class(start_with: '/health') %>" href="<%= root_path('health') %>">
|
24
|
+
<a class="nav-link <%= nav_class(start_with: '/health') %>" href="<%= root_path('health/overview') %>">
|
20
25
|
Health
|
21
26
|
</a>
|
22
27
|
</li>
|
@@ -31,7 +36,7 @@
|
|
31
36
|
</a>
|
32
37
|
</li>
|
33
38
|
<li class="nav-item ms-3">
|
34
|
-
<a class="nav-link <%= nav_class(start_with: '/errors') %>" href="<%= root_path('errors
|
39
|
+
<a class="nav-link <%= nav_class(start_with: '/errors') %>" href="<%= root_path('errors') %>">
|
35
40
|
Errors
|
36
41
|
</a>
|
37
42
|
</li>
|
@@ -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>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3
|
+
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 646.99998 136.1" xml:space="preserve" sodipodi:docname="logo.svg" width="647" height="136.10001" inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"><metadata id="metadata45"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/></cc:Work></rdf:RDF></metadata><defs id="defs43"/><sodipodi:namedview pagecolor="#6c757d" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1920" inkscape:window-height="1016" id="namedview41" showgrid="false" inkscape:zoom="1.3391547" inkscape:cx="198.39874" inkscape:cy="89.619887" inkscape:window-x="0" inkscape:window-y="27" inkscape:window-maximized="1" inkscape:current-layer="g22"/>
|
4
|
+
<style type="text/css" id="style2">
|
5
|
+
.st0{fill:#FFFFFF;}
|
6
|
+
.st1{fill:none;stroke:#0B0C1B;stroke-width:5.7629;stroke-miterlimit:10;}
|
7
|
+
.st2{fill:#BC2C40;}
|
8
|
+
.st3{fill:none;stroke:#0B0C1B;stroke-width:4.6103;stroke-linejoin:round;stroke-miterlimit:10;}
|
9
|
+
</style>
|
10
|
+
|
11
|
+
|
12
|
+
<g id="g22" transform="translate(-183.3,-50.9)">
|
13
|
+
<path d="m 217.7,151.7 -9.3,11.1 v 22.4 H 183.3 V 52.6 h 25.1 v 76.7 l 30.1,-37.1 h 29 l -33,39.2 36.2,53.7 h -30.1 z" id="path8" inkscape:connector-curvature="0" style="fill:#6c757d;fill-opacity:1"/>
|
14
|
+
<path d="m 314.6,90.4 c 7.3,0 15.4,2 24.4,9.5 v -7.7 h 23.6 v 64.5 c 0,10.9 1.4,18.3 5,27.6 l -24,1.8 c -1.6,-3.8 -2.5,-8.4 -3.2,-12.2 -7.7,8.6 -18.3,13.1 -28.3,13.1 -18.5,0 -36.9,-16.3 -36.9,-48.4 0,-32.1 20.1,-48.2 39.4,-48.2 z m 5.4,75.1 c 5.9,0 12.4,-3 17.6,-8.1 v -38.5 c -5.9,-5 -11.3,-7 -16.5,-7 -11.1,0 -20.2,8.8 -20.2,26.7 -0.1,18.4 8.9,26.9 19.1,26.9 z" id="path10" inkscape:connector-curvature="0" style="fill:#6c757d;fill-opacity:1"/>
|
15
|
+
<path d="m 389.7,92.2 h 23.6 v 24.6 c 5.6,-12.7 17.2,-23.3 32.8,-26.9 l 4.5,24.9 c -14.5,2.3 -27.6,13.9 -35.8,24.3 v 46.1 h -25.1 z" id="path12" inkscape:connector-curvature="0" style="fill:#6c757d;fill-opacity:1"/>
|
16
|
+
<path d="m 497.2,90.4 c 7.3,0 15.4,2 24.4,9.5 v -7.7 h 23.6 v 64.5 c 0,10.9 1.4,18.3 5,27.6 l -24,1.8 c -1.6,-3.8 -2.5,-8.4 -3.2,-12.2 -7.7,8.6 -18.3,13.1 -28.3,13.1 -18.5,0 -36.9,-16.3 -36.9,-48.4 -0.1,-32.1 20,-48.2 39.4,-48.2 z m 5.3,75.1 c 5.9,0 12.4,-3 17.6,-8.1 v -38.5 c -5.9,-5 -11.3,-7 -16.5,-7 -11.1,0 -20.2,8.8 -20.2,26.7 0,18.4 8.9,26.9 19.1,26.9 z" id="path14" inkscape:connector-curvature="0" style="fill:#6c757d;fill-opacity:1"/>
|
17
|
+
<path d="M 578.7,113.7 H 564.2 V 92.2 h 14.5 v -9.1 c 0,-18.6 9.5,-32.2 28.8,-32.2 5.7,0 12.4,1.1 20.1,3.6 l -4.8,21 c -4.1,-1.4 -7.2,-2 -9.9,-2 -6.6,0 -9.1,4.3 -9.1,10.6 v 8.2 h 23.8 v 21.5 h -23.8 v 71.5 h -25.1 z" id="path16" inkscape:connector-curvature="0" style="fill:#6c757d;fill-opacity:1"/>
|
18
|
+
<path d="m 680.4,151.7 -9.3,11.1 v 22.4 H 646 V 52.6 h 25.1 v 76.7 l 30.1,-37.1 h 29 l -33,39.2 36.2,53.7 h -30.1 z" id="path18" inkscape:connector-curvature="0" style="fill:#6c757d;fill-opacity:1"/>
|
19
|
+
<path d="m 777.3,90.4 c 7.3,0 15.4,2 24.4,9.5 v -7.7 h 23.6 v 64.5 c 0,10.9 1.4,18.3 5,27.6 l -24,1.8 c -1.6,-3.8 -2.5,-8.4 -3.2,-12.2 -7.7,8.6 -18.3,13.1 -28.3,13.1 -18.5,0 -36.9,-16.3 -36.9,-48.4 0,-32.1 20.1,-48.2 39.4,-48.2 z m 5.4,75.1 c 5.9,0 12.4,-3 17.6,-8.1 v -38.5 c -5.9,-5 -11.3,-7 -16.5,-7 -11.1,0 -20.2,8.8 -20.2,26.7 0,18.4 8.9,26.9 19.1,26.9 z" id="path20" inkscape:connector-curvature="0" style="fill:#6c757d;fill-opacity:1"/>
|
20
|
+
</g>
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
|
28
|
+
<style xmlns="" id="autoconsent-prehide"/></svg>
|
@@ -1,3 +1,4 @@
|
|
1
|
+
// Nicer display of time distance from a given event
|
1
2
|
function updateTimeAgo() {
|
2
3
|
var selection = document.querySelectorAll('time');
|
3
4
|
|
@@ -7,11 +8,15 @@ function updateTimeAgo() {
|
|
7
8
|
}
|
8
9
|
}
|
9
10
|
|
11
|
+
// To prevent from flickering, the UI is initially hidden and visible when all the JS components
|
12
|
+
// are fully initialized
|
10
13
|
function displayUi() {
|
11
14
|
var content = document.getElementById('content');
|
12
15
|
content.style.display = 'inherit';
|
13
16
|
}
|
14
17
|
|
18
|
+
// When using explorer, we can select the desired partition. This code redirects without having
|
19
|
+
// to press a button after a select
|
15
20
|
function redirectToPartition() {
|
16
21
|
var selector = document.getElementById('current-partition');
|
17
22
|
|
@@ -22,6 +27,27 @@ function redirectToPartition() {
|
|
22
27
|
});
|
23
28
|
}
|
24
29
|
|
30
|
+
// Binds to links and forms to make sure action is what user wants
|
31
|
+
function bindActionsConfirmations() {
|
32
|
+
var elements = document.getElementsByClassName('confirm-action')
|
33
|
+
var confirmation = 'Are you sure?'
|
34
|
+
|
35
|
+
for (var i = 0; i < elements.length; i++) {
|
36
|
+
let element = elements[i]
|
37
|
+
let action = 'click'
|
38
|
+
|
39
|
+
if (element.nodeName === 'FORM') {
|
40
|
+
action = 'submit'
|
41
|
+
}
|
42
|
+
|
43
|
+
element.addEventListener(action, function(event) {
|
44
|
+
if (!window.confirm(confirmation)) {
|
45
|
+
event.preventDefault();
|
46
|
+
}
|
47
|
+
})
|
48
|
+
}
|
49
|
+
}
|
50
|
+
|
25
51
|
function addListeners() {
|
26
52
|
bindPollingButtonClick();
|
27
53
|
setLivePollButton();
|
@@ -30,6 +56,10 @@ function addListeners() {
|
|
30
56
|
hljs.highlightAll();
|
31
57
|
updateTimeAgo();
|
32
58
|
redirectToPartition();
|
59
|
+
manageTabs();
|
60
|
+
manageCharts();
|
61
|
+
bindActionsConfirmations();
|
62
|
+
loadOffsetLookupDatePicker();
|
33
63
|
displayUi();
|
34
64
|
}
|
35
65
|
|