diff options
author | Jean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com> | 2014-07-28 15:14:21 +0200 |
---|---|---|
committer | Jean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com> | 2014-07-28 15:29:39 +0200 |
commit | 6e256170fb6b6e8048e841b4171e846ee5250806 (patch) | |
tree | 21baa88dc2496773ab8937089c57de5e587ba9c9 /server/sonar-web | |
parent | ec4297d574516f14a275a1355adc870246547b12 (diff) | |
download | sonarqube-6e256170fb6b6e8048e841b4171e846ee5250806.tar.gz sonarqube-6e256170fb6b6e8048e841b4171e846ee5250806.zip |
SONAR-4557 Move log to Rails code (java_facade.generateServerId is called on page load if server ID is set)
Diffstat (limited to 'server/sonar-web')
-rw-r--r-- | server/sonar-web/src/main/webapp/WEB-INF/app/controllers/server_id_configuration_controller.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/server_id_configuration_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/server_id_configuration_controller.rb index 68d7b3dc97c..4a9c047dfe5 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/server_id_configuration_controller.rb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/server_id_configuration_controller.rb @@ -33,7 +33,7 @@ class ServerIdConfigurationController < ApplicationController @address = Property.value(PROPERTY_IP_ADDRESS) || '' @valid_addresses = java_facade.getValidInetAddressesForServerId() @bad_id = false - + if @server_id.present? id = java_facade.generateServerId(@organisation, @address) @bad_id = (@server_id != id) @@ -54,6 +54,7 @@ class ServerIdConfigurationController < ApplicationController else id = java_facade.generateServerId(organisation, ip_address) if id + Java::OrgSlf4j::LoggerFactory::getLogger('root').info("Generated new server ID=" + id); # Success! Property.set(PROPERTY_SERVER_ID, id) else @@ -62,7 +63,7 @@ class ServerIdConfigurationController < ApplicationController flash[:error] = Api::Utils.message('server_id_configuration.generation_error') end end - + redirect_to :action => 'index' end end |