Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-08-11 18:10:08 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-08-11 18:10:08 +0300
commit9dde2726710184f066387d044fce4ae2b3684210 (patch)
tree141da0dfc25da6b1724329a3d5cf2d51c7d45937 /app/presenters/projects
parent03b5d94c2c145491bd493837ec50a36e5d1d2612 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/presenters/projects')
-rw-r--r--app/presenters/projects/prometheus/alert_presenter.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/presenters/projects/prometheus/alert_presenter.rb b/app/presenters/projects/prometheus/alert_presenter.rb
index 1cf8b202810..14a51b4a4fc 100644
--- a/app/presenters/projects/prometheus/alert_presenter.rb
+++ b/app/presenters/projects/prometheus/alert_presenter.rb
@@ -77,6 +77,15 @@ module Projects
end
end
+ def details_url
+ return unless am_alert
+
+ ::Gitlab::Routing.url_helpers.details_project_alert_management_url(
+ project,
+ am_alert.iid
+ )
+ end
+
private
def alert_title
@@ -97,6 +106,7 @@ module Projects
metadata << list_item(service.label.humanize, service.value) if service
metadata << list_item(monitoring_tool.label.humanize, monitoring_tool.value) if monitoring_tool
metadata << list_item(hosts.label.humanize, host_links) if hosts
+ metadata << list_item('GitLab alert', details_url) if details_url
metadata.join(MARKDOWN_LINE_BREAK)
end