diff options
Diffstat (limited to 'app/views/notify')
10 files changed, 14 insertions, 13 deletions
diff --git a/app/views/notify/_failed_builds.html.haml b/app/views/notify/_failed_builds.html.haml index cde0ac21d6d..11cbd700258 100644 --- a/app/views/notify/_failed_builds.html.haml +++ b/app/views/notify/_failed_builds.html.haml @@ -6,7 +6,7 @@ #{'build'.pluralize(failed.size)}. %tr.table-warning %td{ style: "font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; border: 1px solid #ededed; border-bottom: 0; border-radius: 4px 4px 0 0; overflow: hidden; background-color: #fdf4f6; color: #d22852; font-size: 14px; line-height: 1.4; text-align: center; padding: 8px 16px;" } - Logs may contain sensitive data. Please consider before forwarding this email. + Failed builds %tr.section %td{ style: "font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; padding: 0 16px; border: 1px solid #ededed; border-radius: 4px; overflow: hidden; border-top: 0; border-radius: 0 0 4px 4px;" } %table.builds{ border: "0", cellpadding: "0", cellspacing: "0", style: "width: 100%; border-collapse: collapse;" } diff --git a/app/views/notify/autodevops_disabled_email.html.haml b/app/views/notify/autodevops_disabled_email.html.haml index 65a2f75a3e2..72bcfbdf3af 100644 --- a/app/views/notify/autodevops_disabled_email.html.haml +++ b/app/views/notify/autodevops_disabled_email.html.haml @@ -46,4 +46,4 @@ %td{ style: "font-family: 'Menlo','Liberation Mono','Consolas','DejaVu Sans Mono','Ubuntu Mono','Courier New','andale mono','lucida console',monospace; font-size: 14px; line-height: 1.4; vertical-align: baseline; padding:0 8px;" } API -= render 'notify/failed_builds', pipeline: @pipeline, failed: @pipeline.statuses.latest.failed += render 'notify/failed_builds', pipeline: @pipeline, failed: @pipeline.latest_statuses.failed diff --git a/app/views/notify/autodevops_disabled_email.text.erb b/app/views/notify/autodevops_disabled_email.text.erb index f849c017265..c75857e96d7 100644 --- a/app/views/notify/autodevops_disabled_email.text.erb +++ b/app/views/notify/autodevops_disabled_email.text.erb @@ -7,7 +7,7 @@ The Auto DevOps pipeline failed for pipeline <%= @pipeline.iid %> (<%= pipeline_ <% else -%> Pipeline #<%= @pipeline.id %> ( <%= pipeline_url(@pipeline) %> ) triggered by API <% end -%> -<% failed = @pipeline.statuses.latest.failed -%> +<% failed = @pipeline.latest_statuses.failed -%> had <%= failed.size %> failed <%= 'build'.pluralize(failed.size) %>. <% failed.each do |build| -%> diff --git a/app/views/notify/changed_reviewer_of_merge_request_email.html.haml b/app/views/notify/changed_reviewer_of_merge_request_email.html.haml new file mode 100644 index 00000000000..ed7a3285f45 --- /dev/null +++ b/app/views/notify/changed_reviewer_of_merge_request_email.html.haml @@ -0,0 +1,2 @@ +%p + = change_reviewer_notification_text(@merge_request.reviewers, @previous_reviewers, :strong) diff --git a/app/views/notify/changed_reviewer_of_merge_request_email.text.erb b/app/views/notify/changed_reviewer_of_merge_request_email.text.erb new file mode 100644 index 00000000000..b6824966bb9 --- /dev/null +++ b/app/views/notify/changed_reviewer_of_merge_request_email.text.erb @@ -0,0 +1 @@ +<%= change_reviewer_notification_text(@merge_request.reviewers, @previous_reviewers) %> diff --git a/app/views/notify/issue_status_changed_email.text.erb b/app/views/notify/issue_status_changed_email.text.erb index f38b09e9820..f963e9b5c3d 100644 --- a/app/views/notify/issue_status_changed_email.text.erb +++ b/app/views/notify/issue_status_changed_email.text.erb @@ -1,4 +1,3 @@ Issue was <%= @issue_status %> by <%= sanitize_name(@updated_by.name) %> Issue <%= @issue.iid %>: <%= url_for(project_issue_url(@issue.project, @issue)) %> - diff --git a/app/views/notify/pipeline_failed_email.html.haml b/app/views/notify/pipeline_failed_email.html.haml index f01181857ce..575ec8c488e 100644 --- a/app/views/notify/pipeline_failed_email.html.haml +++ b/app/views/notify/pipeline_failed_email.html.haml @@ -108,4 +108,4 @@ %td{ style: "font-family:'Menlo','Liberation Mono','Consolas','DejaVu Sans Mono','Ubuntu Mono','Courier New','andale mono','lucida console',monospace;font-size:14px;line-height:1.4;vertical-align:baseline;padding:0 5px;" } API -= render 'notify/failed_builds', pipeline: @pipeline, failed: @pipeline.statuses.latest.failed += render 'notify/failed_builds', pipeline: @pipeline, failed: @pipeline.latest_statuses.failed diff --git a/app/views/notify/pipeline_failed_email.text.erb b/app/views/notify/pipeline_failed_email.text.erb index b388aad7048..a30e331d892 100644 --- a/app/views/notify/pipeline_failed_email.text.erb +++ b/app/views/notify/pipeline_failed_email.text.erb @@ -27,7 +27,7 @@ Pipeline #<%= @pipeline.id %> ( <%= pipeline_url(@pipeline) %> ) triggered by <% <% else -%> Pipeline #<%= @pipeline.id %> ( <%= pipeline_url(@pipeline) %> ) triggered by API <% end -%> -<% failed = @pipeline.statuses.latest.failed -%> +<% failed = @pipeline.latest_statuses.failed -%> had <%= failed.size %> failed <%= 'build'.pluralize(failed.size) %>. <% failed.each do |build| -%> diff --git a/app/views/notify/prometheus_alert_fired_email.html.haml b/app/views/notify/prometheus_alert_fired_email.html.haml index 17f9481d353..75ba66b44f9 100644 --- a/app/views/notify/prometheus_alert_fired_email.html.haml +++ b/app/views/notify/prometheus_alert_fired_email.html.haml @@ -1,17 +1,17 @@ %p - = _('An alert has been triggered in %{project_path}.') % { project_path: @alert.project_full_path } + = _('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 +- if env_name = @alert.environment&.name %p = _('Environment:') = env_name -- if metric_query = @alert.metric_query +- if metric_query = @alert.prometheus_alert&.full_query %p = _('Metric:') @@ -25,4 +25,3 @@ - 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 index c3f005cfb7e..8853f2a317b 100644 --- a/app/views/notify/prometheus_alert_fired_email.text.erb +++ b/app/views/notify/prometheus_alert_fired_email.text.erb @@ -1,14 +1,14 @@ -<%= _('An alert has been triggered in %{project_path}.') % { project_path: @alert.project_full_path } %>. +<%= _('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 %> +<% if env_name = @alert.environment&.name %> <%= _('Environment:') %> <%= env_name %> <% end %> -<% if metric_query = @alert.metric_query %> +<% if metric_query = @alert.prometheus_alert&.full_query %> <%= _('Metric:') %> <%= metric_query %> <% end %> |