summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Gageot <david@gageot.net>2012-10-09 15:50:18 +0200
committerDavid Gageot <david@gageot.net>2012-10-09 15:50:18 +0200
commit162f373c4404c9605a2ab069ec85045518585497 (patch)
tree6d776adcbda6382ef8ac847d70378580c5cd6235
parent062362c9c68e79cfbe6b0d0efd422d4f837cae6b (diff)
downloadsonarqube-162f373c4404c9605a2ab069ec85045518585497.tar.gz
sonarqube-162f373c4404c9605a2ab069ec85045518585497.zip
SONAR-2804 Improve GUI
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/helpers/resource_helper.rb8
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/resource/_header_coverage.html.erb4
-rw-r--r--sonar-server/src/main/webapp/stylesheets/style.css8
3 files changed, 6 insertions, 14 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/resource_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/resource_helper.rb
index 7232249f3ea..7a577eccb60 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/resource_helper.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/resource_helper.rb
@@ -20,15 +20,15 @@
module ResourceHelper
DUPLICATION_SNIPPET_DEFAULT_NB_OF_LINES = 6
- def format(new, prefix, measure_name, options = {})
+ def format(new, prefix, measure_name)
if new
format_variation(measure('new_' + prefix + measure_name), :period => @period, :default => '-', :style => 'none')
else
- format_measure(measure(prefix + measure_name), options)
+ measure(prefix + measure_name).formatted_value
end
end
- def format_difference(new, prefix, measure_name1, measure_name2, options = {})
- format(new, prefix, measure_name1, options).to_i - format(new, prefix, measure_name2, options).to_i;
+ def format_difference(new, prefix, measure_name1, measure_name2)
+ format(new, prefix, measure_name1).to_i - format(new, prefix, measure_name2).to_i
end
end \ No newline at end of file
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_header_coverage.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_header_coverage.html.erb
index 73ca5a4e4e7..3d31c1d296f 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_header_coverage.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_header_coverage.html.erb
@@ -9,7 +9,7 @@
<% [('overall_' if @display_overall_coverage), '', ('it_' if @display_it_coverage)].compact.each_with_index do |prefix, index| -%>
<tr>
<% if index == 0 -%>
- <td class="right big" style="width: 80px;"><%= format(new, prefix, 'coverage', :default => '-') -%></td>
+ <td class="right big" style="width: 80px;"><%= format(new, prefix, 'coverage') -%></td>
<td></td>
<td class="sep"></td>
<td class="name"><%= h Metric.name_for('line_coverage') -%>:</td>
@@ -26,7 +26,7 @@
/ <%= format(new, prefix, 'conditions_to_cover') -%>)
</td>
<% else -%>
- <td class="right"><%= format(new, prefix, 'coverage', :default => '-') -%></td>
+ <td class="right"><%= format(new, prefix, 'coverage') -%></td>
<td><%= message(prefix + 'coverage_viewer.by') -%></td>
<td class="sep"></td>
<td colspan="2"></td>
diff --git a/sonar-server/src/main/webapp/stylesheets/style.css b/sonar-server/src/main/webapp/stylesheets/style.css
index 7a86b6f5c64..ea36b522e42 100644
--- a/sonar-server/src/main/webapp/stylesheets/style.css
+++ b/sonar-server/src/main/webapp/stylesheets/style.css
@@ -2424,14 +2424,6 @@ textarea.width100 {
box-sizing: border-box; /* Opera/IE 8+ */
}
-.coverage tr {
- line-height: 1.8em;
-}
-
-.coverage td.name {
- text-align: right;
-}
-
.property table.data > tbody > tr > td {
vertical-align: top;
}