| 4 | | clean_backtrace = @exception.clean_backtrace |
|---|
| 5 | | app_trace = @exception.application_backtrace |
|---|
| 6 | | framework_trace = clean_backtrace - app_trace |
|---|
| 7 | | traces = {"Application Trace" => app_trace, "Framework Trace" => framework_trace, "Full Trace" => clean_backtrace} |
|---|
| 8 | | trace_names = ["Application Trace", "Framework Trace", "Full Trace"] |
|---|
| | 2 | traces = [ |
|---|
| | 3 | ["Application Trace", @exception.application_backtrace], |
|---|
| | 4 | ["Framework Trace", @exception.framework_backtrace], |
|---|
| | 5 | ["Full Trace", @exception.clean_backtrace] |
|---|
| | 6 | ] |
|---|
| | 7 | names = traces.collect {|name, trace| name} |
|---|
| 12 | | <% trace_names.each do |k| -%> |
|---|
| 13 | | <div id="<%= k.gsub /\s/, '-' %>" style="display: <%= k == "Application Trace" ? 'block' : 'none' %>;"> |
|---|
| 14 | | <% trace_names.each do |ok| -%> |
|---|
| 15 | | <a href="#" onclick="document.getElementById('<%= k.gsub /\s/, '-' %>').style.display='none'; document.getElementById('<%= ok.gsub /\s/, '-' %>').style.display='block'; return false;"><%= ok %></a> <%= '|' unless trace_names.last == ok %> |
|---|
| 16 | | <% end -%> |
|---|
| 17 | | <pre><code><%= traces[k].join "\n" %></code></pre> |
|---|
| | 11 | <% names.each do |name| -%> |
|---|
| | 12 | <% |
|---|
| | 13 | show = "document.getElementById('#{name.gsub /\s/, '-'}').style.display='block';" |
|---|
| | 14 | hide = (names - [name]).collect {|hide_name| "document.getElementById('#{hide_name.gsub /\s/, '-'}').style.display='none';"} |
|---|
| | 15 | %> |
|---|
| | 16 | <a href="#" onclick="<%= hide %><%= show %>; return false;"><%= name %></a> <%= '|' unless names.last == name %> |
|---|
| | 17 | <% end -%> |
|---|
| | 18 | |
|---|
| | 19 | <% traces.each do |name, trace| -%> |
|---|
| | 20 | <div id="<%= name.gsub /\s/, '-' %>" style="display: <%= name == "Application Trace" ? 'block' : 'none' %>;"> |
|---|
| | 21 | <pre><code><%= trace.join "\n" %></code></pre> |
|---|