|
29 | 29 | padding: 0 0 8px 0;
|
30 | 30 | }
|
31 | 31 |
|
| 32 | + #collector-content .authenticator-name { |
| 33 | + align-items: center; |
| 34 | + display: flex; |
| 35 | + gap: 16px; |
| 36 | + } |
| 37 | +
|
| 38 | + #collector-content .authenticators .toggle-button { |
| 39 | + margin-left: auto; |
| 40 | + } |
| 41 | + #collector-content .authenticators .sf-toggle-on .toggle-button { |
| 42 | + transform: rotate(180deg); |
| 43 | + } |
| 44 | + #collector-content .authenticators .toggle-button svg { |
| 45 | + display: block; |
| 46 | + } |
| 47 | +
|
| 48 | + #collector-content .authenticators th, |
| 49 | + #collector-content .authenticators td { |
| 50 | + vertical-align: baseline; |
| 51 | + } |
| 52 | + #collector-content .authenticators th, |
| 53 | + #collector-content .authenticators td { |
| 54 | + vertical-align: baseline; |
| 55 | + } |
| 56 | +
|
| 57 | + #collector-content .authenticators .label { |
| 58 | + display: block; |
| 59 | + text-align: center; |
| 60 | + } |
| 61 | +
|
| 62 | + #collector-content .authenticator-data { |
| 63 | + box-shadow: none; |
| 64 | + margin: 0; |
| 65 | + } |
| 66 | +
|
| 67 | + #collector-content .authenticator-data tr:first-child th, |
| 68 | + #collector-content .authenticator-data tr:first-child td { |
| 69 | + border-top: 0; |
| 70 | + } |
| 71 | +
|
32 | 72 | #collector-content .authenticators .badge {
|
33 | 73 | color: var(--white);
|
34 | 74 | display: inline-block;
|
35 |
| - text-align: center; |
| 75 | + margin: 4px 0; |
36 | 76 | }
|
37 | 77 | #collector-content .authenticators .badge.badge-resolved {
|
38 | 78 | background-color: var(--green-500);
|
39 | 79 | }
|
40 | 80 | #collector-content .authenticators .badge.badge-not_resolved {
|
41 | 81 | background-color: var(--yellow-500);
|
42 | 82 | }
|
43 |
| -
|
44 |
| - #collector-content .authenticators svg[data-icon-name="icon-tabler-check"] { |
45 |
| - color: var(--green-500); |
46 |
| - } |
47 |
| - #collector-content .authenticators svg[data-icon-name="icon-tabler-x"] { |
48 |
| - color: var(--red-500); |
49 |
| - } |
50 | 83 | </style>
|
51 | 84 | {% endblock %}
|
52 | 85 |
|
|
355 | 388 | <div class="tab-content">
|
356 | 389 | {% if collector.authenticators|default([]) is not empty %}
|
357 | 390 | <table class="authenticators">
|
| 391 | + <colgroup> |
| 392 | + <col> |
| 393 | + <col style="width: 100%"> |
| 394 | + </colgroup> |
358 | 395 | <thead>
|
359 | 396 | <tr>
|
360 |
| - <th>Authenticator</th> |
361 |
| - <th>Supports</th> |
362 |
| - <th>Authenticated</th> |
363 |
| - <th>Duration</th> |
364 |
| - <th>Passport</th> |
365 |
| - <th>Badges</th> |
| 397 | + <th scope="col">Status</th> |
| 398 | + <th scope="col">Authenticator</th> |
366 | 399 | </tr>
|
367 | 400 | </thead>
|
368 |
| - |
369 |
| - {% set previous_event = (collector.listeners|first) %} |
370 |
| - {% for authenticator in collector.authenticators %} |
371 |
| - {% if loop.first or authenticator != previous_event %} |
372 |
| - {% if not loop.first %} |
373 |
| - </tbody> |
374 |
| - {% endif %} |
375 |
| - |
376 |
| - <tbody> |
377 |
| - {% set previous_event = authenticator %} |
378 |
| - {% endif %} |
379 |
| - |
380 |
| - <tr> |
381 |
| - <td class="font-normal">{{ profiler_dump(authenticator.stub) }}</td> |
382 |
| - <td class="no-wrap">{{ source('@WebProfiler/Icon/' ~ (authenticator.supports is same as (false) ? 'no' : 'yes') ~ '.svg') }}</td> |
383 |
| - <td class="no-wrap">{{ authenticator.authenticated is not null ? source('@WebProfiler/Icon/' ~ (authenticator.authenticated ? 'yes' : 'no') ~ '.svg') : '' }}</td> |
384 |
| - <td class="no-wrap">{{ authenticator.duration is null ? '(none)' : '%0.2f ms'|format(authenticator.duration * 1000) }}</td> |
385 |
| - <td class="font-normal">{{ authenticator.passport ? profiler_dump(authenticator.passport) : '(none)' }}</td> |
386 |
| - <td class="font-normal"> |
387 |
| - {% for badge in authenticator.badges ?? [] %} |
388 |
| - <span class="badge badge-{{ badge.resolved ? 'resolved' : 'not_resolved' }}"> |
389 |
| - {{ badge.stub|abbr_class }} |
390 |
| - </span> |
| 401 | + {% for i, authenticator in collector.authenticators %} |
| 402 | + <tr class="sf-toggle" |
| 403 | + data-toggle-selector="#authenticator-{{ i }}" |
| 404 | + data-toggle-initial="{{ authenticator.authenticated is not null ? 'display' }}" |
| 405 | + > |
| 406 | + <td class="font-normal text-small"> |
| 407 | + {% if authenticator.authenticated %} |
| 408 | + {% set status_text, label_status = 'success', 'success' %} |
| 409 | + {% elseif authenticator.authenticated is null %} |
| 410 | + {% set status_text, label_status = 'skipped', false %} |
391 | 411 | {% else %}
|
392 |
| - (none) |
393 |
| - {% endfor %} |
| 412 | + {% set status_text, label_status = 'failure', 'error' %} |
| 413 | + {% endif %} |
| 414 | + <span class="label {{ label_status ? 'status-' ~ label_status }}">{{ status_text }}</span> |
| 415 | + </td> |
| 416 | + <td> |
| 417 | + <span class="authenticator-name"> |
| 418 | + {{ profiler_dump(authenticator.stub) }} |
| 419 | + <button class="btn btn-link toggle-button" type="button"> |
| 420 | + {{ source('@WebProfiler/Icon/chevron-down.svg') }} |
| 421 | + </button> |
| 422 | + </span> |
| 423 | + <div id="authenticator-{{ i }}" class="font-normal"> |
| 424 | + {% if authenticator.supports is same as(false) %} |
| 425 | + <div class="empty"> |
| 426 | + <p>This authenticator did not support the request.</p> |
| 427 | + </div> |
| 428 | + {% elseif authenticator.authenticated is null %} |
| 429 | + <div class="empty"> |
| 430 | + <p>An authenticator ran before this one.</p> |
| 431 | + </div> |
| 432 | + {% else %} |
| 433 | + <table class="authenticator-data"> |
| 434 | + <colgroup> |
| 435 | + <col> |
| 436 | + <col style="width: 100%"> |
| 437 | + </colgroup> |
| 438 | + <tr> |
| 439 | + <th scope="row">Lazy</th> |
| 440 | + <td>{{ authenticator.supports is null ? 'yes' : 'no' }}</td> |
| 441 | + </tr> |
| 442 | + <tr> |
| 443 | + <th scope="row">Duration</th> |
| 444 | + <td>{{ '%0.2f ms'|format(authenticator.duration * 1000) }}</td> |
| 445 | + </tr> |
| 446 | + {% if authenticator.passport %} |
| 447 | + <tr> |
| 448 | + <th scope="row">Passport</th> |
| 449 | + <td>{{ profiler_dump(authenticator.passport) }}</td> |
| 450 | + </tr> |
| 451 | + {% endif %} |
| 452 | + {% if authenticator.badges %} |
| 453 | + <tr> |
| 454 | + <th scope="row">Badges</th> |
| 455 | + <td> |
| 456 | + {% for badge in authenticator.badges %} |
| 457 | + <span class="badge badge-{{ badge.resolved ? 'resolved' : 'not_resolved' }}"> |
| 458 | + {{ badge.stub|abbr_class }} |
| 459 | + </span> |
| 460 | + {% endfor %} |
| 461 | + </td> |
| 462 | + </tr> |
| 463 | + {% endif %} |
| 464 | + {% if authenticator.exception %} |
| 465 | + <tr> |
| 466 | + <th scope="row">Exception</th> |
| 467 | + <td>{{ profiler_dump(authenticator.exception) }}</td> |
| 468 | + </tr> |
| 469 | + {% endif %} |
| 470 | + </table> |
| 471 | + {% endif %} |
| 472 | + </div> |
394 | 473 | </td>
|
395 | 474 | </tr>
|
396 |
| - |
397 |
| - {% if loop.last %} |
398 |
| - </tbody> |
399 |
| - {% endif %} |
400 | 475 | {% endfor %}
|
401 | 476 | </table>
|
402 | 477 | {% else %}
|
|
0 commit comments