8000 [WebProfilerBundle] Add HTTP return code in the Ajax request list table · symfony/symfony@d8043d4 · GitHub
[go: up one dir, main page]

Skip to content

Commit d8043d4

Browse files
committed
[WebProfilerBundle] Add HTTP return code in the Ajax request list table
Q | A ---|--- Bug fix? | no New feature? | yes BC breaks? | no Deprecations? | no Tests pass? | yes Fixed tickets | [17518](#17518) License | MIT Doc PR | -
1 parent f3e6a82 commit d8043d4

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/ajax.html.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<thead>
1616
<tr>
1717
<th>Method</th>
18+
<th>Status</th>
1819
<th>URL</th>
1920
<th>Time</th>
2021
<th>Profile</th>

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,14 @@
110110
methodCell.textContent = request.method;
111111
row.appendChild(methodCell);
112112
113+
var statusCodeCell = document.createElement('td');
114+
if (request.statusCode) {
115+
statusCodeCell.textContent = request.statusCode;
116+
} else {
117+
statusCodeCell.textContent = '-';
118+
}
119+
row.appendChild(statusCodeCell);
120+
113121
var pathCell = document.createElement('td');
114122
pathCell.className = 'sf-ajax-request-url';
115123
if ('GET' === request.method) {
@@ -241,6 +249,7 @@
241249
stackElement.duration = new Date() - stackElement.start;
242250
stackElement.loading = false;
243251
stackElement.error = self.status < 200 || self.status >= 400;
252+
stackElement.statusCode = self.status;
244253
stackElement.profile = self.getResponseHeader("X-Debug-Token");
245254
stackElement.profilerUrl = self.getResponseHeader("X-Debug-Token-Link");
246255

0 commit comments

Comments
 (0)
0