Skip to content

Commit ceff805

Browse files
authored
Merge pull request opf#15688 from opf/bugfix/remove-wrapping-link
Removes the link around the table text
2 parents 8d2555a + 567a6cc commit ceff805

File tree

2 files changed

+65
-67
lines changed

2 files changed

+65
-67
lines changed

modules/storages/app/views/storages/storages_mailer/_health_status_notification.html.erb

+64-66
Original file line numberDiff line numberDiff line change
@@ -27,78 +27,76 @@ See COPYRIGHT and LICENSE files for more details.
2727
2828
++#%>
2929

30-
<a style="text-decoration: none;display: block;" href="<%= url %>" target="_blank">
31-
<%= render layout: 'mailer/border_table' do %>
32-
<tr>
33-
<td>
34-
<table <%= placeholder_table_styles(width: '100%', style: 'width:100%;font-size:14px;') %>>
35-
<tr>
36-
<%= placeholder_cell('12px', vertical: true) %>
37-
<td>
38-
<table <%= placeholder_table_styles %>>
39-
<tr>
40-
<td>
41-
<% if state == :unhealthy %>
42-
<%= render Mailer::LabelComponent.new(scheme: :danger, text: 'Error') %>
43-
<% else %>
44-
<%= render Mailer::LabelComponent.new(scheme: :success, text: 'Healthy') %>
45-
<% end %>
46-
</td>
47-
48-
<%= placeholder_cell('8px', vertical: true) %>
49-
50-
<td style="color: #878787; font-size: 12px; font-weight: 700;">
51-
<%= I18n.t("storages.provider_types.#{storage.short_provider_type}.name") %> - <%= storage.host %>
52-
</td>
53-
</tr>
54-
</table>
55-
</td>
56-
<%= placeholder_cell('12px', vertical: true) %>
57-
</tr>
58-
59-
<tr>
60-
<%= placeholder_cell('8px', vertical: false) %>
61-
</tr>
62-
63-
<tr>
64-
<%= placeholder_cell('12px', vertical: true) %>
65-
<td style="font-weight: 700; line-height: 20px; color: black;"><%= storage.name %></td>
30+
<%= render layout: 'mailer/border_table' do %>
31+
<tr>
32+
<td>
33+
<table <%= placeholder_table_styles(width: '100%', style: 'width:100%;font-size:14px;') %>>
34+
<tr>
35+
<%= placeholder_cell('12px', vertical: true) %>
36+
<td>
37+
<table <%= placeholder_table_styles %>>
38+
<tr>
39+
<td>
40+
<% if state == :unhealthy %>
41+
<%= render Mailer::LabelComponent.new(scheme: :danger, text: 'Error') %>
42+
<% else %>
43+
<%= render Mailer::LabelComponent.new(scheme: :success, text: 'Healthy') %>
44+
<% end %>
45+
</td>
46+
47+
<%= placeholder_cell('8px', vertical: true) %>
48+
49+
<td style="color: #878787; font-size: 12px; font-weight: 700;">
50+
<%= I18n.t("storages.provider_types.#{storage.short_provider_type}.name") %> - <%= storage.uri %>
51+
</td>
52+
</tr>
53+
</table>
54+
</td>
55+
<%= placeholder_cell('12px', vertical: true) %>
56+
</tr>
57+
58+
<tr>
59+
<%= placeholder_cell('8px', vertical: false) %>
60+
</tr>
61+
62+
<tr>
63+
<%= placeholder_cell('12px', vertical: true) %>
64+
<td style="font-weight: 700; line-height: 20px; color: black;"><%= storage.name %></td>
65+
<%= placeholder_cell('12px', vertical: true) %>
66+
</tr>
67+
68+
<tr>
69+
<%= placeholder_cell('8px', vertical: false) %>
70+
</tr>
71+
72+
<tr id="reason">
73+
<%= placeholder_cell('12px', vertical: true) %>
74+
<td style="color: #878787; font-size: 12px; font-weight: 400; line-height: 16px;">
75+
<% if state == :unhealthy %>
76+
<%= reason %> <%= I18n.t('mail.storages.health.unhealthy.since') %> <%= format_time(storage.health_changed_at) %>
77+
<% else %>
78+
<%= reason %> <%= I18n.t('mail.storages.health.healthy.solved_at') %> <%= format_time(storage.health_changed_at) %>
79+
<% end %>
80+
</td>
81+
<%= placeholder_cell('12px', vertical: true) %>
82+
</tr>
83+
84+
<% if storage.provider_type == ::Storages::Storage::PROVIDER_TYPE_NEXTCLOUD && state == :unhealthy %>
85+
<tr id="troubleshooting">
6686
<%= placeholder_cell('12px', vertical: true) %>
67-
</tr>
6887

69-
<tr>
70-
<%= placeholder_cell('8px', vertical: false) %>
71-
</tr>
72-
73-
<tr id="reason">
74-
<%= placeholder_cell('12px', vertical: true) %>
7588
<td style="color: #878787; font-size: 12px; font-weight: 400; line-height: 16px;">
76-
<% if state == :unhealthy %>
77-
<%= reason %> <%= I18n.t('mail.storages.health.unhealthy.since') %> <%= format_time(storage.health_changed_at) %>
78-
<% else %>
79-
<%= reason %> <%= I18n.t('mail.storages.health.healthy.solved_at') %> <%= format_time(storage.health_changed_at) %>
80-
<% end %>
89+
<%= I18n.t('mail.storages.health.unhealthy.troubleshooting.text') %>
90+
<a href="<%= ::OpenProject::Static::Links[:storage_docs][:troubleshooting][:href] %>"><%= I18n.t('mail.storages.health.unhealthy.troubleshooting.link_text') %></a>.
8191
</td>
92+
8293
<%= placeholder_cell('12px', vertical: true) %>
8394
</tr>
84-
85-
<% if storage.provider_type == ::Storages::Storage::PROVIDER_TYPE_NEXTCLOUD && state == :unhealthy %>
86-
<tr id="troubleshooting">
87-
<%= placeholder_cell('12px', vertical: true) %>
88-
89-
<td style="color: #878787; font-size: 12px; font-weight: 400; line-height: 16px;">
90-
<%= I18n.t('mail.storages.health.unhealthy.troubleshooting.text') %>
91-
<a href="<%= ::OpenProject::Static::Links[:storage_docs][:troubleshooting][:href] %>"><%= I18n.t('mail.storages.health.unhealthy.troubleshooting.link_text') %></a>.
92-
</td>
93-
94-
<%= placeholder_cell('12px', vertical: true) %>
95-
</tr>
96-
<% end %>
97-
</table>
98-
</td>
99-
</tr>
100-
<% end %>
101-
</a>
95+
<% end %>
96+
</table>
97+
</td>
98+
</tr>
99+
<% end %>
102100

103101
<table <%= placeholder_table_styles(width: '100%', style: "width:100%;") %>>
104102
<tr>

modules/storages/app/workers/storages/health_status_mailer_job.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def perform(storage:)
5050
return if storage.health_healthy?
5151

5252
admin_users.each do |admin|
53-
::Storages::StoragesMailer.notify_unhealthy(admin, storage).deliver_later
53+
StoragesMailer.notify_unhealthy(admin, storage).deliver_later
5454
end
5555

5656
HealthStatusMailerJob.schedule(storage:)

0 commit comments

Comments
 (0)