blob: 6b8c8183f082cb5a547c8570f9b7fcab32694e4d (
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
29
30
31
32
33
|
# frozen_string_literal: true
module AlertManagement
class PrometheusAlertPresenter < AlertManagement::AlertPresenter
def runbook
strong_memoize(:runbook) do
payload&.dig('annotations', 'runbook')
end
end
def metrics_dashboard_url
alerting_alert.metrics_dashboard_url
end
private
def alert_markdown
alerting_alert.alert_markdown
end
def details_list
alerting_alert.annotation_list
end
def metric_embed_for_alert
alerting_alert.metric_embed_for_alert
end
def full_query
alerting_alert.full_query
end
end
end
|