2020-11-03 13:09:22 -05:00
|
|
|
- body = @alert.resolved? ? _('An alert has been resolved in %{project_path}.') : _('An alert has been triggered in %{project_path}.')
|
|
|
|
|
|
|
|
%p
|
|
|
|
= body % { project_path: @alert.project.full_path }
|
2020-03-19 20:09:29 -04:00
|
|
|
%p
|
2020-11-03 13:09:22 -05:00
|
|
|
= link_to(_('View alert details.'), @alert.details_url)
|
2020-03-19 20:09:29 -04:00
|
|
|
|
|
|
|
- if description = @alert.description
|
|
|
|
%p
|
|
|
|
= _('Description:')
|
|
|
|
= description
|
|
|
|
|
2020-09-22 08:09:39 -04:00
|
|
|
- if env_name = @alert.environment&.name
|
2020-03-19 20:09:29 -04:00
|
|
|
%p
|
|
|
|
= _('Environment:')
|
|
|
|
= env_name
|
|
|
|
|
2020-09-22 08:09:39 -04:00
|
|
|
- if metric_query = @alert.prometheus_alert&.full_query
|
2020-03-19 20:09:29 -04:00
|
|
|
%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)
|