From 495b68300ce6a550ad501831a42c28ffc69fd516 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Mon, 2 Feb 2015 12:17:55 +0100 Subject: [PATCH] SONAR-5950 The Quality Gate widget should not display links on difference measures --- .../org/sonar/plugins/core/widgets/alerts.html.erb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/alerts.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/alerts.html.erb index 92d11224c7e..bd8cdd9482e 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/alerts.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/alerts.html.erb @@ -46,12 +46,19 @@ warning_measure = ProjectMeasure.new :metric => condition_metric, :value => warning_value error_measure = ProjectMeasure.new :metric => condition_metric, :value => error_value + is_difference_measure = condition_metric.name.start_with?('new_') + is_not_difference_measure_with_period = !is_difference_measure && !period.blank? + unless level == 'OK' && !widget_properties['show_ok'] -%>

<%= condition_metric.short_name -%>

- <%= format_measure(actual_measure, :url => drilldown_url) -%> + <% if is_not_difference_measure_with_period %> + <%= format_measure(actual_measure) -%> + <% else %> + <%= format_measure(actual_measure, :url => drilldown_url) -%> + <% end %> <% if level == 'WARN' -%><%= operator -%> <%= format_measure(warning_measure) -%><% end -%> <% if level == 'ERROR' -%><%= operator -%> <%= format_measure(error_measure) -%><% end -%> <% if level == 'OK' -%> -- 2.39.5