|
29 | 29 | padding: 0 0 8px 0;
|
30 | 30 | }
|
31 | 31 |
|
| 32 | + #collector-content .authenticators { |
| 33 | + padding-left: 1.25em; |
| 34 | + } |
| 35 | + #collector-content .authenticator { |
| 36 | + display: flex; |
| 37 | + flex-direction: column; |
| 38 | + gap: .5em; |
| 39 | + padding-left: .5em; |
| 40 | + } |
| 41 | + #collector-content .authenticator-successful { |
| 42 | + list-style-type: '🟢'; |
| 43 | + } |
| 44 | + #collector-content .authenticator-unsuccessful { |
| 45 | + list-style-type: '🔴'; |
| 46 | + } |
| 47 | + #collector-content .authenticator-skipped { |
| 48 | + list-style-type: '◯'; |
| 49 | + } |
| 50 | + #collector-content .authenticator-late { |
| 51 | + list-style-type: '⬤'; |
| 52 | + } |
| 53 | +
|
| 54 | + #collector-content .menu { |
| 55 | + display: flex; |
| 56 | + flex-wrap: wrap; |
| 57 | + gap: .25em .5em; |
| 58 | + } |
| 59 | +
|
| 60 | + #collector-content .authenticators .badges { |
| 61 | + padding: 1em 0 0; |
| 62 | + } |
32 | 63 | #collector-content .authenticators .badge {
|
33 | 64 | color: var(--white);
|
34 | 65 | display: inline-block;
|
| 66 | + margin-bottom: 0; |
35 | 67 | text-align: center;
|
36 | 68 | }
|
37 | 69 | #collector-content .authenticators .badge.badge-resolved {
|
|
40 | 72 | #collector-content .authenticators .badge.badge-not_resolved {
|
41 | 73 | background-color: var(--yellow-500);
|
42 | 74 | }
|
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 | 75 | </style>
|
51 | 76 | {% endblock %}
|
52 | 77 |
|
|
335 | 360 | <h3 class="tab-title">Authenticators</h3>
|
336 | 361 | <div class="tab-content">
|
337 | 362 | {% if collector.authenticators|default([]) is not empty %}
|
338 |
| - <table class="authenticators"> |
339 |
| - <thead> |
340 |
| - <tr> |
341 |
| - <th>Authenticator</th> |
342 |
| - <th>Supports</th> |
343 |
| - <th>Authenticated</th> |
344 |
| - <th>Duration</th> |
345 |
| - <th>Passport</th> |
346 |
| - <th>Badges</th> |
347 |
| - </tr> |
348 |
| - </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 |
| - |
361 |
| - <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> |
372 |
| - {% else %} |
373 |
| - (none) |
374 |
| - {% endfor %} |
375 |
| - </td> |
376 |
| - </tr> |
377 |
| - |
378 |
| - {% if loop.last %} |
379 |
| - </tbody> |
| 363 | + <ul class="authenticators"> |
| 364 | + {% for i, authenticator in collector.authenticators %} |
| 365 | + {% if authenticator.authenticated %} |
| 366 | + {% set status, text = 'successful', 'authenticated a user' %} |
| 367 | + {% elseif authenticator.exception %} |
| 368 | + {% set status, text = 'unsuccessful', 'failed to authenticate a user' %} |
| 369 | + {% elseif authenticator.supports is same as(false) %} |
| 370 | + {% set status, text = 'skipped', 'was skipped' %} |
| 371 | + {% else %} |
| 372 | + {% set status, text = 'late', 'came after a response was set' %} |
380 | 373 | {% endif %}
|
| 374 | + <li class="authenticator authenticator-{{ status }}"> |
| 375 | + {{ authenticator.stub|abbr_class }} |
| 376 | + {{ authenticator.supports is null ? '(lazy)' }} |
| 377 | + {{ text }} |
| 378 | + <div class="text-small"> |
| 379 | + {% if authenticator.passport %} |
| 380 | + <a |
| 381 | + href="#" |
| 382 | + class="sf-toggle" |
| 383 | + data-toggle-selector="#authenticator-{{ i }}-passport" |
| 384 | + data-toggle-alt-content="Hide passport" |
| 385 | + >View passport</a> |
| 386 | + {% endif %} |
| 387 | + {% if authenticator.exception %} |
| 388 | + <a |
| 389 | + href="#" |
| 390 | + class="sf-toggle" |
| 391 | + data-toggle-selector="#authenticator-{{ i }}-exception" |
| 392 | + data-toggle-alt-content="Hide exception" |
| 393 | + >View exception</a> |
| 394 | + {% endif %} |
| 395 | + </div> |
| 396 | + {% if authenticator.passport %} |
| 397 | + <div class="card" id="authenticator-{{ i }}-passport"> |
| 398 | + {{ profiler_dump(authenticator.passport) }} |
| 399 | + {% if authenticator.badges %} |
| 400 | + <ul class="badges"> |
| 401 | + {% for badge in authenticator.badges %} |
| 402 | + <li class="badge badge-{{ badge.resolved ? 'resolved' : 'not_resolved' }}"> |
| 403 | + {{ badge.stub|abbr_class }} |
| 404 | + </li> |
| 405 | + {% endfor %} |
| 406 | + </ul> |
| 407 | + {% endif %} |
| 408 | + </div> |
| 409 | + {% endif %} |
| 410 | + {% if authenticator.exception %} |
| 411 | + <div class="card" id="authenticator-{{ i }}-exception"> |
| 412 | + {{ profiler_dump(authenticator.exception) }} |
| 413 | + </div> |
| 414 | + {% endif %} |
| 415 | + </li> |
381 | 416 | {% endfor %}
|
382 |
| - </table> |
| 417 | + </ul> |
383 | 418 | {% else %}
|
384 | 419 | <div class="empty">
|
385 | 420 | <p>No authenticators have been recorded. Check previous profiles on your authentication endpoint.</p>
|
|
0 commit comments