|
29 | 29 | padding: 0 0 8px 0;
|
30 | 30 | }
|
31 | 31 |
|
| 32 | + #collector-content .authenticators .sf-toggle + .sf-toggle { |
| 33 | + margin-left: 10px; |
| 34 | + } |
| 35 | +
|
| 36 | + #collector-content .authenticators .toggleable { |
| 37 | + background: var(--code-block-background); |
| 38 | + border-radius: 4px; |
| 39 | + padding: 5px; |
| 40 | + } |
| 41 | + #collector-content .authenticators .toggleable + .toggleable { |
| 42 | + margin-top: 10px; |
| 43 | + } |
| 44 | +
|
| 45 | + #collector-content .authenticators .badges { |
| 46 | + margin: 10px 0 0; |
| 47 | + } |
| 48 | +
|
32 | 49 | #collector-content .authenticators .badge {
|
33 | 50 | color: var(--white);
|
34 | 51 | display: inline-block;
|
| 52 | + margin-bottom: 0; |
35 | 53 | text-align: center;
|
36 | 54 | }
|
37 | 55 | #collector-content .authenticators .badge.badge-resolved {
|
|
40 | 58 | #collector-content .authenticators .badge.badge-not_resolved {
|
41 | 59 | background-color: var(--yellow-500);
|
42 | 60 | }
|
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 | 61 | </style>
|
51 | 62 | {% endblock %}
|
52 | 63 |
|
|
336 | 347 | <div class="tab-content">
|
337 | 348 | {% if collector.authenticators|default([]) is not empty %}
|
338 | 349 | <table class="authenticators">
|
| 350 | + <colgroup> |
| 351 | + <col> |
| 352 | + <col style="width: 100%"> |
| 353 | + </colgroup> |
339 | 354 | <thead>
|
340 | 355 | <tr>
|
| 356 | + <th>Status</th> |
341 | 357 | <th>Authenticator</th>
|
342 |
| - <th>Supports</th> |
343 |
| - <th>Authenticated</th> |
344 |
| - <th>Duration</th> |
345 |
| - <th>Passport</th> |
346 |
| - <th>Badges</th> |
347 | 358 | </tr>
|
348 | 359 | </thead>
|
349 |
| - |
350 |
| - {% set previous_event = (collector.listeners|first) %} |
351 |
| - {% for authenticator in collector.authenticators %} |
352 |
| - {% if loop.first or authenticator != previous_event %} |
353 |
| - {% if not loop.first %} |
354 |
| - </tbody> |
355 |
| - {% endif %} |
356 |
| - |
357 |
| - <tbody> |
358 |
| - {% set previous_event = authenticator %} |
359 |
| - {% endif %} |
360 |
| - |
| 360 | + <tbody> |
| 361 | + {% for i, authenticator in collector.authenticators %} |
361 | 362 | <tr>
|
362 |
| - <td class="font-normal">{{ profiler_dump(authenticator.stub) }}</td> |
363 |
| - <td class="no-wrap">{{ source('@WebProfiler/Icon/' ~ (authenticator.supports is same as (false) ? 'no' : 'yes') ~ '.svg') }}</td> |
364 |
| - <td class="no-wrap">{{ authenticator.authenticated is not null ? source('@WebProfiler/Icon/' ~ (authenticator.authenticated ? 'yes' : 'no') ~ '.svg') : '' }}</td> |
365 |
| - <td class="no-wrap">{{ authenticator.duration is null ? '(none)' : '%0.2f ms'|format(authenticator.duration * 1000) }}</td> |
366 |
| - <td class="font-normal">{{ authenticator.passport ? profiler_dump(authenticator.passport) : '(none)' }}</td> |
367 |
| - <td class="font-normal"> |
368 |
| - {% for badge in authenticator.badges ?? [] %} |
369 |
| - <span class="badge badge-{{ badge.resolved ? 'resolved' : 'not_resolved' }}"> |
370 |
| - {{ badge.stub|abbr_class }} |
371 |
| - </span> |
| 363 | + <td class="font-normal text-small"> |
| 364 | + {% if authenticator.authenticated %} |
| 365 | + {% set status_text, label_status = 'successful', 'success' %} |
| 366 | + {% elseif authenticator.supports is not same as(false) %} |
| 367 | + {% set status_text, label_status = 'unsuccessful', 'error' %} |
372 | 368 | {% else %}
|
373 |
| - (none) |
374 |
| - {% endfor %} |
| 369 | + {% set status_text, label_status = 'skipped', false %} |
| 370 | + {% endif %} |
| 371 | + <div class="label {{ label_status ? 'status-' ~ label_status }}">{{ status_text }}</div> |
| 372 | + {{ authenticator.duration is not null ? '%0.2f ms'|format(authenticator.duration * 1000) }} |
| 373 | + {{ authenticator.supports is null ? '(lazy)' }} |
| 374 | + </td> |
| 375 | + <td> |
| 376 | + {{ profiler_dump(authenticator.stub) }} |
| 377 | + |
| 378 | + <div class="font-normal"> |
| 379 | + {% if authenticator.passport %} |
| 380 | + <button |
| 381 | + class="btn btn-link text-small sf-toggle" |
| 382 | + data-toggle-selector="#authenticator-{{ i }}-passport" |
| 383 | + data-toggle-alt-content="Hide passport" |
| 384 | + >View passport</button> |
| 385 | + {% endif %} |
| 386 | + {% if authenticator.exception ?? null %} |
| 387 | + <button |
| 388 | + class="btn btn-link text-small sf-toggle" |
| 389 | + data-toggle-selector="#authenticator-{{ i }}-exception" |
| 390 | + data-toggle-alt-content="Hide exception" |
| 391 | + >View exception</button> |
| 392 | + {% endif %} |
| 393 | + </div> |
| 394 | + {% if authenticator.passport %} |
| 395 | + <div class="toggleable" id="authenticator-{{ i }}-passport"> |
| 396 | + {{ profiler_dump(authenticator.passport) }} |
| 397 | + {% if authenticator.badges %} |
| 398 | + <div class="badges"> |
| 399 | + {% for badge in authenticator.badges %} |
| 400 | + <span class="badge badge-{{ badge.resolved ? 'resolved' : 'not_resolved' }}"> |
| 401 | + {{ badge.stub|abbr_class }} |
| 402 | + </span> |
| 403 | + {% endfor %} |
| 404 | + </div> |
| 405 | + {% endif %} |
| 406 | + </div> |
| 407 | + {% endif %} |
| 408 | + {% if authenticator.exception ?? null %} |
| 409 | + <div class="toggleable" id="authenticator-{{ i }}-exception"> |
| 410 | + {{ profiler_dump(authenticator.exception) }} |
| 411 | + </div> |
| 412 | + {% endif %} |
375 | 413 | </td>
|
376 | 414 | </tr>
|
377 |
| - |
378 |
| - {% if loop.last %} |
379 |
| - </tbody> |
380 |
| - {% endif %} |
381 | 415 | {% endfor %}
|
| 416 | + </tbody> |
382 | 417 | </table>
|
383 | 418 | {% else %}
|
384 | 419 | <div class="empty">
|
|
0 commit comments