From: Jean-Baptiste Lievremont Date: Mon, 12 May 2014 15:29:07 +0000 (+0200) Subject: SONAR-3532 Add server base URL to test email in configuration X-Git-Tag: 4.4-RC1~1122 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e68949500502b176e986bc1ce8f87d6f6d1bf71d;p=sonarqube.git SONAR-3532 Add server base URL to test email in configuration --- 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 7d80779d7d5..1633057724a 100644 --- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties +++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties @@ -1768,7 +1768,7 @@ email_configuration.test.to_address_required=You must provide address where to s email_configuration.test.subject=Subject email_configuration.test.subject_text=Test Message from SonarQube email_configuration.test.message=Message -email_configuration.test.message_text=This is a test message from SonarQube +email_configuration.test.message_text=This is a test message from SonarQube at email_configuration.test.send=Send Test Email email_configuration.test.sending=Sending Test Email email_configuration.test.email_was_sent_to_x=Email was sent to {0} diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/email_configuration_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/email_configuration_controller.rb index 8d217f8efad..33b8600e4c5 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/email_configuration_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/email_configuration_controller.rb @@ -30,6 +30,7 @@ class EmailConfigurationController < ApplicationController @smtp_password = Property.value(configuration::SMTP_PASSWORD, nil, configuration::SMTP_PASSWORD_DEFAULT) @email_from = Property.value(configuration::FROM, nil, configuration::FROM_DEFAULT) @email_prefix = Property.value(configuration::PREFIX, nil, configuration::PREFIX_DEFAULT) + @server_base_url = Property.value(properties::SERVER_BASE_URL, nil, properties::SERVER_BASE_URL_DEFAULT_VALUE) params[:layout]='false' end @@ -68,4 +69,8 @@ class EmailConfigurationController < ApplicationController java_facade.getComponentByClassname('emailnotifications', 'org.sonar.api.config.EmailSettings').class end + def properties + Java::OrgSonarApi::CoreProperties + end + end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/email_configuration/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/email_configuration/index.html.erb index 232fbdbcc1f..bea86751e41 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/email_configuration/index.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/email_configuration/index.html.erb @@ -86,7 +86,7 @@ - <%= text_area_tag 'message', message('email_configuration.test.message_text'), {:cols => 40, :rows => 6} %> + <%= text_area_tag 'message', message('email_configuration.test.message_text') + ' ' + @server_base_url, {:cols => 40, :rows => 6} %>