diff options
Diffstat (limited to 'sonar-server')
3 files changed, 15 insertions, 1 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/alerts_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/alerts_helper.rb index fa338a0617b..8f43923b641 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/alerts_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/alerts_helper.rb @@ -109,4 +109,13 @@ module AlertsHelper end end + def period_label(alert) + index = alert.period + if index + "Δ #{Api::Utils.period_label(index)}" + else + "#{message('value')}" + end + end + end
\ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/alerts/_show.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/alerts/_show.html.erb index ed533127abc..5e4a58b2750 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/alerts/_show.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/alerts/_show.html.erb @@ -4,6 +4,9 @@ <%= h alert.name %> </td> <td width="10%"> + <%= period_label(alert) -%> + </td> + <td width="10%"> <%= message("alerts.operator.#{alert.operator}") -%> </td> <td width="20%"> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/alerts/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/alerts/index.html.erb index c50067f0e02..c672968789d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/alerts/index.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/alerts/index.html.erb @@ -20,7 +20,9 @@ <tr class="<%= cycle('even','odd') -%>"> <td id="row_alert_<%= alert.id -%>"> <% if is_admin? %> - <%= render :partial => 'edit', :locals => {:alert => alert} %> + <%= render :partial => 'edit', :locals => {:alert => alert} %> + <% else %> + <%= render :partial => 'show', :locals => {:alert => alert} %> <% end %> </td> </tr> |