8000 [WebProfilerBundle] Add HTTP return code in the Ajax request list table by kucharovic · Pull Request #17540 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[WebProfilerBundle] Add HTTP return code in the Ajax request list table #17540

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added background color according to response
  • Loading branch information
kucharovic committed Jan 26, 2016
commit 2cb84ca182ba96c7e266db8335f974f15b94fe53
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,16 @@
row.appendChild(methodCell);

var statusCodeCell = document.createElement('td');
if (request.statusCode) {
statusCodeCell.textContent = request.statusCode;
var statusCode = document.createElement('span');
if (request.statusCode < 300) {
statusCode.setAttribute('class', 'sf-toolbar-status sf-toolbar-status-green');
} else if (request.statusCode < 400) {
statusCode.setAttribute('class', 'sf-toolbar-status sf-toolbar-status-yellow');
} else {
statusCodeCell.textContent = '-';
statusCode.setAttribute('class', 'sf-toolbar-status sf-toolbar-status-red');
}
statusCode.textContent = request.statusCode || '-';
statusCodeCell.appendChild(statusCode);
row.appendChild(statusCodeCell);

var pathCell = document.createElement('td');
Expand Down
0