Actions
Patch #31151
openAdd AppServer to Technical Information page
Status:
New
Priority:
Normal
Assignee:
-
Category:
Administration
Target version:
-
Start date:
Due date:
% Done:
0%
Estimated time:
Description
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 @@
</table>
<br />
<div class="box">
-<pre><%= Redmine::Info.environment %></pre>
+<pre><%= Redmine::Info.environment(@request) %></pre>
</div>
<% 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|
Files
No data to display
Actions