From: Julien Lancelot Date: Fri, 20 Jun 2014 13:18:05 +0000 (+0200) Subject: SONAR-5329 Replace id by key in /profiles/changelog X-Git-Tag: 4.4-RC1~244 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=16029c289bdc8f9eb100a4881c766e2a5949837b;p=sonarqube.git SONAR-5329 Replace id by key in /profiles/changelog --- 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 f74268f6386..4e7bcc18957 100644 --- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties +++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties @@ -1591,14 +1591,7 @@ quality_profiles.no_version=no version quality_profiles.last_version_x_with_date=last version {0} ({1}) quality_profiles.version_x_with_date=version {0} ({1}) quality_profiles.version_x=version {0} -quality_profiles.profile_version=Profile version -quality_profiles.severity_changed_from_x_to=Severity changed from {0}{1} to -quality_profiles.severity_was_x=Severity was {0}{1} -quality_profiles.severity_set_to_x=Severity set to {0}{1} quality_profiles.parameter_set_to_x=Parameter {0} set to {1} -quality_profiles.parameter_was_x=Parameter {0} was {1} -quality_profiles.parameter_reset_to_default_value_x=Parameter {0} reset to default value (was {1}) -quality_profiles.parameter_changed_from_x_to_x=Parameter {0} changed from {1} to {2} quality_profiles.only_in_profile_x=Only in {0} quality_profiles.with_different_configuration=With different configuration quality_profiles.with_same_configuration=With same configuration @@ -1622,11 +1615,12 @@ quality_profiles.including=including quality_profiles.deprecated=deprecated quality_profiles.manage_rules_tooltip=Manage rules of this profile quality_profiles.see_rules_tooltip=See rules of this profile -quality_profiles.changelog.empty=No changes have been done. quality_profiles.changelog_from=Changelog from +quality_profiles.changelog.empty=No changes have been done. quality_profiles.changelog.activated=Activated quality_profiles.changelog.deactivated=Deactivated quality_profiles.changelog.updated=Updated +quality_profiles.changelog.parameter_reset_to_default_value_x=Parameter {0} reset to default value #------------------------------------------------------------------------------ diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb index 27b70e9a7ca..04f4cd80389 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb @@ -241,11 +241,11 @@ class ProfilesController < ApplicationController redirect_to :action => 'inheritance', :id => params[:id] end - # GET /profiles/changelog?id= + # GET /profiles/changelog?key= def changelog - require_parameters 'id' + require_parameters 'key' - @profile = Internal.quality_profiles.profile(params[:id].to_i) + @profile = Internal.component(Java::OrgSonarServerQualityprofile::QProfileService.java_class).getByKey(params[:key]) search = {'profileKeys' => @profile.key().to_s, 'since' => params[:since], 'to' => params[:to]} @changes = Internal.component(Java::OrgSonarServerActivity::RubyActivityService.java_class).search(search) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/_tabs.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/_tabs.html.erb index 0e686faa0d6..d11fd395eb8 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/_tabs.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/_tabs.html.erb @@ -16,7 +16,7 @@ id="tab-inheritance"><%= message('quality_profiles.profile_inheritance') -%>
  • - id="tab-changelog"><%= message('changelog') -%> + id="tab-changelog"><%= message('changelog') -%>
  • <% if new_tab %>
  • diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/changelog.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/changelog.html.erb index 464adc6905c..ff8d29ff01b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/changelog.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/changelog.html.erb @@ -6,7 +6,7 @@ <%= message('quality_profiles.changelog.empty') -%> <% else %>
    - + <%= message('quality_profiles.changelog_from') -%> <%= message('to').downcase -%> @@ -44,7 +44,11 @@
    <% end %> <% change.parameters().each do |param_key, param_value| %> - <%= message('quality_profiles.parameter_set_to_x', :params => [param_key, param_value]) -%> + <% if !param_value.empty? %> + <%= message('quality_profiles.parameter_set_to_x', :params => [param_key, param_value]) -%> + <% else %> + <%= message('quality_profiles.changelog.parameter_reset_to_default_value_x', :params => [param_key]) -%> + <% end %>
    <% end %>