Tidy up homepage and navigation
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Issue < ApplicationRecord
|
||||
belongs_to :project
|
||||
has_many :events, dependent: :nullify
|
||||
|
||||
enum :status, { open: 0, resolved: 1, ignored: 2 }
|
||||
@@ -17,18 +16,18 @@ class Issue < ApplicationRecord
|
||||
|
||||
# Real-time updates
|
||||
after_create_commit do
|
||||
broadcast_refresh_to(project)
|
||||
broadcast_refresh
|
||||
end
|
||||
|
||||
after_update_commit do
|
||||
broadcast_refresh # Refreshes the issue show page
|
||||
broadcast_refresh_to(project, "issues") # Refreshes the project's issues index
|
||||
broadcast_refresh_to("issues") # Refreshes the issues index
|
||||
end
|
||||
|
||||
def self.group_event(event_payload, project)
|
||||
def self.group_event(event_payload)
|
||||
fingerprint = generate_fingerprint(event_payload)
|
||||
|
||||
find_or_create_by(project: project, fingerprint: fingerprint) do |issue|
|
||||
find_or_create_by(fingerprint: fingerprint) do |issue|
|
||||
issue.title = extract_title(event_payload)
|
||||
issue.exception_type = extract_exception_type(event_payload)
|
||||
issue.first_seen = Time.current
|
||||
|
||||
Reference in New Issue
Block a user