]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-2124 Show difference when rules in derived profiles are changed
authorFabrice Bellingard <bellingard@gmail.com>
Thu, 26 Jan 2012 16:06:05 +0000 (17:06 +0100)
committerFabrice Bellingard <bellingard@gmail.com>
Thu, 26 Jan 2012 16:06:05 +0000 (17:06 +0100)
=> show when the severity has changed

plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/core.properties
sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule.html.erb

index 5d321b41a82050ed9c086adbbe13270abdba75e9..2bf9ab17650d40e9a16a5a78bdef4c8d928b30d7 100644 (file)
@@ -995,6 +995,7 @@ rules_configuration.rule_parameters=Parameters
 rules_configuration.rule_inherited_from_profile_x=Rule inherited from profile "{0}"
 rules_configuration.rule_overriding_from_profile_x=Rule overrides parent definition from profile "{0}"
 rules_configuration.original_value=Original value
+rules_configuration.original_severity=Original severity
 
 
 #------------------------------------------------------------------------------
index faa8602dd0c2277d136eda1b9868fbfbed727190..57123c9ea6e2379f92e816b746931a39a7603868 100644 (file)
@@ -60,6 +60,9 @@
               %>
                 <%= message( active_rule.inherited? ? 'rules_configuration.rule_inherited_from_profile_x' : 'rules_configuration.rule_overriding_from_profile_x',
                              :params => ancestor_active_rule_link) -%>
+                <% if ancestor_active_rule.priority != active_rule.priority %>
+                  <span class="note" style="font-weight: bold"> (<%= message('rules_configuration.original_severity') -%>: <%= ancestor_active_rule.priority_text -%>)</span>
+                <% end %>
                 <% if is_admin && active_rule.overrides? %>
                   <br/>
                   <%= button_to message('rules_configuration.revert_to_parent_definition'), :overwrite_params => {:action => 'revert_rule', :id => profile.id, :active_rule_id => active_rule.id} %><br/>