diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2015-02-06 17:41:40 +0100 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2015-02-06 17:41:40 +0100 |
commit | 46477b4afa2515d8c6e1bddda3191e367d67b52e (patch) | |
tree | 04f5b311a1f925d9d370d591bc5183396298d8cf /plugins | |
parent | 6dc37c6e24e0d85e723efbf5aa761fcba0498a46 (diff) | |
download | sonarqube-46477b4afa2515d8c6e1bddda3191e367d67b52e.tar.gz sonarqube-46477b4afa2515d8c6e1bddda3191e367d67b52e.zip |
SONAR-3566 Make it clear that issue-related information displayed in widgets is desynchronized
Diffstat (limited to 'plugins')
2 files changed, 36 insertions, 16 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 4a4ea3e3341..d50c712836a 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 @@ -50,15 +50,17 @@ is_issue_measure = get_issue_metrics.include? condition_metric.name is_not_difference_measure_with_period = !is_difference_measure && !period.blank? && !is_issue_measure + tooltip = message('widget.as_calculated_on_x', :params => l(@snapshot.created_at)) + unless level == 'OK' && !widget_properties['show_ok'] -%> <div class="dashbox" style="margin: 10px; vertical-align: baseline"> <p class="title"><%= condition_metric.short_name -%></p> <% if is_not_difference_measure_with_period %> - <span class="big"><%= format_measure(actual_measure) -%></span> + <span class="big" title="<%= tooltip -%>" data-toggle="tooltip" data-placement="bottom"><%= format_measure(actual_measure) -%></span> <% else %> - <span class="big"><%= format_measure(actual_measure, :url => drilldown_url) -%></span> + <span class="big" title="<%= tooltip -%>" data-toggle="tooltip" data-placement="bottom"><%= 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 -%> 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 a2e540c8511..b0b8814b20f 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 @@ -19,6 +19,8 @@ if @dashboard_configuration.selected_period? period_date = @snapshot.period_datetime(@dashboard_configuration.period_index).strftime('%FT%T%z') end + + tooltip = message('widget.as_calculated_on_x', :params => l(@snapshot.created_at)) %> <div class="widget-row"> @@ -28,7 +30,8 @@ <div class="widget-measure-container"> <div class="widget-measure widget-measure-main"> <span class="widget-label"><%= message('metric.sqale_index.short_name') -%></span> - <a href="<%= url_for_drilldown('sqale_index') -%>" class="widget-link link-<%= widget.key %>-debt"> + <a href="<%= url_for_drilldown('sqale_index') -%>" class="widget-link link-<%= widget.key %>-debt" + title="<%= tooltip -%>" data-toggle="tooltip" data-placement="bottom"> <%= format_measure(technical_debt) -%> </a> <%= trend_icon(technical_debt) unless dashboard_configuration.selected_period? -%> @@ -43,7 +46,8 @@ <p class="small"> <%= message('widget.rules.added') %> <a href="<%= url_for_drilldown('new_technical_debt', :period => @dashboard_configuration.period_index) -%>" - class="varw widget-link widget-link-red link-<%= widget.key %>-new-debt">+<%= format_variation(new_technical_debt, :style => 'none', :default => '-') -%></a> + class="varw widget-link widget-link-red link-<%= widget.key %>-new-debt" + title="<%= tooltip -%>" data-toggle="tooltip" data-placement="bottom">+<%= format_variation(new_technical_debt, :style => 'none', :default => '-') -%></a> </p> <% if estimated_cleared_technical_debt && estimated_cleared_technical_debt > 0 %> <p class="small"> @@ -63,7 +67,10 @@ <span class="widget-label"><%= message('widget.rules.issues') -%></span> <span class="nowrap"> <span class="link-<%= widget.key %>-issues"> - <%= format_measure(issues, :url => "#{url_for(:controller => 'component_issues', :action => 'index')}?id=#{url_encode(@project.key)}") -%> + <a href="<%= "#{url_for(:controller => 'component_issues', :action => 'index')}?id=#{url_encode(@project.key)}" -%>" class="widget-link link-<%= widget.key %>-debt" + title="<%= tooltip -%>" data-toggle="tooltip" data-placement="bottom"> + <%= format_measure(issues) -%> + </a> </span> <%= trend_icon(issues) unless @dashboard_configuration.selected_period? -%> </span> @@ -78,7 +85,8 @@ <p class="small"> <%= message('widget.rules.added') %> <a href="<%= url_for(:controller => 'component_issues', :action => 'index') -%>?id=<%= url_encode(@project.key) -%>#resolved=false|createdAfter=<%= period_date -%>" - class="varw widget-link widget-link-red link-<%= widget.key %>-new-issues">+<%= format_variation(new_issues, :style => 'none', :default => '-') -%></a> + class="varw widget-link widget-link-red link-<%= widget.key %>-new-issues" + title="<%= tooltip -%>" data-toggle="tooltip" data-placement="bottom">+<%= format_variation(new_issues, :style => 'none', :default => '-') -%></a> </p> <% if estimated_cleared_issues && estimated_cleared_issues > 0 %> <p class="small"> @@ -99,14 +107,16 @@ <%= message('blocker') -%> </td> <td class="thin right nowrap"> - <a href="<%= url_for(:controller => 'component_issues', :action => 'index') -%>?id=<%= url_encode(@project.key) -%>#resolved=false|severities=BLOCKER" class="widget-link drilldown_BLOCKER"> + <a href="<%= url_for(:controller => 'component_issues', :action => 'index') -%>?id=<%= url_encode(@project.key) -%>#resolved=false|severities=BLOCKER" + class="widget-link drilldown_BLOCKER" title="<%= tooltip -%>" data-toggle="tooltip" data-placement="bottom"> <%= format_measure(blocker_issues) -%> </a> </td> <td class="thin nowrap"> <% if @dashboard_configuration.selected_period? %> <a href="<%= url_for(:controller => 'component_issues', :action => 'index') -%>?id=<%= url_encode(@project.key) -%>#resolved=false|severities=BLOCKER|createdAfter=<%= period_date -%>" - class="varw widget-link widget-link-red link-<%= widget.key %>-new-blocker-issues">+<%= format_variation(new_blocker_issues, :style => 'none', :default => '-') -%></a> + class="varw widget-link widget-link-red link-<%= widget.key %>-new-blocker-issues" + title="<%= tooltip -%>" data-toggle="tooltip" data-placement="bottom">+<%= format_variation(new_blocker_issues, :style => 'none', :default => '-') -%></a> <% else %> <%= trend_icon(blocker_issues, :empty => true) -%> <% end %> @@ -118,14 +128,16 @@ <%= message('critical') -%> </td> <td class="thin right nowrap"> - <a href="<%= url_for(:controller => 'component_issues', :action => 'index') -%>?id=<%= url_encode(@project.key) -%>#resolved=false|severities=CRITICAL" class="widget-link drilldown_CRITICAL"> + <a href="<%= url_for(:controller => 'component_issues', :action => 'index') -%>?id=<%= url_encode(@project.key) -%>#resolved=false|severities=CRITICAL" + class="widget-link drilldown_CRITICAL" title="<%= tooltip -%>" data-toggle="tooltip" data-placement="bottom"> <%= format_measure(critical_issues) -%> </a> </td> <td class="thin nowrap"> <% if @dashboard_configuration.selected_period? %> <a href="<%= url_for(:controller => 'component_issues', :action => 'index') -%>?id=<%= url_encode(@project.key) -%>#resolved=false|severities=CRITICAL|createdAfter=<%= period_date -%>" - class="varw widget-link widget-link-red link-<%= widget.key %>-new-critical-issues">+<%= format_variation(new_critical_issues, :style => 'none', :default => '-') -%></a> + class="varw widget-link widget-link-red link-<%= widget.key %>-new-critical-issues" + title="<%= tooltip -%>" data-toggle="tooltip" data-placement="bottom">+<%= format_variation(new_critical_issues, :style => 'none', :default => '-') -%></a> <% else %> <%= trend_icon(critical_issues, :empty => true) -%> <% end %> @@ -137,14 +149,16 @@ <%= message('major') -%> </td> <td class="thin right nowrap"> - <a href="<%= url_for(:controller => 'component_issues', :action => 'index') -%>?id=<%= url_encode(@project.key) -%>#resolved=false|severities=MAJOR" class="widget-link drilldown_MAJOR"> + <a href="<%= url_for(:controller => 'component_issues', :action => 'index') -%>?id=<%= url_encode(@project.key) -%>#resolved=false|severities=MAJOR" + class="widget-link drilldown_MAJOR" title="<%= tooltip -%>" data-toggle="tooltip" data-placement="bottom"> <%= format_measure(major_issues) -%> </a> </td> <td class="thin nowrap"> <% if @dashboard_configuration.selected_period? %> <a href="<%= url_for(:controller => 'component_issues', :action => 'index') -%>?id=<%= url_encode(@project.key) -%>#resolved=false|severities=MAJOR|createdAfter=<%= period_date -%>" - class="varw widget-link widget-link-red link-<%= widget.key %>-new-major-issues">+<%= format_variation(new_major_issues, :style => 'none', :default => '-') -%></a> + class="varw widget-link widget-link-red link-<%= widget.key %>-new-major-issues" + title="<%= tooltip -%>" data-toggle="tooltip" data-placement="bottom">+<%= format_variation(new_major_issues, :style => 'none', :default => '-') -%></a> <% else %> <%= trend_icon(major_issues, :empty => true) -%> <% end %> @@ -156,14 +170,16 @@ <%= message('minor') -%> </td> <td class="thin right nowrap"> - <a href="<%= url_for(:controller => 'component_issues', :action => 'index') -%>?id=<%= url_encode(@project.key) -%>#resolved=false|severities=MINOR" class="widget-link drilldown_MINOR"> + <a href="<%= url_for(:controller => 'component_issues', :action => 'index') -%>?id=<%= url_encode(@project.key) -%>#resolved=false|severities=MINOR" + class="widget-link drilldown_MINOR" title="<%= tooltip -%>" data-toggle="tooltip" data-placement="bottom"> <%= format_measure(minor_issues) -%> </a> </td> <td class="thin nowrap"> <% if @dashboard_configuration.selected_period? %> <a href="<%= url_for(:controller => 'component_issues', :action => 'index') -%>?id=<%= url_encode(@project.key) -%>#resolved=false|severities=MINOR|createdAfter=<%= period_date -%>" - class="varw widget-link widget-link-red link-<%= widget.key %>-new-minor-issues">+<%= format_variation(new_minor_issues, :style => 'none', :default => '-') -%></a> + class="varw widget-link widget-link-red link-<%= widget.key %>-new-minor-issues" + title="<%= tooltip -%>" data-toggle="tooltip" data-placement="bottom">+<%= format_variation(new_minor_issues, :style => 'none', :default => '-') -%></a> <% else %> <%= trend_icon(minor_issues, :empty => true) -%> <% end %> @@ -175,14 +191,16 @@ <%= message('info') -%> </td> <td class="thin right nowrap"> - <a href="<%= url_for(:controller => 'component_issues', :action => 'index') -%>?id=<%= url_encode(@project.key) -%>#resolved=false|severities=INFO" class="widget-link drilldown_INFO"> + <a href="<%= url_for(:controller => 'component_issues', :action => 'index') -%>?id=<%= url_encode(@project.key) -%>#resolved=false|severities=INFO" + class="widget-link drilldown_INFO" title="<%= tooltip -%>" data-toggle="tooltip" data-placement="bottom"> <%= format_measure(info_issues) -%> </a> </td> <td class="thin nowrap"> <% if @dashboard_configuration.selected_period? %> <a href="<%= url_for(:controller => 'component_issues', :action => 'index') -%>?id=<%= url_encode(@project.key) -%>#resolved=false|severities=INFO|createdAfter=<%= period_date -%>" - class="varw widget-link widget-link-red link-<%= widget.key %>-new-info-issues">+<%= format_variation(new_info_issues, :style => 'none', :default => '-') -%></a> + class="varw widget-link widget-link-red link-<%= widget.key %>-new-info-issues" + title="<%= tooltip -%>" data-toggle="tooltip" data-placement="bottom">+<%= format_variation(new_info_issues, :style => 'none', :default => '-') -%></a> <% else %> <%= trend_icon(info_issues, :empty => true) -%> <% end %> |