diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-20 03:09:29 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-20 03:09:29 +0300 |
commit | b060b8b7e4e895e28226b366b92081512225cd14 (patch) | |
tree | 0364ce1045b2e0a1cc3cad7b0d487e254335b66c /app/views/notify | |
parent | 49a923c646a2c24b5377cfde8236c73094c60d42 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/notify')
-rw-r--r-- | app/views/notify/prometheus_alert_fired_email.html.haml | 28 | ||||
-rw-r--r-- | app/views/notify/prometheus_alert_fired_email.text.erb | 21 |
2 files changed, 49 insertions, 0 deletions
diff --git a/app/views/notify/prometheus_alert_fired_email.html.haml b/app/views/notify/prometheus_alert_fired_email.html.haml new file mode 100644 index 00000000000..17f9481d353 --- /dev/null +++ b/app/views/notify/prometheus_alert_fired_email.html.haml @@ -0,0 +1,28 @@ +%p + = _('An alert has been triggered in %{project_path}.') % { project_path: @alert.project_full_path } + +- if description = @alert.description + %p + = _('Description:') + = description + +- if env_name = @alert.environment_name + %p + = _('Environment:') + = env_name + +- if metric_query = @alert.metric_query + %p + = _('Metric:') + + %pre + = metric_query + +- if @alert.show_incident_issues_link? + %p + = link_to(_('View incident issues.'), @alert.incident_issues_link) + +- if @alert.show_performance_dashboard_link? + %p + = link_to(_('View performance dashboard.'), @alert.performance_dashboard_link) + diff --git a/app/views/notify/prometheus_alert_fired_email.text.erb b/app/views/notify/prometheus_alert_fired_email.text.erb new file mode 100644 index 00000000000..c3f005cfb7e --- /dev/null +++ b/app/views/notify/prometheus_alert_fired_email.text.erb @@ -0,0 +1,21 @@ +<%= _('An alert has been triggered in %{project_path}.') % { project_path: @alert.project_full_path } %>. + +<% if description = @alert.description %> +<%= _('Description:') %> <%= description %> +<% end %> + +<% if env_name = @alert.environment_name %> +<%= _('Environment:') %> <%= env_name %> +<% end %> + +<% if metric_query = @alert.metric_query %> +<%= _('Metric:') %> <%= metric_query %> +<% end %> + +<% if @alert.show_incident_issues_link? %> +<%= _('View incident issues.') %> <%= @alert.incident_issues_link %> +<% end %> + +<% if @alert.show_performance_dashboard_link? %> +<%= _('View the performance dashboard at') %> <%= @alert.performance_dashboard_link %> +<% end %> |