rails_error_dashboard 0.5.15 → 0.6.0
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/controllers/rails_error_dashboard/errors_controller.rb +31 -26
- data/app/helpers/rails_error_dashboard/application_helper.rb +12 -5
- data/app/views/layouts/rails_error_dashboard.html.erb +1217 -1935
- data/app/views/rails_error_dashboard/errors/_breadcrumbs_group.html.erb +4 -4
- data/app/views/rails_error_dashboard/errors/_co_occurring_errors.html.erb +1 -1
- data/app/views/rails_error_dashboard/errors/_discussion.html.erb +3 -3
- data/app/views/rails_error_dashboard/errors/_error_cascades.html.erb +1 -1
- data/app/views/rails_error_dashboard/errors/_error_row.html.erb +69 -79
- data/app/views/rails_error_dashboard/errors/_instance_variables.html.erb +1 -1
- data/app/views/rails_error_dashboard/errors/_issue_section.html.erb +1 -1
- data/app/views/rails_error_dashboard/errors/_local_variables.html.erb +1 -1
- data/app/views/rails_error_dashboard/errors/_pattern_insights.html.erb +2 -2
- data/app/views/rails_error_dashboard/errors/_request_context.html.erb +1 -1
- data/app/views/rails_error_dashboard/errors/_sidebar_metadata.html.erb +1 -1
- data/app/views/rails_error_dashboard/errors/_similar_errors.html.erb +1 -1
- data/app/views/rails_error_dashboard/errors/_timeline.html.erb +1 -1
- data/app/views/rails_error_dashboard/errors/actioncable_health_summary.html.erb +6 -6
- data/app/views/rails_error_dashboard/errors/activestorage_health_summary.html.erb +6 -6
- data/app/views/rails_error_dashboard/errors/analytics.html.erb +34 -50
- data/app/views/rails_error_dashboard/errors/cache_health_summary.html.erb +7 -7
- data/app/views/rails_error_dashboard/errors/correlation.html.erb +11 -11
- data/app/views/rails_error_dashboard/errors/database_health_summary.html.erb +114 -172
- data/app/views/rails_error_dashboard/errors/deprecations.html.erb +7 -7
- data/app/views/rails_error_dashboard/errors/diagnostic_dumps.html.erb +6 -6
- data/app/views/rails_error_dashboard/errors/index.html.erb +292 -620
- data/app/views/rails_error_dashboard/errors/job_health_summary.html.erb +7 -7
- data/app/views/rails_error_dashboard/errors/n_plus_one_summary.html.erb +7 -7
- data/app/views/rails_error_dashboard/errors/overview.html.erb +192 -363
- data/app/views/rails_error_dashboard/errors/platform_comparison.html.erb +11 -11
- data/app/views/rails_error_dashboard/errors/rack_attack_summary.html.erb +6 -6
- data/app/views/rails_error_dashboard/errors/releases.html.erb +6 -6
- data/app/views/rails_error_dashboard/errors/settings.html.erb +32 -52
- data/app/views/rails_error_dashboard/errors/show.html.erb +200 -203
- data/app/views/rails_error_dashboard/errors/swallowed_exceptions.html.erb +7 -7
- data/app/views/rails_error_dashboard/errors/user_impact.html.erb +6 -6
- data/lib/rails_error_dashboard/configuration.rb +6 -0
- data/lib/rails_error_dashboard/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: aa8243a13e9eccf5cedcffea0600d19a904e7dbba1b372dd3c633fece3ab6674
|
|
4
|
+
data.tar.gz: 0aa65c2bfd6038ebd7d35901d8889a4e2ffc07bf653746a43650d7a9b6685257
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c85d90b5c8e36466306e9bda5466b8cce46e8dae335c218d946cfde374d1243835d5ec3eae9457fb75f80dfe48a339e71cef7f1b0439d2ccc1419a123e8fab94
|
|
7
|
+
data.tar.gz: 016bdd5a313427c5b07c72a1808262514e74159fb60761ff6903c6d64dc7c1127032df1f8c6ea5da64f858322be6ed734e249a3026a9d4b7dd5a0b8e50239628
|
|
@@ -98,49 +98,49 @@ module RailsErrorDashboard
|
|
|
98
98
|
resolution_reference: params[:resolution_reference]
|
|
99
99
|
)
|
|
100
100
|
|
|
101
|
-
redirect_to error_path(@error)
|
|
101
|
+
redirect_to error_path(@error, **app_context_params)
|
|
102
102
|
end
|
|
103
103
|
|
|
104
104
|
# Phase 3: Workflow Integration Actions (via Commands)
|
|
105
105
|
|
|
106
106
|
def assign
|
|
107
107
|
@error = Commands::AssignError.call(params[:id], assigned_to: params[:assigned_to])
|
|
108
|
-
redirect_to error_path(@error)
|
|
108
|
+
redirect_to error_path(@error, **app_context_params)
|
|
109
109
|
end
|
|
110
110
|
|
|
111
111
|
def unassign
|
|
112
112
|
@error = Commands::UnassignError.call(params[:id])
|
|
113
|
-
redirect_to error_path(@error)
|
|
113
|
+
redirect_to error_path(@error, **app_context_params)
|
|
114
114
|
end
|
|
115
115
|
|
|
116
116
|
def update_priority
|
|
117
117
|
@error = Commands::UpdateErrorPriority.call(params[:id], priority_level: params[:priority_level])
|
|
118
|
-
redirect_to error_path(@error)
|
|
118
|
+
redirect_to error_path(@error, **app_context_params)
|
|
119
119
|
end
|
|
120
120
|
|
|
121
121
|
def snooze
|
|
122
122
|
@error = Commands::SnoozeError.call(params[:id], hours: params[:hours].to_i, reason: params[:reason])
|
|
123
|
-
redirect_to error_path(@error)
|
|
123
|
+
redirect_to error_path(@error, **app_context_params)
|
|
124
124
|
end
|
|
125
125
|
|
|
126
126
|
def unsnooze
|
|
127
127
|
@error = Commands::UnsnoozeError.call(params[:id])
|
|
128
|
-
redirect_to error_path(@error)
|
|
128
|
+
redirect_to error_path(@error, **app_context_params)
|
|
129
129
|
end
|
|
130
130
|
|
|
131
131
|
def mute
|
|
132
132
|
@error = Commands::MuteError.call(params[:id], muted_by: params[:muted_by], reason: params[:reason])
|
|
133
|
-
redirect_to error_path(@error)
|
|
133
|
+
redirect_to error_path(@error, **app_context_params)
|
|
134
134
|
end
|
|
135
135
|
|
|
136
136
|
def unmute
|
|
137
137
|
@error = Commands::UnmuteError.call(params[:id])
|
|
138
|
-
redirect_to error_path(@error)
|
|
138
|
+
redirect_to error_path(@error, **app_context_params)
|
|
139
139
|
end
|
|
140
140
|
|
|
141
141
|
def update_status
|
|
142
142
|
result = Commands::UpdateErrorStatus.call(params[:id], status: params[:status], comment: params[:comment])
|
|
143
|
-
redirect_to error_path(result[:error])
|
|
143
|
+
redirect_to error_path(result[:error], **app_context_params)
|
|
144
144
|
end
|
|
145
145
|
|
|
146
146
|
def create_issue
|
|
@@ -153,7 +153,7 @@ module RailsErrorDashboard
|
|
|
153
153
|
else
|
|
154
154
|
flash[:alert] = "Failed to create issue: #{result[:error]}"
|
|
155
155
|
end
|
|
156
|
-
redirect_to error_path(params[:id], anchor: "issue-tracking")
|
|
156
|
+
redirect_to error_path(params[:id], anchor: "issue-tracking", **app_context_params)
|
|
157
157
|
end
|
|
158
158
|
|
|
159
159
|
def link_issue
|
|
@@ -164,7 +164,7 @@ module RailsErrorDashboard
|
|
|
164
164
|
else
|
|
165
165
|
flash[:alert] = "Failed to link issue: #{result[:error]}"
|
|
166
166
|
end
|
|
167
|
-
redirect_to error_path(params[:id], anchor: "issue-tracking")
|
|
167
|
+
redirect_to error_path(params[:id], anchor: "issue-tracking", **app_context_params)
|
|
168
168
|
end
|
|
169
169
|
|
|
170
170
|
def analytics
|
|
@@ -205,7 +205,7 @@ module RailsErrorDashboard
|
|
|
205
205
|
# Check if feature is enabled
|
|
206
206
|
unless RailsErrorDashboard.configuration.enable_platform_comparison
|
|
207
207
|
flash[:alert] = "Platform Comparison is not enabled. Enable it in config/initializers/rails_error_dashboard.rb"
|
|
208
|
-
redirect_to errors_path
|
|
208
|
+
redirect_to errors_path(**app_context_params)
|
|
209
209
|
return
|
|
210
210
|
end
|
|
211
211
|
|
|
@@ -252,14 +252,14 @@ module RailsErrorDashboard
|
|
|
252
252
|
flash[:alert] = "Batch operation failed: #{result[:errors].join(', ')}"
|
|
253
253
|
end
|
|
254
254
|
|
|
255
|
-
redirect_to errors_path
|
|
255
|
+
redirect_to errors_path(**app_context_params)
|
|
256
256
|
end
|
|
257
257
|
|
|
258
258
|
def correlation
|
|
259
259
|
# Check if feature is enabled
|
|
260
260
|
unless RailsErrorDashboard.configuration.enable_error_correlation
|
|
261
261
|
flash[:alert] = "Error Correlation is not enabled. Enable it in config/initializers/rails_error_dashboard.rb"
|
|
262
|
-
redirect_to errors_path
|
|
262
|
+
redirect_to errors_path(**app_context_params)
|
|
263
263
|
return
|
|
264
264
|
end
|
|
265
265
|
|
|
@@ -299,7 +299,7 @@ module RailsErrorDashboard
|
|
|
299
299
|
def deprecations
|
|
300
300
|
unless RailsErrorDashboard.configuration.enable_breadcrumbs
|
|
301
301
|
flash[:alert] = "Breadcrumbs are not enabled. Enable them in config/initializers/rails_error_dashboard.rb"
|
|
302
|
-
redirect_to errors_path
|
|
302
|
+
redirect_to errors_path(**app_context_params)
|
|
303
303
|
return
|
|
304
304
|
end
|
|
305
305
|
|
|
@@ -319,7 +319,7 @@ module RailsErrorDashboard
|
|
|
319
319
|
def n_plus_one_summary
|
|
320
320
|
unless RailsErrorDashboard.configuration.enable_breadcrumbs
|
|
321
321
|
flash[:alert] = "Breadcrumbs are not enabled. Enable them in config/initializers/rails_error_dashboard.rb"
|
|
322
|
-
redirect_to errors_path
|
|
322
|
+
redirect_to errors_path(**app_context_params)
|
|
323
323
|
return
|
|
324
324
|
end
|
|
325
325
|
|
|
@@ -339,7 +339,7 @@ module RailsErrorDashboard
|
|
|
339
339
|
def cache_health_summary
|
|
340
340
|
unless RailsErrorDashboard.configuration.enable_breadcrumbs
|
|
341
341
|
flash[:alert] = "Breadcrumbs are not enabled. Enable them in config/initializers/rails_error_dashboard.rb"
|
|
342
|
-
redirect_to errors_path
|
|
342
|
+
redirect_to errors_path(**app_context_params)
|
|
343
343
|
return
|
|
344
344
|
end
|
|
345
345
|
|
|
@@ -360,7 +360,7 @@ module RailsErrorDashboard
|
|
|
360
360
|
def job_health_summary
|
|
361
361
|
unless RailsErrorDashboard.configuration.enable_system_health
|
|
362
362
|
flash[:alert] = "System health is not enabled. Enable it in config/initializers/rails_error_dashboard.rb"
|
|
363
|
-
redirect_to errors_path
|
|
363
|
+
redirect_to errors_path(**app_context_params)
|
|
364
364
|
return
|
|
365
365
|
end
|
|
366
366
|
|
|
@@ -380,7 +380,7 @@ module RailsErrorDashboard
|
|
|
380
380
|
def database_health_summary
|
|
381
381
|
unless RailsErrorDashboard.configuration.enable_system_health
|
|
382
382
|
flash[:alert] = "System health is not enabled. Enable it in config/initializers/rails_error_dashboard.rb"
|
|
383
|
-
redirect_to errors_path
|
|
383
|
+
redirect_to errors_path(**app_context_params)
|
|
384
384
|
return
|
|
385
385
|
end
|
|
386
386
|
|
|
@@ -416,7 +416,7 @@ module RailsErrorDashboard
|
|
|
416
416
|
else
|
|
417
417
|
flash[:alert] = "Swallowed exception detection is not enabled. Enable it in config/initializers/rails_error_dashboard.rb"
|
|
418
418
|
end
|
|
419
|
-
redirect_to errors_path
|
|
419
|
+
redirect_to errors_path(**app_context_params)
|
|
420
420
|
return
|
|
421
421
|
end
|
|
422
422
|
|
|
@@ -437,7 +437,7 @@ module RailsErrorDashboard
|
|
|
437
437
|
unless RailsErrorDashboard.configuration.enable_rack_attack_tracking &&
|
|
438
438
|
RailsErrorDashboard.configuration.enable_breadcrumbs
|
|
439
439
|
flash[:alert] = "Rack Attack tracking is not enabled. Enable enable_rack_attack_tracking and enable_breadcrumbs in config/initializers/rails_error_dashboard.rb"
|
|
440
|
-
redirect_to errors_path
|
|
440
|
+
redirect_to errors_path(**app_context_params)
|
|
441
441
|
return
|
|
442
442
|
end
|
|
443
443
|
|
|
@@ -458,7 +458,7 @@ module RailsErrorDashboard
|
|
|
458
458
|
unless RailsErrorDashboard.configuration.enable_actioncable_tracking &&
|
|
459
459
|
RailsErrorDashboard.configuration.enable_breadcrumbs
|
|
460
460
|
flash[:alert] = "ActionCable tracking is not enabled. Enable enable_actioncable_tracking and enable_breadcrumbs in config/initializers/rails_error_dashboard.rb"
|
|
461
|
-
redirect_to errors_path
|
|
461
|
+
redirect_to errors_path(**app_context_params)
|
|
462
462
|
return
|
|
463
463
|
end
|
|
464
464
|
|
|
@@ -479,7 +479,7 @@ module RailsErrorDashboard
|
|
|
479
479
|
unless RailsErrorDashboard.configuration.enable_activestorage_tracking &&
|
|
480
480
|
RailsErrorDashboard.configuration.enable_breadcrumbs
|
|
481
481
|
flash[:alert] = "ActiveStorage tracking is not enabled. Enable enable_activestorage_tracking and enable_breadcrumbs in config/initializers/rails_error_dashboard.rb"
|
|
482
|
-
redirect_to errors_path
|
|
482
|
+
redirect_to errors_path(**app_context_params)
|
|
483
483
|
return
|
|
484
484
|
end
|
|
485
485
|
|
|
@@ -499,7 +499,7 @@ module RailsErrorDashboard
|
|
|
499
499
|
def diagnostic_dumps
|
|
500
500
|
unless RailsErrorDashboard.configuration.enable_diagnostic_dump
|
|
501
501
|
flash[:alert] = "Diagnostic dumps are not enabled. Enable them in config/initializers/rails_error_dashboard.rb"
|
|
502
|
-
redirect_to errors_path
|
|
502
|
+
redirect_to errors_path(**app_context_params)
|
|
503
503
|
return
|
|
504
504
|
end
|
|
505
505
|
|
|
@@ -513,7 +513,7 @@ module RailsErrorDashboard
|
|
|
513
513
|
def create_diagnostic_dump
|
|
514
514
|
unless RailsErrorDashboard.configuration.enable_diagnostic_dump
|
|
515
515
|
flash[:alert] = "Diagnostic dumps are not enabled."
|
|
516
|
-
redirect_to errors_path
|
|
516
|
+
redirect_to errors_path(**app_context_params)
|
|
517
517
|
return
|
|
518
518
|
end
|
|
519
519
|
|
|
@@ -542,7 +542,7 @@ module RailsErrorDashboard
|
|
|
542
542
|
def enable_coverage
|
|
543
543
|
unless RailsErrorDashboard.configuration.enable_coverage_tracking
|
|
544
544
|
flash[:alert] = "Coverage tracking is not enabled in configuration."
|
|
545
|
-
redirect_to errors_path
|
|
545
|
+
redirect_to errors_path(**app_context_params)
|
|
546
546
|
return
|
|
547
547
|
end
|
|
548
548
|
|
|
@@ -595,6 +595,11 @@ module RailsErrorDashboard
|
|
|
595
595
|
@applications = Application.ordered_by_name.pluck(:name, :id)
|
|
596
596
|
end
|
|
597
597
|
|
|
598
|
+
# Preserves the application_id param across redirects
|
|
599
|
+
def app_context_params
|
|
600
|
+
@current_application_id.present? ? { application_id: @current_application_id } : {}
|
|
601
|
+
end
|
|
602
|
+
|
|
598
603
|
def fetch_platform_issue(error)
|
|
599
604
|
return nil unless error.external_issue_url.present? && error.external_issue_number.present?
|
|
600
605
|
return nil unless RailsErrorDashboard.configuration.enable_issue_tracking
|
|
@@ -26,15 +26,15 @@ module RailsErrorDashboard
|
|
|
26
26
|
def severity_color_var(severity)
|
|
27
27
|
case severity&.to_sym
|
|
28
28
|
when :critical
|
|
29
|
-
"var(--
|
|
29
|
+
"var(--status-critical)"
|
|
30
30
|
when :high
|
|
31
|
-
"var(--
|
|
31
|
+
"var(--status-warning)"
|
|
32
32
|
when :medium
|
|
33
|
-
"var(--
|
|
33
|
+
"var(--status-info)"
|
|
34
34
|
when :low
|
|
35
|
-
"var(--
|
|
35
|
+
"var(--text-tertiary)"
|
|
36
36
|
else
|
|
37
|
-
"var(--
|
|
37
|
+
"var(--text-tertiary)"
|
|
38
38
|
end
|
|
39
39
|
end
|
|
40
40
|
|
|
@@ -74,6 +74,13 @@ module RailsErrorDashboard
|
|
|
74
74
|
end
|
|
75
75
|
end
|
|
76
76
|
|
|
77
|
+
# Returns the current application context param for preserving app selection across navigation.
|
|
78
|
+
# Use this in link helpers: errors_path(app_context) or error_path(error, **app_context)
|
|
79
|
+
# @return [Hash] { application_id: X } if an app is selected, empty hash otherwise
|
|
80
|
+
def app_context
|
|
81
|
+
params[:application_id].present? ? { application_id: params[:application_id] } : {}
|
|
82
|
+
end
|
|
83
|
+
|
|
77
84
|
# Returns a sanitized hash of filter params safe for query links
|
|
78
85
|
# @param extra_keys [Array<Symbol>] Additional permitted keys for specific contexts
|
|
79
86
|
# @return [Hash] Whitelisted params for building URLs
|