Skip to content

Commit cb53f4c

Browse files
committed
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 ------- 9ff86d6 [WebProfilerBundle] limit ajax request to 100 and remove the last one
2 parents 862e347 + 9ff86d6 commit cb53f4c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig

+5
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@
108108
var rows = document.createDocumentFragment();
109109
110110
if (requestStack.length) {
111+
var nbOfAjaxRequest = tbodies.rows.count();
112+
if (nbOfAjaxRequest >= 100) {
113+
tbodies.deleteRow(nbOfAjaxRequest - 1);
114+
}
115+
111116
for (var i = 0; i < requestStack.length; i++) {
112117
var request = requestStack[i];
113118

0 commit comments

Comments
 (0)