error_radar 0.9.0 → 1.0.1
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 +41 -0
- data/app/controllers/error_radar/errors_controller.rb +87 -13
- data/app/controllers/error_radar/guide_controller.rb +50 -0
- data/app/models/error_radar/error_activity.rb +25 -0
- data/app/models/error_radar/error_comment.rb +11 -0
- data/app/models/error_radar/error_log.rb +8 -0
- data/app/views/error_radar/errors/show.html.erb +224 -0
- data/app/views/error_radar/guide/index.html.erb +643 -0
- data/app/views/layouts/error_radar/application.html.erb +1 -0
- data/config/routes.rb +10 -6
- data/lib/error_radar/version.rb +1 -1
- data/lib/generators/error_radar/install/templates/initializer.rb +5 -0
- data/lib/generators/error_radar/upgrade_v100/templates/upgrade_to_v100.rb.tt +31 -0
- data/lib/generators/error_radar/upgrade_v100/upgrade_v100_generator.rb +20 -0
- metadata +7 -1
data/config/routes.rb
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
ErrorRadar::Engine.routes.draw do
|
|
4
4
|
root to: 'dashboard#index'
|
|
5
|
+
get 'guide', to: 'guide#index', as: :guide
|
|
5
6
|
|
|
6
7
|
# REST API — JSON endpoints for CI/CD, external dashboards, scripts
|
|
7
8
|
namespace :api, defaults: { format: :json } do
|
|
@@ -10,12 +11,15 @@ ErrorRadar::Engine.routes.draw do
|
|
|
10
11
|
end
|
|
11
12
|
|
|
12
13
|
# Web UI
|
|
13
|
-
get 'errors',
|
|
14
|
-
post 'errors/bulk',
|
|
15
|
-
post 'errors/:id/github_issue',
|
|
16
|
-
get 'errors/:id',
|
|
17
|
-
patch 'errors/:id/status',
|
|
18
|
-
|
|
14
|
+
get 'errors', to: 'errors#index', as: :errors
|
|
15
|
+
post 'errors/bulk', to: 'errors#bulk', as: :errors_bulk
|
|
16
|
+
post 'errors/:id/github_issue', to: 'errors#create_github_issue', as: :error_github_issue
|
|
17
|
+
get 'errors/:id', to: 'errors#show', as: :error
|
|
18
|
+
patch 'errors/:id/status', to: 'errors#update_status', as: :error_status
|
|
19
|
+
patch 'errors/:id/assign', to: 'errors#assign', as: :error_assign
|
|
20
|
+
post 'errors/:id/comments', to: 'errors#comment', as: :error_comments
|
|
21
|
+
delete 'errors/:id/comments/:cid', to: 'errors#destroy_comment', as: :error_comment
|
|
22
|
+
delete 'errors/:id', to: 'errors#destroy'
|
|
19
23
|
|
|
20
24
|
post 'maintenance/purge', to: 'dashboard#purge', as: :maintenance_purge
|
|
21
25
|
end
|
data/lib/error_radar/version.rb
CHANGED
|
@@ -93,6 +93,11 @@ ErrorRadar.configure do |config|
|
|
|
93
93
|
# config.github_token = ENV['GITHUB_TOKEN'] # PAT with repo scope
|
|
94
94
|
# config.github_repo = 'myorg/myapp' # "owner/repo" format
|
|
95
95
|
|
|
96
|
+
# --- Assignment & Comments (v1.0.0) ---
|
|
97
|
+
# Requires running: bin/rails generate error_radar:upgrade_v100 && bin/rails db:migrate
|
|
98
|
+
# Adds assigned_to column, error_radar_comments and error_radar_activities tables.
|
|
99
|
+
# No config needed — use the UI to assign errors and add comments.
|
|
100
|
+
|
|
96
101
|
# --- Digest Email ---
|
|
97
102
|
# Sends a periodic summary of errors via email. Requires ActionMailer.
|
|
98
103
|
# Run via cron / Heroku Scheduler:
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
class UpgradeErrorRadarToV100 < ActiveRecord::Migration[<%= ActiveRecord::Migration.current_version %>]
|
|
4
|
+
def change
|
|
5
|
+
# Assignment field on the error log
|
|
6
|
+
add_column :error_radar_error_logs, :assigned_to, :string
|
|
7
|
+
|
|
8
|
+
# Comment thread per error
|
|
9
|
+
create_table :error_radar_comments do |t|
|
|
10
|
+
t.references :error_log, null: false,
|
|
11
|
+
foreign_key: { to_table: :error_radar_error_logs }
|
|
12
|
+
t.string :author
|
|
13
|
+
t.text :body, null: false
|
|
14
|
+
t.timestamps
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# Activity / audit log per error
|
|
18
|
+
create_table :error_radar_activities do |t|
|
|
19
|
+
t.references :error_log, null: false,
|
|
20
|
+
foreign_key: { to_table: :error_radar_error_logs },
|
|
21
|
+
index: false
|
|
22
|
+
t.string :actor # who performed the action
|
|
23
|
+
t.string :action, null: false # "resolved", "assigned → alice", "commented", ...
|
|
24
|
+
t.string :detail, limit: 500 # extra context (note preview, old→new value)
|
|
25
|
+
t.timestamps
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
add_index :error_radar_activities, %i[error_log_id created_at],
|
|
29
|
+
name: 'idx_er_activities_log_time'
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'rails/generators/active_record'
|
|
4
|
+
|
|
5
|
+
module ErrorRadar
|
|
6
|
+
module Generators
|
|
7
|
+
class UpgradeV100Generator < ActiveRecord::Generators::Base
|
|
8
|
+
source_root File.expand_path('templates', __dir__)
|
|
9
|
+
|
|
10
|
+
argument :name, type: :string, default: 'upgrade_v100'
|
|
11
|
+
|
|
12
|
+
desc 'Creates tables for assignment, comments and activity log (v1.0.0).'
|
|
13
|
+
|
|
14
|
+
def create_migration
|
|
15
|
+
migration_template 'upgrade_to_v100.rb.tt',
|
|
16
|
+
'db/migrate/upgrade_error_radar_to_v100.rb'
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: error_radar
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- chienbn9x
|
|
@@ -63,9 +63,12 @@ files:
|
|
|
63
63
|
- app/controllers/error_radar/application_controller.rb
|
|
64
64
|
- app/controllers/error_radar/dashboard_controller.rb
|
|
65
65
|
- app/controllers/error_radar/errors_controller.rb
|
|
66
|
+
- app/controllers/error_radar/guide_controller.rb
|
|
66
67
|
- app/mailers/error_radar/digest_mailer.rb
|
|
67
68
|
- app/mailers/error_radar/error_mailer.rb
|
|
68
69
|
- app/models/error_radar/application_record.rb
|
|
70
|
+
- app/models/error_radar/error_activity.rb
|
|
71
|
+
- app/models/error_radar/error_comment.rb
|
|
69
72
|
- app/models/error_radar/error_log.rb
|
|
70
73
|
- app/models/error_radar/error_occurrence.rb
|
|
71
74
|
- app/views/error_radar/dashboard/index.html.erb
|
|
@@ -76,6 +79,7 @@ files:
|
|
|
76
79
|
- app/views/error_radar/error_mailer/new_error.text.erb
|
|
77
80
|
- app/views/error_radar/errors/index.html.erb
|
|
78
81
|
- app/views/error_radar/errors/show.html.erb
|
|
82
|
+
- app/views/error_radar/guide/index.html.erb
|
|
79
83
|
- app/views/layouts/error_radar/application.html.erb
|
|
80
84
|
- config/routes.rb
|
|
81
85
|
- lib/error_radar.rb
|
|
@@ -106,6 +110,8 @@ files:
|
|
|
106
110
|
- lib/generators/error_radar/upgrade_v050/upgrade_v050_generator.rb
|
|
107
111
|
- lib/generators/error_radar/upgrade_v060/templates/create_error_radar_occurrences.rb.tt
|
|
108
112
|
- lib/generators/error_radar/upgrade_v060/upgrade_v060_generator.rb
|
|
113
|
+
- lib/generators/error_radar/upgrade_v100/templates/upgrade_to_v100.rb.tt
|
|
114
|
+
- lib/generators/error_radar/upgrade_v100/upgrade_v100_generator.rb
|
|
109
115
|
- lib/tasks/error_radar.rake
|
|
110
116
|
homepage: https://github.com/chienbn9x/error_radar
|
|
111
117
|
licenses:
|