rails_error_dashboard 0.1.26 → 0.1.27

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6456524b66057579a3c19c95088fb025a7fc90134454b7db6cf262e66fef0c92
4
- data.tar.gz: fb2b37bf6a3f36551ece4592f7a37374a0e752bb002c6d11ac4769f74eb31e64
3
+ metadata.gz: 2dfa475005d810cf2797830e0e00df4ad5b83f7e63df2b8c859ce8c1a4aa555e
4
+ data.tar.gz: d35282497e6f04be43816e1473e941e7e1e797ab276082643148504fc11d1806
5
5
  SHA512:
6
- metadata.gz: f7702832f4867db494539b679f2edae3b730ef5970012998cd3ed1532fa5afa3d229209ccc901735d19f29e3a8fee9c8892b70a15316c41d2070f1ed9ab25372
7
- data.tar.gz: d1dea03fd9c0e60f512dc9d6d1a2914f554e1760ff1b340605c512b3ae29450cafd14935096525d6919fc0f97961aefa7c89f160b71508c4d51152cac5cc2cb4
6
+ metadata.gz: 03d48971cf4056b8fcf8facc6a8355484647ba725d65a56bdf93e448e5a84b2406784b9a05818a2285e89b49ae1b2eea1f798b43be4c4a273d123c411f755d57
7
+ data.tar.gz: e70c135a00a15f7325eb10a0c58be45ecf1b8e05f1b7eeb42e538450e07cb69a68a36816d78b49a0c3e5089b58a251bfef45d1155cf3cdc58c3a804cb9d53e20
@@ -62,7 +62,6 @@ module RailsErrorDashboard
62
62
  filter_options = Queries::FilterOptions.call(application_id: @current_application_id)
63
63
  @error_types = filter_options[:error_types]
64
64
  @platforms = filter_options[:platforms]
65
- @applications = filter_options[:applications]
66
65
  end
67
66
 
68
67
  def show
@@ -289,6 +288,7 @@ module RailsErrorDashboard
289
288
 
290
289
  def set_application_context
291
290
  @current_application_id = params[:application_id].presence
291
+ @applications = Application.ordered_by_name.pluck(:name, :id)
292
292
  end
293
293
 
294
294
  def authenticate_dashboard_user!
@@ -46,28 +46,28 @@
46
46
  function downloadErrorJSON() {
47
47
  const errorData = {
48
48
  id: <%= @error.id %>,
49
- error_type: <%= raw @error.error_type.to_json %>,
50
- message: <%= raw @error.message.to_json %>,
51
- backtrace: <%= raw @error.backtrace.to_json %>,
52
- occurred_at: <%= raw @error.occurred_at.to_json %>,
53
- first_seen_at: <%= raw @error.first_seen_at.to_json %>,
54
- last_seen_at: <%= raw @error.last_seen_at.to_json %>,
49
+ error_type: <%= json_escape @error.error_type.to_json %>,
50
+ message: <%= json_escape @error.message.to_json %>,
51
+ backtrace: <%= json_escape @error.backtrace.to_json %>,
52
+ occurred_at: <%= json_escape @error.occurred_at.to_json %>,
53
+ first_seen_at: <%= json_escape @error.first_seen_at.to_json %>,
54
+ last_seen_at: <%= json_escape @error.last_seen_at.to_json %>,
55
55
  occurrence_count: <%= @error.occurrence_count %>,
56
56
  resolved: <%= @error.resolved? %>,
57
- resolved_at: <%= raw @error.resolved_at.to_json %>,
58
- resolved_by_name: <%= raw @error.resolved_by_name.to_json %>,
59
- platform: <%= raw @error.platform.to_json %>,
60
- user_id: <%= raw @error.user_id.to_json %>,
61
- severity: <%= raw @error.severity.to_json %>,
57
+ resolved_at: <%= json_escape @error.resolved_at.to_json %>,
58
+ resolved_by_name: <%= json_escape @error.resolved_by_name.to_json %>,
59
+ platform: <%= json_escape @error.platform.to_json %>,
60
+ user_id: <%= json_escape @error.user_id.to_json %>,
61
+ severity: <%= json_escape @error.severity.to_json %>,
62
62
  priority_level: <%= @error.priority_level || 0 %>,
63
63
  <% if @error.respond_to?(:app_version) %>
64
- app_version: <%= raw @error.app_version.to_json %>,
64
+ app_version: <%= json_escape @error.app_version.to_json %>,
65
65
  <% end %>
66
66
  <% if @error.respond_to?(:git_commit) %>
67
- git_commit: <%= raw @error.git_commit.to_json %>,
67
+ git_commit: <%= json_escape @error.git_commit.to_json %>,
68
68
  <% end %>
69
- created_at: <%= raw @error.created_at.to_json %>,
70
- updated_at: <%= raw @error.updated_at.to_json %>
69
+ created_at: <%= json_escape @error.created_at.to_json %>,
70
+ updated_at: <%= json_escape @error.updated_at.to_json %>
71
71
  };
72
72
 
73
73
  const jsonString = JSON.stringify(errorData, null, 2);
@@ -1,3 +1,3 @@
1
1
  module RailsErrorDashboard
2
- VERSION = "0.1.26"
2
+ VERSION = "0.1.27"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_error_dashboard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.26
4
+ version: 0.1.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anjan Jagirdar
@@ -386,7 +386,7 @@ metadata:
386
386
  source_code_uri: https://github.com/AnjanJ/rails_error_dashboard
387
387
  changelog_uri: https://github.com/AnjanJ/rails_error_dashboard/blob/main/CHANGELOG.md
388
388
  post_install_message: "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n
389
- \ Rails Error Dashboard v0.1.26\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n\U0001F195
389
+ \ Rails Error Dashboard v0.1.27\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n\U0001F195
390
390
  First time? Quick start:\n rails generate rails_error_dashboard:install\n rails
391
391
  db:migrate\n # Add to config/routes.rb:\n mount RailsErrorDashboard::Engine
392
392
  => '/error_dashboard'\n\n\U0001F504 Upgrading from v0.1.x?\n rails db:migrate\n