blob: 512d4028520de291b676e50925d3c3deb62e6689 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# frozen_string_literal: true
module Banzai
module Filter
module References
class AlertReferenceFilter < IssuableReferenceFilter
self.reference_type = :alert
self.object_class = AlertManagement::Alert
def object_sym
:alert
end
def parent_records(parent, ids)
parent.alert_management_alerts.where(iid: ids.to_a)
end
def url_for_object(alert, project)
::Gitlab::Routing.url_helpers.details_project_alert_management_url(
project,
alert.iid,
only_path: context[:only_path]
)
end
end
end
end
end
|