File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
src/Symfony/Bundle/WebProfilerBundle/Resources/views Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 1515 <thead >
1616 <tr >
1717 <th >Method</th >
18+ <th >Status</th >
1819 <th >URL</th >
1920 <th >Time</th >
2021 <th >Profile</th >
Original file line number Diff line number Diff line change 110110 methodCell .textContent = request .method ;
111111 row .appendChild (methodCell);
112112
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+
113126 var pathCell = document .createElement (' td' );
114127 pathCell .className = ' sf-ajax-request-url' ;
115128 if (' GET' === request .method ) {
241254 stackElement .duration = new Date () - stackElement .start ;
242255 stackElement .loading = false ;
243256 stackElement .error = self .status < 200 || self .status >= 400 ;
257+ stackElement .statusCode = self .status ;
244258 stackElement .profile = self .getResponseHeader (" X-Debug-Token" );
245259 stackElement .profilerUrl = self .getResponseHeader (" X-Debug-Token-Link" );
246260
You can’t perform that action at this time.
0 commit comments