Skip to content

Improved the Ajax profiler panel when there are exceptions #26665

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

Merged
merged 1 commit into from
Mar 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
<table class="sf-toolbar-ajax-requests">
<thead>
<tr>
<th>Profile</th>
<th>Method</th>
<th>Type</th>
<th>Status</th>
<th>URL</th>
<th>Time</th>
<th>Profile</th>
</tr>
</thead>
<tbody class="sf-toolbar-ajax-request-list"></tbody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@
var row = document.createElement('tr');
request.DOMNode = row;

var profilerCell = document.createElement('td');
profilerCell.textContent = 'n/a';
row.appendChild(profilerCell);

var methodCell = document.createElement('td');
methodCell.textContent = request.method;
row.appendChild(methodCell);
Expand Down Expand Up @@ -164,10 +168,6 @@
durationCell.textContent = 'n/a';
row.appendChild(durationCell);

var profilerCell = document.createElement('td');
profilerCell.textContent = 'n/a';
row.appendChild(profilerCell);

row.className = 'sf-ajax-request sf-ajax-request-loading';
tbody.insertBefore(row, tbody.firstChild);

Expand All @@ -182,11 +182,11 @@
pendingRequests--;
var row = request.DOMNode;
/* Unpack the children from the row */
var methodCell = row.children[0];
var statusCodeCell = row.children[2];
var profilerCell = row.children[0];
var methodCell = row.children[1];
var statusCodeCell = row.children[3];
var statusCodeElem = statusCodeCell.children[0];
var durationCell = row.children[4];
var profilerCell = row.children[5];
var durationCell = row.children[5];

if (request.error) {
row.className = 'sf-ajax-request sf-ajax-request-error';
Expand Down Expand Up @@ -217,7 +217,7 @@
if (request.profilerUrl) {
profilerCell.textContent = '';
var profilerLink = document.createElement('a');
profilerLink.setAttribute('href', request.profilerUrl);
profilerLink.setAttribute('href', request.statusCode < 400 ? request.profilerUrl : request.profilerUrl + '?panel=exception');
profilerLink.textContent = request.profile;
profilerCell.appendChild(profilerLink);
}
Expand Down