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:
Diffstat (limited to 'app/presenters/alert_management/alert_presenter.rb')
-rw-r--r--app/presenters/alert_management/alert_presenter.rb21
1 files changed, 2 insertions, 19 deletions
diff --git a/app/presenters/alert_management/alert_presenter.rb b/app/presenters/alert_management/alert_presenter.rb
index 659e991e9d8..60fa351b449 100644
--- a/app/presenters/alert_management/alert_presenter.rb
+++ b/app/presenters/alert_management/alert_presenter.rb
@@ -10,7 +10,7 @@ module AlertManagement
MARKDOWN_LINE_BREAK = " \n"
HORIZONTAL_LINE = "\n\n---\n\n"
- delegate :metrics_dashboard_url, :runbook, to: :parsed_payload
+ delegate :runbook, to: :parsed_payload
def initialize(alert, **attributes)
super
@@ -44,22 +44,10 @@ module AlertManagement
project.incident_management_setting&.create_issue?
end
- def show_performance_dashboard_link?
- prometheus_alert.present?
- end
-
def incident_issues_link
project_incidents_url(project)
end
- def performance_dashboard_link
- if environment
- metrics_project_environment_url(project, environment)
- else
- metrics_project_environments_url(project)
- end
- end
-
def email_title
[environment&.name, query_title].compact.join(': ')
end
@@ -72,8 +60,7 @@ module AlertManagement
def issue_summary_markdown
<<~MARKDOWN.chomp
- #{metadata_list}
- #{metric_embed_for_alert}
+ #{metadata_list}\n
MARKDOWN
end
@@ -92,10 +79,6 @@ module AlertManagement
metadata.join(MARKDOWN_LINE_BREAK)
end
- def metric_embed_for_alert
- "\n[](#{metrics_dashboard_url})" if metrics_dashboard_url
- end
-
def list_item(key, value)
"**#{key}:** #{value}".strip
end