Permalink
Browse files

Render request variables panel values more readably using #inspect, a…

…nd constrain very large values from blowing out the layout
  • Loading branch information...
1 parent d7b4e5e commit 64c67f40c143db4dfaf328a5bc469e85bc47be95 Luke Melia committed May 31, 2010
@@ -36,11 +36,11 @@ def split_and_filter_env(env)
server, rack = {}, {}
env.each do |k,v|
if k.index("rack.") == 0
- rack[k] = v.to_s
+ rack[k] = v
elsif k.index("rack-bug.") == 0
#don't output the rack-bug variables - especially secret_key
else
- server[k] = v.to_s
+ server[k] = v
end
end
return server, rack
@@ -209,3 +209,8 @@
#rack_bug #sql.panel_content th.actions {
width: 150px;
}
+#rack_bug #request_variables td.code > div {
+ max-height:200px;
+ max-width: 800px;
+ overflow:auto;
+}
@@ -2,7 +2,7 @@
next unless sections.has_key?(header)
%>
<h3><%=header%></h3>
- <table>
+ <table id="request_variables">
<thead>
<tr>
<th>Variable</th>
@@ -14,7 +14,7 @@
<% sections[header].each do |key, val| %>
<tr class="<%= i % 2 == 0 ? "even" : "odd" %>">
<td><%=h key %></td>
- <td class="code"><div><%=h val %></div></td>
+ <td class="code"><div><%=h val.inspect %></div></td>
</tr>
<% i += 1 %>
<% end %>

0 comments on commit 64c67f4

Please sign in to comment.