From: Stas Vilchik Date: Mon, 2 Feb 2015 11:17:55 +0000 (+0100) Subject: SONAR-5950 The Quality Gate widget should not display links on difference measures X-Git-Tag: 5.1-RC1~466 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=495b68300ce6a550ad501831a42c28ffc69fd516;p=sonarqube.git SONAR-5950 The Quality Gate widget should not display links on difference measures --- 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' -%>