Vote #79969
未完了Add AppServer to Technical Information page
0%
説明
Hello
The Information page shows some useful data about the current environment. But one important information is missing: the app server.
So here is a patch which adds this information to the list.
Thank you
diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb
--- 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
--- 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
--- 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|