From 0c367e5dd0ced13d68471be365662c937bdd2aef Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Wed, 29 May 2024 18:04:12 +0100 Subject: [PATCH] Tidy admin/debug/index * Clean up the source code formatting * Add bootstrap table classes * Add a table-debug class for nicer font formatting --- app/assets/stylesheets/admin.scss | 6 ++ app/views/admin/debug/index.html.erb | 94 +++++++++++++++++++--------- 2 files changed, 71 insertions(+), 29 deletions(-) diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss index c1e7df9d91..84a270efb9 100644 --- a/app/assets/stylesheets/admin.scss +++ b/app/assets/stylesheets/admin.scss @@ -269,6 +269,12 @@ body.admin { } +/* Debug */ + +table.table-debug { + font-family: monospace; +} + /* Timeline */ .timeline_date { diff --git a/app/views/admin/debug/index.html.erb b/app/views/admin/debug/index.html.erb index f25536d44d..e88f70c4bf 100644 --- a/app/views/admin/debug/index.html.erb +++ b/app/views/admin/debug/index.html.erb @@ -1,4 +1,4 @@ -<% @title = "Debug" %> +<% @title = 'Debug' %>

<%= @title %>

@@ -6,49 +6,85 @@

Version numbers

-

- Alaveteli version: <%= @current_version %> -
- <% if @current_branch == "(no branch)" %> - Alaveteli branch: (no branch) - <% else %> - Alaveteli branch: <%= link_to @current_branch, @github_origin + @current_branch %> - <% end %> -
- Alaveteli commit: <%= link_to @current_commit, @github_origin + @current_commit %> -
- RUBY_VERSION <%= RUBY_VERSION %> -
- Rails::VERSION::STRING <%= Rails::VERSION::STRING %> -
- Xapian::version_string <%= Xapian::version_string %> -

+ + + + + + + + + + <% if @current_branch == '(no branch)' %> + + <% else %> + + <% end %> + + + + + + + + + + + + + + + + + + + + + +
Alaveteli version:<%= @current_version %>
Alaveteli Branch:(no branch)<%= link_to @current_branch, @github_origin + @current_branch %>
Alaveteli commit:<%= link_to @current_commit, @github_origin + @current_commit %>
RUBY_VERSION<%= RUBY_VERSION %>
Rails::VERSION::STRING<%= Rails::VERSION::STRING %>
Xapian::version_string<<%= Xapian::version_string %>

Configuration

-

- Rails env: <%= Rails.env %> -
- Rails root: <%= Rails.root %> -

+ + + + + + + + + +
Rails env:<%= Rails.env %>
Rails root:<%= Rails.root %>

Environment variables

- + +
<% @request_env.each do |k,v| %> - + + + + <% end %>
<%= k %><%= v %>
<%= k %><%= v %>

Parameters

- + +
<% params.each do |k,v| %> - + + + + <% end %>
<%= k %><%= v %>
<%= k %><%= v %>

Session

- + +
<% session.to_hash.each do |k,v| %> - + + + + <% end %>
<%= k %><%= v %>
<%= k %><%= v %>