Skip to content

[WebProfileBundle], [DebugBundle] Fixed big data in toolbar #12113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 3, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,27 @@
{% endset %}

{% set text %}
<div style="width: 450px; overflow: hidden;">
<div class="sf-toolbar-info-piece">
<b>dump()</b>
</div>
{% for dump in collector.getDumps('html') %}
<div class="sf-toolbar-info-piece">
<b>dump()</b>
</div>
{% for dump in collector.getDumps('html') %}
<div class="sf-toolbar-info-piece">
in
{% if dump.file %}
{% set link = dump.file|file_link(dump.line) %}
{% if link %}
<a href="{{ link }}" title="{{ dump.file }}">{{ dump.name }}</a>
{% else %}
<abbr title="{{ dump.file }}">{{ dump.name }}</abbr>
{% endif %}
in
{% if dump.file %}
{% set link = dump.file|file_link(dump.line) %}
{% if link %}
<a href="{{ link }}" title="{{ dump.file }}">{{ dump.name }}</a>
{% else %}
{{ dump.name }}
<abbr title="{{ dump.file }}">{{ dump.name }}</abbr>
{% endif %}
line {{ dump.line }}:
{{ dump.data|raw }}
</div>
{% endfor %}
<img src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" onload="var h = this.parentNode.innerHTML, rx=/<script>(.*?)<\/script>/g, s; while (s = rx.exec(h)) {eval(s[1]);};" />
</div>
{% else %}
{{ dump.name }}
{% endif %}
line {{ dump.line }}:
{{ dump.data|raw }}
</div>
{% endfor %}
<img src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" onload="var h = this.parentNode.innerHTML, rx=/<script>(.*?)<\/script>/g, s; while (s = rx.exec(h)) {eval(s[1]);};" />
{% endset %}

{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': true } %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@
var rows = document.createDocumentFragment();

if (requestStack.length) {
var firstItem = requestStack.length > 20 ? requestStack.length - 20 : 0;
for (var i = firstItem; i < requestStack.length; i++) {
for (var i = 0; i < requestStack.length; i++) {
var request = requestStack[i];

var row = document.createElement('tr');
Expand Down Expand Up @@ -145,7 +144,7 @@
tbody.appendChild(rows);

if (infoSpan) {
var text = firstItem == 0 ? requestStack.length + ' calls' : 'Last 20 calls out of ' + requestStack.length;
var text = requestStack.length + ' calls';
infoSpan.textContent = text;
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,12 @@
box-sizing: border-box;
padding: 9px;
line-height: 19px;

max-width: 480px;
max-height: 480px;
word-wrap: break-word;
overflow: hidden;
overflow-y: scroll;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

auto would be better than scroll, to add the scrollbar only when necessary instead of adding a scrollbar which cannot scroll.

}

table.sf-toolbar-ajax-requests {
Expand Down