diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 885c3a169..1368375d7 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -77,5 +77,6 @@ class AdminController < ApplicationController [:text_rmagick_available, Object.const_defined?(:Magick)], [:text_convert_available, Redmine::Thumbnail.convert_available?] ] + @request = request end end diff --git a/app/views/admin/info.html.erb b/app/views/admin/info.html.erb index c56d14eb6..6a0ae9cb0 100644 --- a/app/views/admin/info.html.erb +++ b/app/views/admin/info.html.erb @@ -12,7 +12,7 @@
-
<%= Redmine::Info.environment %>
+
<%= Redmine::Info.environment(@request) %>
<% html_title(l(:label_information_plural)) -%> diff --git a/lib/redmine/info.rb b/lib/redmine/info.rb index 62452e277..25d0f991c 100644 --- a/lib/redmine/info.rb +++ b/lib/redmine/info.rb @@ -6,17 +6,17 @@ module Redmine def help_url; 'https://www.redmine.org/guide' end def versioned_name; "#{app_name} #{Redmine::VERSION}" end - def environment + def environment(request = nil) s = "Environment:\n" - s << [ - ["Redmine version", Redmine::VERSION], - ["Ruby version", "#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}]"], - ["Rails version", Rails::VERSION::STRING], - ["Environment", Rails.env], - ["Database adapter", ActiveRecord::Base.connection.adapter_name], - ["Mailer queue", ActionMailer::DeliveryJob.queue_adapter.class.name], - ["Mailer delivery", ActionMailer::Base.delivery_method] - ].map {|info| " %-30s %s" % info}.join("\n") + "\n" + environment_data = [["Redmine version", Redmine::VERSION], + ["Ruby version", "#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}]"], + ["Rails version", Rails::VERSION::STRING], + ["Environment", Rails.env], + ["Database adapter", ActiveRecord::Base.connection.adapter_name], + ["Mailer queue", ActionMailer::DeliveryJob.queue_adapter.class.name], + ["Mailer delivery", ActionMailer::Base.delivery_method]] + environment_data << ["App server", request.get_header("SERVER_SOFTWARE")] if request.present? + s << environment_data.map {|info| " %-30s %s" % info}.join("\n") + "\n" s << "SCM:\n" Redmine::Scm::Base.all.each do |scm|