diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-10-13 12:40:37 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-10-13 12:57:27 +0200 |
commit | 3ac8de59552f3d38f9b952079cbffa8572840731 (patch) | |
tree | e2c353cba55e9d2db47f7801a64d408a3fe30885 /server/sonar-web/src/main | |
parent | bd18f3974b18e03f40ca14b86b82a8851124b107 (diff) | |
download | sonarqube-3ac8de59552f3d38f9b952079cbffa8572840731.tar.gz sonarqube-3ac8de59552f3d38f9b952079cbffa8572840731.zip |
SONAR-5673 Creating a new profile from a configuration file is not working
Diffstat (limited to 'server/sonar-web/src/main')
-rw-r--r-- | server/sonar-web/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb | 9 | ||||
-rw-r--r-- | server/sonar-web/src/main/webapp/WEB-INF/app/views/profiles/_create_form.html.erb | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb index b6a5ba9f4e2..6956a1287eb 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb @@ -71,10 +71,9 @@ class ProfilesController < ApplicationController end end profile_name = Java::OrgSonarServerQualityprofile::QProfileName.new(params[:language], params[:name]) - Internal.qprofile_service.create(profile_name) - # TODO use files_by_key - #flash[:notice] = message('quality_profiles.profile_x_created', :params => result.profile.name) - #flash_result(result) + result = Internal.qprofile_service.create(profile_name, files_by_key) + flash[:notice] = message('quality_profiles.profile_x_created', :params => result.profile().getName()) + flash_result(result) end redirect_to :action => 'index' end @@ -530,7 +529,7 @@ class ProfilesController < ApplicationController def flash_result(result) # only 4 messages are kept each time to avoid cookie overflow. unless result.infos.empty? - flash[:notice] += result.infos.to_a[0...4].join('<br/>') + flash[:notice] += '<br/>' + result.infos.to_a[0...4].join('<br/>') end unless result.warnings.empty? flash[:warning] = result.warnings.to_a[0...4].join('<br/>') diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/profiles/_create_form.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/profiles/_create_form.html.erb index 328e2af6add..a003c054478 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/profiles/_create_form.html.erb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/profiles/_create_form.html.erb @@ -1,6 +1,6 @@ <% language = controller.java_facade.getLanguages().find { |l| l.getKey()==language_key } - importers = Internal.component(Java::OrgSonarServerQualityprofile::QProfileRepositoryExporter.java_class).getProfileImportersForLanguage(language_key) + importers = Internal.component(Java::OrgSonarServerQualityprofile::QProfileExporters.java_class).findProfileImportersForLanguage(language_key) %> <form id="create-profile-form" action="profiles/create" enctype="multipart/form-data" method="POST"> <fieldset> |