diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-07 15:09:59 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-07 15:09:59 +0300 |
commit | 5958e399de2e45d509f25b9c84b0a4d7bafa41a1 (patch) | |
tree | 9f6fe0f418fe7fd1b3dc823c831b775708de8c84 /app/presenters/alert_management | |
parent | 277fdda606a023c1f8fa631e6a5c6868287caf36 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/presenters/alert_management')
-rw-r--r-- | app/presenters/alert_management/alert_presenter.rb | 6 | ||||
-rw-r--r-- | app/presenters/alert_management/prometheus_alert_presenter.rb | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/app/presenters/alert_management/alert_presenter.rb b/app/presenters/alert_management/alert_presenter.rb index a515c70152d..d6ebc8e18b1 100644 --- a/app/presenters/alert_management/alert_presenter.rb +++ b/app/presenters/alert_management/alert_presenter.rb @@ -37,6 +37,12 @@ module AlertManagement MARKDOWN end + def runbook + strong_memoize(:runbook) do + payload&.dig('runbook') + end + end + def metrics_dashboard_url; end private diff --git a/app/presenters/alert_management/prometheus_alert_presenter.rb b/app/presenters/alert_management/prometheus_alert_presenter.rb index 3bcc98e6784..6b8c8183f08 100644 --- a/app/presenters/alert_management/prometheus_alert_presenter.rb +++ b/app/presenters/alert_management/prometheus_alert_presenter.rb @@ -2,6 +2,12 @@ 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 |