karafka-web 0.10.0.rc2 → 0.10.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +1 -1
  3. data/CHANGELOG.md +11 -1
  4. data/Gemfile +1 -0
  5. data/Gemfile.lock +12 -4
  6. data/certs/cert.pem +26 -0
  7. data/karafka-web.gemspec +2 -2
  8. data/lib/karafka/web/pro/ui/app.rb +40 -0
  9. data/lib/karafka/web/pro/ui/controllers/commanding_controller.rb +4 -4
  10. data/lib/karafka/web/pro/ui/controllers/recurring_tasks_controller.rb +131 -0
  11. data/lib/karafka/web/pro/ui/views/consumers/_consumer_controls.erb +13 -12
  12. data/lib/karafka/web/pro/ui/views/recurring_tasks/_actions.erb +58 -0
  13. data/lib/karafka/web/pro/ui/views/recurring_tasks/_batch_actions.erb +45 -0
  14. data/lib/karafka/web/pro/ui/views/recurring_tasks/_breadcrumbs.erb +22 -0
  15. data/lib/karafka/web/pro/ui/views/recurring_tasks/_log.erb +26 -0
  16. data/lib/karafka/web/pro/ui/views/recurring_tasks/_not_active.erb +12 -0
  17. data/lib/karafka/web/pro/ui/views/recurring_tasks/_tabs.erb +17 -0
  18. data/lib/karafka/web/pro/ui/views/recurring_tasks/_task.erb +46 -0
  19. data/lib/karafka/web/pro/ui/views/recurring_tasks/logs.erb +34 -0
  20. data/lib/karafka/web/pro/ui/views/recurring_tasks/schedule.erb +43 -0
  21. data/lib/karafka/web/pro/ui/views/shared/_navigation.erb +10 -0
  22. data/lib/karafka/web/pro/ui/views/topics/replication.erb +1 -1
  23. data/lib/karafka/web/ui/helpers/application_helper.rb +8 -1
  24. data/lib/karafka/web/ui/models/recurring_tasks/log.rb +26 -0
  25. data/lib/karafka/web/ui/models/recurring_tasks/schedule.rb +86 -0
  26. data/lib/karafka/web/ui/models/recurring_tasks/task.rb +30 -0
  27. data/lib/karafka/web/ui/public/javascripts/application.js +1 -1
  28. data/lib/karafka/web/ui/public/javascripts/application.min.js +7 -7
  29. data/lib/karafka/web/ui/public/javascripts/application.min.js.br +0 -0
  30. data/lib/karafka/web/ui/public/javascripts/application.min.js.gz +0 -0
  31. data/lib/karafka/web/ui/public/javascripts/components/live_poll.js +36 -0
  32. data/lib/karafka/web/ui/public/stylesheets/application.css +5 -1
  33. data/lib/karafka/web/ui/public/stylesheets/application.min.css +2 -2
  34. data/lib/karafka/web/ui/public/stylesheets/application.min.css.br +0 -0
  35. data/lib/karafka/web/ui/public/stylesheets/application.min.css.gz +0 -0
  36. data/lib/karafka/web/ui/public/stylesheets/libs/tailwind.css +17 -5
  37. data/lib/karafka/web/ui/views/dashboard/_ranges_selector.erb +1 -1
  38. data/lib/karafka/web/ui/views/shared/_become_pro.erb +1 -1
  39. data/lib/karafka/web/ui/views/shared/_navigation.erb +11 -0
  40. data/lib/karafka/web/ui/views/shared/icons/_check.erb +3 -0
  41. data/lib/karafka/web/ui/views/shared/icons/_play.erb +3 -0
  42. data/lib/karafka/web/ui/views/status/info/_components.erb +48 -11
  43. data/lib/karafka/web/ui/views/ux/_data_table.erb +34 -4
  44. data/lib/karafka/web/ui/views/ux/_status_rows.erb +12 -0
  45. data/lib/karafka/web/version.rb +1 -1
  46. data.tar.gz.sig +0 -0
  47. metadata +41 -26
  48. metadata.gz.sig +0 -0
  49. data/certs/cert_chain.pem +0 -26
@@ -9,9 +9,22 @@ var livePollTimer = null;
9
9
  var oldDOM = null;
10
10
  var datePicker = null;
11
11
  var startURL = window.location.href;
12
+ let isHoveringOverClickable = false;
12
13
 
13
14
  // Enable live polling by default on the first visit
14
15
  function initLivePolling() {
16
+ document.addEventListener('mouseover', function(event) {
17
+ if (isElementClickable(event.target)) {
18
+ isHoveringOverClickable = true;
19
+ }
20
+ });
21
+
22
+ document.addEventListener('mouseout', function(event) {
23
+ if (isElementClickable(event.target)) {
24
+ isHoveringOverClickable = false;
25
+ }
26
+ });
27
+
15
28
  var polling = localStorage.karafkaLivePoll;
16
29
 
17
30
  if (polling != undefined) { return }
@@ -19,6 +32,28 @@ function initLivePolling() {
19
32
  localStorage.karafkaLivePoll = "enabled"
20
33
  }
21
34
 
35
+ function isElementClickable(element) {
36
+ // Check for common clickable elements
37
+ if (element.tagName === 'A' ||
38
+ element.tagName === 'BUTTON' ||
39
+ (element.tagName === 'INPUT' && (element.type === 'button' || element.type === 'submit')) ||
40
+ element.hasAttribute('onclick') ||
41
+ typeof element.onclick === 'function') {
42
+ return true;
43
+ }
44
+
45
+ // Check if the element is a <span> inside a .tab-container
46
+ if (element.tagName === 'SPAN' && element.closest('.tab-container')) {
47
+ return true;
48
+ }
49
+
50
+ return false;
51
+ }
52
+
53
+ function isUserHoveringOverClickable() {
54
+ return isHoveringOverClickable;
55
+ }
56
+
22
57
  // Check is there is any text selected in the Web-UI
23
58
  // It drives me crazy when I'm selecting things in Sidekiq Web-UI and the page is refreshed
24
59
  // This mitigates this problem for Karafka Web
@@ -44,6 +79,7 @@ function isCollapsingHappening() {
44
79
  // We should not poll and update if we have any text selected and we should not do it as well, when
45
80
  // datetime picker with time selection is present
46
81
  function isPollingPossible(check_url = false){
82
+ if (isUserHoveringOverClickable()) { return false }
47
83
  if (isAnyTextSelected()) { return false }
48
84
  if (isOffsetLookupCalendarVisible()) { return false }
49
85
  if (isAnyModalOpen()) { return false }
@@ -29,5 +29,9 @@ canvas {
29
29
  }
30
30
 
31
31
  table td.commands {
32
- min-width: 120px;
32
+ width: 150px;
33
+ }
34
+
35
+ table td.commands-inline-3 {
36
+ width: 180px
33
37
  }