-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[profiler] show cookies in separated tab for each request
- Loading branch information
Showing
4 changed files
with
95 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
{% macro display_array_recursive(array, separator = ', ', opening_char = '[', closing_char = ']') -%} | ||
{{ opening_char }} | ||
{%- for key, value in array -%} | ||
{%- if value is iterable -%} | ||
{{ key }} => {{ _self.display_array_recursive(value, separator, opening_char, closing_char) }} | ||
{%- else -%} | ||
{{ key }} => {{ value }} | ||
{%- if not loop.last %}{{ separator }}{% endif -%} | ||
{%- endif -%} | ||
{%- endfor -%} | ||
{{ closing_char }} | ||
{%- endmacro %} | ||
|
||
|
||
<h5>Request Cookies</h5> | ||
|
||
|
||
<table> | ||
<tbody> | ||
{% for name, parameter in request.cookies %} | ||
<tr> | ||
<th valign="top">{{ name }}</th> | ||
<td> | ||
{% if parameter is iterable %} | ||
{{ _self.display_array_recursive(parameter) }} | ||
{% else %} | ||
{{ parameter }} | ||
{% endif %} | ||
</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
|
||
|
||
{% if response %} | ||
<h5>Response Cookies</h5> | ||
|
||
<table> | ||
<tbody> | ||
{% for name, parameter in response.cookies %} | ||
<tr> | ||
{% if parameter.cleared %} | ||
<th valign="top" style="text-decoration: line-through">{{ name }}</th> | ||
{% else %} | ||
<th valign="top">{{ name }}</th> | ||
{% endif %} | ||
<td> | ||
{% if not parameter.cleared %} | ||
{{ parameter.value }} | ||
<hr style="background: #DDD; border:none; height:1px;" /> | ||
{% endif %} | ||
<div style="color:#888"> | ||
{% if parameter is iterable %} | ||
{{ _self.display_array_recursive(parameter) }} | ||
{% else %} | ||
{{ parameter }} | ||
{% endif %} | ||
</div> | ||
</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters