aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2014-07-04 12:44:08 +0600
committerStas Vilchik <vilchiks@gmail.com>2014-07-04 12:52:29 +0600
commit161658d28bb93791ea8cddb560aa88673e6b7b08 (patch)
tree1a8b49e04955e7b3b275846aaefaff5dc79fbd5b /plugins
parent5aa75959f890ade091d204a05ae6c5738e977702 (diff)
downloadsonarqube-161658d28bb93791ea8cddb560aa88673e6b7b08.tar.gz
sonarqube-161658d28bb93791ea8cddb560aa88673e6b7b08.zip
SONAR-5333 Update custom measures widget
(cherry picked from commit 18450f3)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/custom_measures.html.erb51
1 files changed, 24 insertions, 27 deletions
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/custom_measures.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/custom_measures.html.erb
index f7039b6423e..6f084e38350 100644
--- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/custom_measures.html.erb
+++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/custom_measures.html.erb
@@ -6,34 +6,31 @@
measures << m if m
end
period = params[:period]
- unless measures.empty? || measures.none? {|measure| measure.visible?(period.to_i)}
+ unless measures.empty? || measures.none? { |measure| measure.visible?(period.to_i) }
%>
-
- <table class="width100">
- <tr>
- <td width="100%">
- <%
- measures.each do |measure|
- if measure.visible?(period.to_i)
- -%>
- <div class="dashbox">
- <p class="title"><%= measure.metric.short_name -%></p>
- <p>
- <% if measure.value.nil? -%>
- <%# This is a differential measure -%>
- <span class="big"><%= format_measure(measure, :url => url_for_drilldown(measure, :period => period), :period => period) -%></span>
- <% else -%>
- <%# This is a classic measure that can have a differential -%>
- <span class="big"><%= format_measure(measure, :url => url_for_drilldown(measure)) -%></span>
- <%= dashboard_configuration.selected_period? ? format_variation(measure) : trend_icon(measure) -%>
- <% end -%>
+ <div class="widget-row">
+ <%
+ measures.each do |measure|
+ if measure.visible?(period.to_i)
+ -%>
+ <div class="widget-span widget-span-3">
+ <div class="widget-measure-container">
+ <p class="widget-measure widget-measure-main">
+ <span class="widget-label"><%= measure.metric.short_name -%></span>
+ <span class="nowrap">
+ <% if measure.value.nil? -%>
+ <%= format_measure(measure, :url => url_for_drilldown(measure, :period => period), :period => period) -%>
+ <% else %>
+ <%= format_measure(measure, :url => url_for_drilldown(measure)) -%>
+ <%= dashboard_configuration.selected_period? ? format_variation(measure) : trend_icon(measure) -%>
+ <% end -%>
+ </span>
</p>
</div>
- <%
- end
- end
- -%>
- </td>
- </tr>
- </table>
+ </div>
+ <%
+ end
+ end
+ -%>
+ </div>
<% end %>