summaryrefslogtreecommitdiffstats
path: root/plugins/sonar-core-plugin
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-02-02 12:17:55 +0100
committerStas Vilchik <vilchiks@gmail.com>2015-02-02 12:17:55 +0100
commit495b68300ce6a550ad501831a42c28ffc69fd516 (patch)
tree93dce7a6a43de41182d9ab4968486955951e4e22 /plugins/sonar-core-plugin
parente90613bd85aa0aabdc6d713005f9379485db6525 (diff)
downloadsonarqube-495b68300ce6a550ad501831a42c28ffc69fd516.tar.gz
sonarqube-495b68300ce6a550ad501831a42c28ffc69fd516.zip
SONAR-5950 The Quality Gate widget should not display links on difference measures
Diffstat (limited to 'plugins/sonar-core-plugin')
-rw-r--r--plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/alerts.html.erb9
1 files changed, 8 insertions, 1 deletions
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']
-%>
<div class="dashbox" style="margin: 10px; vertical-align: baseline">
<p class="title"><%= condition_metric.short_name -%></p>
- <span class="big"><%= format_measure(actual_measure, :url => drilldown_url) -%></span>
+ <% if is_not_difference_measure_with_period %>
+ <span class="big"><%= format_measure(actual_measure) -%></span>
+ <% else %>
+ <span class="big"><%= format_measure(actual_measure, :url => drilldown_url) -%></span>
+ <% end %>
<% if level == 'WARN' -%><%= operator -%> <%= format_measure(warning_measure) -%><% end -%>
<% if level == 'ERROR' -%><%= operator -%> <%= format_measure(error_measure) -%><% end -%>
<% if level == 'OK' -%>