From 2669c8a5c50a9310425bbd3a04c12ef524064485 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Mon, 23 Jun 2014 14:10:23 +0600 Subject: [PATCH] SONAR-5333 Dashboard styles feedback --- .../org/sonar/plugins/core/widgets/coverage.html.erb | 2 +- .../org/sonar/plugins/core/widgets/events.html.erb | 4 +--- .../plugins/core/widgets/issues/issues.html.erb | 12 +++++------- .../sonar/plugins/core/widgets/it_coverage.html.erb | 3 --- .../design/ui/widgets/package_design.html.erb | 4 ++-- .../main/resources/org/sonar/l10n/core.properties | 3 ++- sonar-server/src/main/less/dashboard.less | 2 ++ sonar-server/src/main/less/layout.less | 4 ++++ sonar-server/src/main/less/style.less | 4 ++++ sonar-server/src/main/less/ui.less | 7 ++++++- .../webapp/WEB-INF/app/helpers/application_helper.rb | 4 ++-- .../WEB-INF/app/views/components/index.html.erb | 2 +- .../WEB-INF/app/views/drilldown/measures.html.erb | 4 ++-- 13 files changed, 32 insertions(+), 23 deletions(-) diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/coverage.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/coverage.html.erb index b2b13fb0680..0a182b314e1 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/coverage.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/coverage.html.erb @@ -141,7 +141,7 @@ <% end %>
-   + <%= message('widget.code_coverage.execution_time') -%> <%= format_measure(execution_time, :url => url_for_drilldown('test_execution_time')) %> <%= dashboard_configuration.selected_period? ? format_variation(execution_time) : trend_icon(execution_time) -%> diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/events.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/events.html.erb index 1a4ef1fccf2..6cdfe968f91 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/events.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/events.html.erb @@ -89,9 +89,7 @@ <%= event.name %> <% unless event.description.blank? %> - - - + <% end %> diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/issues.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/issues.html.erb index 99a069dc583..f73f2855c75 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/issues.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/issues.html.erb @@ -51,13 +51,11 @@
- <%= message('widget.rules.technical_debt') -%> - - - <%= format_measure(technical_debt) -%> - - <%= dashboard_configuration.selected_period? ? format_variation(technical_debt) : trend_icon(technical_debt) -%> - + <%= message('widget.rules.debt') -%> + + <%= format_measure(technical_debt) -%> + + <%= dashboard_configuration.selected_period? ? format_variation(technical_debt) : trend_icon(technical_debt) -%>
<% diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/it_coverage.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/it_coverage.html.erb index b39c4942f72..b9916b0f3ea 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/it_coverage.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/it_coverage.html.erb @@ -70,7 +70,6 @@ :period => dashboard_configuration.period_index, :url => url_for_drilldown(new_coverage, :period => dashboard_configuration.period_index), :default => '-') %> - <%= dashboard_configuration.selected_period? ? format_variation(new_coverage) : trend_icon(new_coverage) -%>
<% end %> @@ -82,7 +81,6 @@ <%= format_measure(new_line_coverage, :period => dashboard_configuration.period_index, :url => url_for_drilldown(new_line_coverage, :period => dashboard_configuration.period_index)) %> - <%= dashboard_configuration.selected_period? ? format_variation(new_line_coverage) : trend_icon(new_line_coverage) -%>
<% end %> @@ -94,7 +92,6 @@ <%= format_measure(new_branch_coverage, :period => dashboard_configuration.period_index, :url => url_for_drilldown(new_branch_coverage, :period => dashboard_configuration.period_index)) %> - <%= dashboard_configuration.selected_period? ? format_variation(new_branch_coverage) : trend_icon(new_branch_coverage) -%>
<% end %> diff --git a/plugins/sonar-design-plugin/src/main/resources/org/sonar/plugins/design/ui/widgets/package_design.html.erb b/plugins/sonar-design-plugin/src/main/resources/org/sonar/plugins/design/ui/widgets/package_design.html.erb index a9b83d9345f..5d9b7a2c796 100644 --- a/plugins/sonar-design-plugin/src/main/resources/org/sonar/plugins/design/ui/widgets/package_design.html.erb +++ b/plugins/sonar-design-plugin/src/main/resources/org/sonar/plugins/design/ui/widgets/package_design.html.erb @@ -37,21 +37,21 @@ <% if package_feedback_edges %>
+ <%= message('widget.package_design.between_packages.suffix') -%> <%= format_measure(package_feedback_edges, :default => '-', :url => url_for_drilldown(package_feedback_edges)) %> <%= dashboard_configuration.selected_period? ? format_variation(package_feedback_edges) : trend_icon(package_feedback_edges) -%> - <%= message('widget.package_design.between_packages.suffix') -%>
<% end %> <% if package_tangles %>
+ <%= message('widget.package_design.between_files.suffix') -%> <%= format_measure(package_tangles, :default => '-', :url => url_for_drilldown(package_tangles)) %> <%= dashboard_configuration.selected_period? ? format_variation(package_tangles) : trend_icon(package_tangles) -%> - <%= message('widget.package_design.between_files.suffix') -%>
<% end %>
diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties index b38db8b94c1..c3417124df2 100644 --- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties +++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties @@ -992,6 +992,7 @@ widget.code_coverage.failures.suffix=\ failures widget.code_coverage.errors.suffix=\ errors widget.code_coverage.tests.suffix=\ tests widget.code_coverage.skipped.suffix=\ skipped +widget.code_coverage.execution_time=Execution Time # id of this widget does not use underscore in order to be backward-compatible with previous version of JaCoCo plugin widget.it-coverage.name=Integration Tests Coverage @@ -1069,7 +1070,7 @@ widget.events.show_more=Show more widget.rules.name=Issues and Technical Debt widget.rules.description=Reports issues and technical debt. widget.rules.issues=Issues -widget.rules.technical_debt=Technical Debt +widget.rules.debt=Debt widget.rules.added=Added: widget.rules.removed=Removed: diff --git a/sonar-server/src/main/less/dashboard.less b/sonar-server/src/main/less/dashboard.less index 4f8602ac5bd..de628316f9f 100644 --- a/sonar-server/src/main/less/dashboard.less +++ b/sonar-server/src/main/less/dashboard.less @@ -164,6 +164,8 @@ text-align: right; } +.admin_page .operations .link-action { margin-left: 4px; } + .admin_page .owner { width: 140px; text-align: center; diff --git a/sonar-server/src/main/less/layout.less b/sonar-server/src/main/less/layout.less index a87f1902f7c..69d93189211 100644 --- a/sonar-server/src/main/less/layout.less +++ b/sonar-server/src/main/less/layout.less @@ -65,6 +65,10 @@ body, a { position: relative; } +#hd li { + height: 30px; +} + #hd a { .base-link; color: #e5e5e5; diff --git a/sonar-server/src/main/less/style.less b/sonar-server/src/main/less/style.less index d1e3fd8d9bc..26e3c87b43b 100644 --- a/sonar-server/src/main/less/style.less +++ b/sonar-server/src/main/less/style.less @@ -391,6 +391,10 @@ table.data > thead > tr > th { & > a { .base-link; } + + & > .small { + text-transform: none; + } } table.data > tfoot > tr > td { diff --git a/sonar-server/src/main/less/ui.less b/sonar-server/src/main/less/ui.less index bdab9e2c935..7b978880ecd 100644 --- a/sonar-server/src/main/less/ui.less +++ b/sonar-server/src/main/less/ui.less @@ -114,6 +114,11 @@ a { .link; } +.icon-with-link { + outline: none; + text-decoration: none; +} + .widget-link { .highlighted-link; border-bottom: 1px solid @lightBlue; @@ -174,7 +179,7 @@ input[type=button] { vertical-align: baseline; height: 22px; margin: 0 1px; - padding: 2px 10px; + padding: 0 10px; border: 1px solid @darkGrey; .box-sizing(border-box); diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb index 458574c46ab..d1a7a8c67d2 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb @@ -313,10 +313,10 @@ module ApplicationHelper if resource.display_dashboard? if options[:dashboard] link_to(name || resource.name, params.merge({:controller => 'dashboard', :action => 'index', :id => resource.id, :period => period_index, - :tab => options[:tab], :rule => options[:rule]}), :title => options[:title]) + :tab => options[:tab], :rule => options[:rule]}), :title => options[:title], :class => options[:class]) else # stay on the same page (for example components) - link_to(name || resource.name, params.merge({:id => resource.id, :period => period_index, :tab => options[:tab], :rule => options[:rule]}), :title => options[:title]) + link_to(name || resource.name, params.merge({:id => resource.id, :period => period_index, :tab => options[:tab], :rule => options[:rule]}), :title => options[:title], :class => options[:class]) end else if options[:line] diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/components/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/components/index.html.erb index 88b4219119d..0ce35cae214 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/components/index.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/components/index.html.erb @@ -53,7 +53,7 @@ <%= qualifier_icon(snapshot) %> <% if snapshot.display_dashboard? %> - <%= link_to_resource(project, h(snapshot.project.name)) %> + <%= link_to_resource(project, h(snapshot.project.name), :class => 'chevron-link highlighted-link') %> <% else %> <%= h snapshot.project.name %> <% end %> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/measures.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/measures.html.erb index a1879e7c268..b2133dc6896 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/measures.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/measures.html.erb @@ -84,10 +84,10 @@ <% end %> <%= qualifier_icon(resource) -%>  <% if resource.source_code? %> - <%= h resource.name(false) %> <% else %> - <%= link_to(h(resource.name), {:only_path => true, :overwrite_params => {:rids => (selected ? rids-[resource.id] : rids+[resource.id])}}) -%> + <%= link_to(h(resource.name), {:only_path => true, :overwrite_params => {:rids => (selected ? rids-[resource.id] : rids+[resource.id])}}, :class => 'chevron-link highlighted-link') -%> <% end %> -- 2.39.5