You are here

purge-ui-diagnostics.html.twig in Purge 8.3

purge_ui's visualization of Purge's diagnostics.

Available variables:

  • diagnostics: each diagnostic item contains:

    • title: The title of the diagnostic.
    • value: (optional) The diagnostic's status.
    • description: (optional) The diagnostic's description.
    • severity_title: The title of the severity.
    • severity_status: Indicates the severity status.

File

modules/purge_ui/templates/purge-ui-diagnostics.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * purge_ui's visualization of Purge's diagnostics.
  5. *
  6. * Available variables:
  7. * - diagnostics: each diagnostic item contains:
  8. * - title: The title of the diagnostic.
  9. * - value: (optional) The diagnostic's status.
  10. * - description: (optional) The diagnostic's description.
  11. * - severity_title: The title of the severity.
  12. * - severity_status: Indicates the severity status.
  13. *
  14. * @ingroup themeable
  15. */
  16. #}
  17. {{ attach_library('purge_ui/diagnostics') }}
  18. <table class="purge-ui-diagnostic-report">
  19. <tbody>
  20. {% for diagnostic in diagnostics %}
  21. {% if diagnostic.severity_status == 'ok' %}
  22. <tr class="purge-ui-diagnostic-report__entry purge-ui-diagnostic-report__entry--{{ diagnostic.severity_status }} color-success">
  23. {% else %}
  24. <tr class="purge-ui-diagnostic-report__entry purge-ui-diagnostic-report__entry--{{ diagnostic.severity_status }} color-{{ diagnostic.severity_status }}">
  25. {% endif %}
  26. {% if diagnostic.severity_status in ['warning', 'error'] %}
  27. <td class="purge-ui-diagnostic-report__status-title purge-ui-diagnostic-report__status-icon purge-ui-diagnostic-report__status-icon--{{ diagnostic.severity_status }}">
  28. {% else %}
  29. <td class="purge-ui-diagnostic-report__status-title">
  30. {% endif %}
  31. {{ diagnostic.title }}
  32. </td>
  33. <td>
  34. <div class="purge-ui-diagnostic-report__entry__value">
  35. {% if ', ' in diagnostic.value %}
  36. {% for value in diagnostic.value|split(', ') %}
  37. {{value}}<br />
  38. {% endfor %}
  39. {% else %}
  40. {{ diagnostic.value }}
  41. {% endif %}
  42. </div>
  43. {% if diagnostic.description %}
  44. <div class="purge-ui-diagnostic-report__entry__description">{{ diagnostic.description }}</div>
  45. {% endif %}
  46. </td>
  47. </tr>
  48. {% endfor %}
  49. </tbody>
  50. </table>