]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3532 Add server base URL to test email in configuration
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Mon, 12 May 2014 15:29:07 +0000 (17:29 +0200)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Mon, 12 May 2014 15:29:14 +0000 (17:29 +0200)
sonar-core/src/main/resources/org/sonar/l10n/core.properties
sonar-server/src/main/webapp/WEB-INF/app/controllers/email_configuration_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/views/email_configuration/index.html.erb

index 7d80779d7d5eee9966e02891129920b0d9585983..1633057724a30febb4d17e72ce7977371e4d4ac9 100644 (file)
@@ -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}
index 8d217f8efad91b3a14a243b3434f538c5ec2ab68..33b8600e4c500dae2961c5725fa58b3dc15c86b7 100644 (file)
@@ -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
index 232fbdbcc1f7740b587dda3b4a65d19db88bb60a..bea86751e415b1b538d1cfe44aeb6ea048a11290 100644 (file)
@@ -86,7 +86,7 @@
     </tr>
     <tr class="property">
       <th><label for="message"><h3><%= message('email_configuration.test.message') -%></h3></label></th>
-      <td><%= text_area_tag 'message', message('email_configuration.test.message_text'), {:cols => 40, :rows => 6} %></td>
+      <td><%= text_area_tag 'message', message('email_configuration.test.message_text') + ' ' + @server_base_url, {:cols => 40, :rows => 6} %></td>
     </tr>
     </tbody>
   </table>