bug #25557 [WebProfilerBundle] add a way to limit ajax request (Simperfit)

This PR was merged into the 2.7 branch.

Discussion
----------

[WebProfilerBundle] add a way to limit ajax request

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #22688
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

I need to add the doc entry and the reproducer to test that everything is ok.

Commits
-------

9ff86d6181 [WebProfilerBundle] limit ajax request to 100 and remove the last one
This commit is contained in:
Fabien Potencier 2018-02-19 21:11:32 +01:00
commit cb53f4ccd5
1 changed files with 5 additions and 0 deletions

View File

@ -108,6 +108,11 @@
var rows = document.createDocumentFragment();
if (requestStack.length) {
var nbOfAjaxRequest = tbodies.rows.count();
if (nbOfAjaxRequest >= 100) {
tbodies.deleteRow(nbOfAjaxRequest - 1);
}
for (var i = 0; i < requestStack.length; i++) {
var request = requestStack[i];