rails_pulse 0.2.2 → 0.2.3
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/app/assets/stylesheets/rails_pulse/components/tags.css +2 -2
- data/app/controllers/concerns/chart_table_concern.rb +2 -0
- data/app/controllers/rails_pulse/application_controller.rb +1 -0
- data/app/controllers/rails_pulse/dashboard_controller.rb +12 -8
- data/app/controllers/rails_pulse/queries_controller.rb +12 -7
- data/app/controllers/rails_pulse/requests_controller.rb +8 -4
- data/app/controllers/rails_pulse/routes_controller.rb +13 -6
- data/app/models/concerns/rails_pulse/taggable.rb +63 -0
- data/app/models/rails_pulse/dashboard/charts/average_response_time.rb +12 -5
- data/app/models/rails_pulse/dashboard/charts/p95_response_time.rb +12 -5
- data/app/models/rails_pulse/dashboard/tables/slow_queries.rb +7 -0
- data/app/models/rails_pulse/dashboard/tables/slow_routes.rb +6 -0
- data/app/models/rails_pulse/queries/cards/average_query_times.rb +10 -6
- data/app/models/rails_pulse/queries/cards/execution_rate.rb +16 -10
- data/app/models/rails_pulse/queries/cards/percentile_query_times.rb +10 -6
- data/app/models/rails_pulse/queries/charts/average_query_times.rb +5 -2
- data/app/models/rails_pulse/queries/tables/index.rb +12 -2
- data/app/models/rails_pulse/requests/charts/average_response_times.rb +12 -6
- data/app/models/rails_pulse/routes/cards/average_response_times.rb +10 -6
- data/app/models/rails_pulse/routes/cards/error_rate_per_route.rb +10 -6
- data/app/models/rails_pulse/routes/cards/percentile_response_times.rb +10 -6
- data/app/models/rails_pulse/routes/cards/request_count_totals.rb +10 -6
- data/app/models/rails_pulse/routes/charts/average_response_times.rb +9 -5
- data/app/models/rails_pulse/routes/tables/index.rb +12 -2
- data/app/models/rails_pulse/summary.rb +55 -0
- data/app/views/layouts/rails_pulse/_global_filters.html.erb +9 -2
- data/app/views/rails_pulse/components/_active_filters.html.erb +36 -0
- data/app/views/rails_pulse/components/_page_header.html.erb +4 -0
- data/app/views/rails_pulse/dashboard/index.html.erb +4 -0
- data/app/views/rails_pulse/queries/index.html.erb +1 -1
- data/app/views/rails_pulse/requests/index.html.erb +1 -1
- data/app/views/rails_pulse/routes/index.html.erb +1 -1
- data/app/views/rails_pulse/tags/_tag_manager.html.erb +2 -2
- data/config/initializers/rails_charts_csp_patch.rb +9 -9
- data/lib/rails_pulse/cleanup_service.rb +8 -0
- data/lib/rails_pulse/engine.rb +25 -0
- data/lib/rails_pulse/version.rb +1 -1
- data/public/rails-pulse-assets/rails-pulse.css +1 -1
- data/public/rails-pulse-assets/rails-pulse.css.map +1 -1
- metadata +4 -3
- data/app/models/concerns/taggable.rb +0 -61
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails_pulse
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rails Pulse
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2025-10-
|
|
10
|
+
date: 2025-10-31 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: rails
|
|
@@ -247,7 +247,7 @@ files:
|
|
|
247
247
|
- app/jobs/rails_pulse/cleanup_job.rb
|
|
248
248
|
- app/jobs/rails_pulse/summary_job.rb
|
|
249
249
|
- app/mailers/rails_pulse/application_mailer.rb
|
|
250
|
-
- app/models/concerns/taggable.rb
|
|
250
|
+
- app/models/concerns/rails_pulse/taggable.rb
|
|
251
251
|
- app/models/rails_pulse/application_record.rb
|
|
252
252
|
- app/models/rails_pulse/dashboard/charts/average_response_time.rb
|
|
253
253
|
- app/models/rails_pulse/dashboard/charts/p95_response_time.rb
|
|
@@ -286,6 +286,7 @@ files:
|
|
|
286
286
|
- app/views/layouts/rails_pulse/_menu_items.html.erb
|
|
287
287
|
- app/views/layouts/rails_pulse/_sidebar_menu.html.erb
|
|
288
288
|
- app/views/layouts/rails_pulse/application.html.erb
|
|
289
|
+
- app/views/rails_pulse/components/_active_filters.html.erb
|
|
289
290
|
- app/views/rails_pulse/components/_code_panel.html.erb
|
|
290
291
|
- app/views/rails_pulse/components/_empty_state.html.erb
|
|
291
292
|
- app/views/rails_pulse/components/_metric_card.html.erb
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
module Taggable
|
|
2
|
-
extend ActiveSupport::Concern
|
|
3
|
-
|
|
4
|
-
included do
|
|
5
|
-
# Callbacks
|
|
6
|
-
before_save :ensure_tags_is_array
|
|
7
|
-
|
|
8
|
-
# Scopes with table name qualification to avoid ambiguity
|
|
9
|
-
scope :with_tag, ->(tag) { where("#{table_name}.tags LIKE ?", "%#{tag}%") }
|
|
10
|
-
scope :without_tag, ->(tag) { where.not("#{table_name}.tags LIKE ?", "%#{tag}%") }
|
|
11
|
-
scope :with_tags, -> { where("#{table_name}.tags IS NOT NULL AND #{table_name}.tags != '[]'") }
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
# Tag management methods
|
|
15
|
-
def tag_list
|
|
16
|
-
parsed_tags || []
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
def tag_list=(value)
|
|
20
|
-
self.tags = value.to_json
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
def has_tag?(tag)
|
|
24
|
-
tag_list.include?(tag.to_s)
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
def add_tag(tag)
|
|
28
|
-
current_tags = tag_list
|
|
29
|
-
unless current_tags.include?(tag.to_s)
|
|
30
|
-
current_tags << tag.to_s
|
|
31
|
-
self.tag_list = current_tags
|
|
32
|
-
save
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
def remove_tag(tag)
|
|
37
|
-
current_tags = tag_list
|
|
38
|
-
if current_tags.include?(tag.to_s)
|
|
39
|
-
current_tags.delete(tag.to_s)
|
|
40
|
-
self.tag_list = current_tags
|
|
41
|
-
save
|
|
42
|
-
end
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
private
|
|
46
|
-
|
|
47
|
-
def parsed_tags
|
|
48
|
-
return [] if tags.nil? || tags.empty?
|
|
49
|
-
JSON.parse(tags)
|
|
50
|
-
rescue JSON::ParserError
|
|
51
|
-
[]
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
def ensure_tags_is_array
|
|
55
|
-
if tags.nil?
|
|
56
|
-
self.tags = "[]"
|
|
57
|
-
elsif tags.is_a?(Array)
|
|
58
|
-
self.tags = tags.to_json
|
|
59
|
-
end
|
|
60
|
-
end
|
|
61
|
-
end
|