rails_event_viewer 0.4.1 → 0.4.2
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/app/controllers/rails_event_viewer/dashboard_controller.rb +1 -1
- data/app/helpers/rails_event_viewer/application_helper.rb +2 -2
- data/app/views/rails_event_viewer/dashboard/index.html.erb +1 -1
- data/app/views/rails_event_viewer/events/index.html.erb +1 -1
- data/app/views/rails_event_viewer/events/show.html.erb +2 -2
- data/app/views/rails_event_viewer/groups/show.html.erb +5 -1
- data/lib/rails_event_viewer/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2f0fbcd20727cc831799761717b5a0ef9a0976c62ca2452aea717000583d9ad5
|
|
4
|
+
data.tar.gz: 7e00df561d871f1d1df3de563f14c55bee8f0bcd006b6ce8b46db6b86bc7cb07
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9ac49e92ecd8fdf32706ca80986bb501d28ca8f9b6af3b12402501d120540e06281cf1f25c43420aaf8f4c3a721c49eef53d66f384e66bd4f4bf3f7ed3bb1f10
|
|
7
|
+
data.tar.gz: c8b0877b48cd334a30bd8345f9f9b9085227df835dd651e35c4ef0b63615ef4fbd466a2818bde6017469cc255e35d4ff63ebd9d349f7ea6bbffea3d4f9c258b3
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.2 (2026-10-04)
|
|
4
|
+
|
|
5
|
+
Changed:
|
|
6
|
+
|
|
7
|
+
- Group durations are rounded and show only the two largest units.
|
|
8
|
+
- Source paths on the event page are shortened. Hover shows the full path.
|
|
9
|
+
- The event count has thousands separators.
|
|
10
|
+
- The events-by-type chart uses ten distinct colours.
|
|
11
|
+
- Timeline offsets step through minutes, hours and days.
|
|
12
|
+
- The 24-hour chart starts on a whole hour.
|
|
13
|
+
|
|
3
14
|
## 0.4.1 (2026-10-03)
|
|
4
15
|
|
|
5
16
|
Added:
|
|
@@ -8,7 +8,7 @@ module RailsEventViewer
|
|
|
8
8
|
|
|
9
9
|
if analytics_supported?
|
|
10
10
|
@events_by_type = current_adapter.counts_by_name(limit: 10)
|
|
11
|
-
@events_over_time = current_adapter.events_over_time(range: 24.hours.ago.., interval: :hour)
|
|
11
|
+
@events_over_time = current_adapter.events_over_time(range: 24.hours.ago.beginning_of_hour.., interval: :hour)
|
|
12
12
|
else
|
|
13
13
|
@events_by_type = {}
|
|
14
14
|
@events_over_time = {}
|
|
@@ -58,12 +58,12 @@ module RailsEventViewer
|
|
|
58
58
|
def format_duration(seconds)
|
|
59
59
|
return "-" unless seconds
|
|
60
60
|
|
|
61
|
-
duration = ActiveSupport::Duration.build(seconds)
|
|
61
|
+
duration = ActiveSupport::Duration.build(seconds.round)
|
|
62
62
|
parts = duration.parts
|
|
63
63
|
|
|
64
64
|
return "0 seconds" if parts.empty? || parts == { seconds: 0 }
|
|
65
65
|
|
|
66
|
-
parts.map { |unit, value|
|
|
66
|
+
parts.first(2).map { |unit, value|
|
|
67
67
|
unit_name = value == 1 ? unit.to_s.singularize : unit.to_s
|
|
68
68
|
"#{value} #{unit_name}"
|
|
69
69
|
}.to_sentence
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
html: '<div id="%{id}" class="h-full w-full">%{loading}</div>',
|
|
56
56
|
content_for: nil,
|
|
57
57
|
donut: true,
|
|
58
|
-
colors: ["#4F46E5", "#10B981", "#F59E0B", "#EF4444", "#8B5CF6", "#EC4899", "#06B6D4", "#84CC16"] %>
|
|
58
|
+
colors: ["#4F46E5", "#10B981", "#F59E0B", "#EF4444", "#8B5CF6", "#EC4899", "#06B6D4", "#84CC16", "#64748B", "#92400E"] %>
|
|
59
59
|
<% else %>
|
|
60
60
|
<div class="flex items-center justify-center h-full text-gray-500">
|
|
61
61
|
No events to display
|
|
@@ -97,8 +97,8 @@
|
|
|
97
97
|
<div class="px-6 py-4">
|
|
98
98
|
<dt class="text-sm font-medium text-gray-500">Source Location</dt>
|
|
99
99
|
<dd class="mt-1 text-sm text-gray-900">
|
|
100
|
-
<code class="bg-gray-100 px-2 py-1 rounded text-xs break-all">
|
|
101
|
-
<%=
|
|
100
|
+
<code class="bg-gray-100 px-2 py-1 rounded text-xs break-all" title="<%= filepath %>">
|
|
101
|
+
<%= event_short_filepath(@event) %>:<%= @event[:source_line] %>
|
|
102
102
|
</code>
|
|
103
103
|
<% label = @event[:source_label] %>
|
|
104
104
|
<% if label.present? %>
|
|
@@ -64,8 +64,12 @@
|
|
|
64
64
|
+<%= (offset * 1000).round %>ms
|
|
65
65
|
<% elsif offset < 60 %>
|
|
66
66
|
+<%= offset.round(1) %>s
|
|
67
|
+
<% elsif offset < 1.hour %>
|
|
68
|
+
+<%= (offset / 1.minute).round %>m
|
|
69
|
+
<% elsif offset < 1.day %>
|
|
70
|
+
+<%= (offset / 1.hour).round %>h
|
|
67
71
|
<% else %>
|
|
68
|
-
+<%= (offset /
|
|
72
|
+
+<%= (offset / 1.day).round %>d
|
|
69
73
|
<% end %>
|
|
70
74
|
</span>
|
|
71
75
|
</div>
|