File tree 2 files changed +15
-0
lines changed
src/Symfony/Bundle/WebProfilerBundle/Resources/views
2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 15
15
<thead >
16
16
<tr >
17
17
<th >Method</th >
18
+ <th >Status</th >
18
19
<th >URL</th >
19
20
<th >Time</th >
20
21
<th >Profile</th >
Original file line number Diff line number Diff line change 110
110
methodCell .textContent = request .method ;
111
111
row .appendChild (methodCell);
112
112
113
+ var statusCodeCell = document .createElement (' td' );
114
+ var statusCode = document .createElement (' span' );
115
+ if (request .statusCode < 300 ) {
116
+ statusCode .setAttribute (' class' , ' sf-toolbar-status' );
117
+ } else if (request .statusCode < 400 ) {
118
+ statusCode .setAttribute (' class' , ' sf-toolbar-status sf-toolbar-status-yellow' );
119
+ } else {
120
+ statusCode .setAttribute (' class' , ' sf-toolbar-status sf-toolbar-status-red' );
121
+ }
122
+ statusCode .textContent = request .statusCode || ' -' ;
123
+ statusCodeCell .appendChild (statusCode);
124
+ row .appendChild (statusCodeCell);
125
+
113
126
var pathCell = document .createElement (' td' );
114
127
pathCell .className = ' sf-ajax-request-url' ;
115
128
if (' GET' === request .method ) {
241
254
stackElement .duration = new Date () - stackElement .start ;
242
255
stackElement .loading = false ;
243
256
stackElement .error = self .status < 200 || self .status >= 400 ;
257
+ stackElement .statusCode = self .status ;
244
258
stackElement .profile = self .getResponseHeader (" X-Debug-Token" );
245
259
stackElement .profilerUrl = self .getResponseHeader (" X-Debug-Token-Link" );
246
260
You can’t perform that action at this time.
0 commit comments