You are here

cms_content_sync_sync_health_overview.html.twig in CMS Content Sync 2.0.x

Template file for the show usage modal.

File

modules/cms_content_sync_health/templates/cms_content_sync_sync_health_overview.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Template file for the show usage modal.
  5. */
  6. #}
  7. <h2>
  8. {{ 'Sync Core'|trans }}
  9. </h2>
  10. {% for host, core in sync_cores %}
  11. <h3>{{ host }}</h3>
  12. {% if core %}
  13. {% if newest_version == core.version %}
  14. <div class="messages messages--status">Version up to date: {{ core.version }}</div>
  15. {% elseif newest_version %}
  16. <div class="messages messages--warning">Version outdated: {{ core.version }} (newest version is {{ newest_version }})</div>
  17. {% else %}
  18. <div class="messages messages--warning">Version: {{ core.version }} (newest version is unknown as the "update" module is disabled)</div>
  19. {% endif %}
  20. {% if core.error_log %}
  21. <div class="messages messages--warning">
  22. Error log from today:
  23. <ul>
  24. {% for msg in core.error_log %}
  25. <li>{{ msg.time|format_date('html_time') }}: {{ msg.msg }}</li>
  26. {% endfor %}
  27. </ul>
  28. </div>
  29. {% elseif core.warning_log %}
  30. <div class="messages messages--warning">
  31. Warning log from today:
  32. <ul>
  33. {% for msg in core.warning_log %}
  34. <li>{{ msg.time|format_date('html_time') }}: {{ msg.msg }}</li>
  35. {% endfor %}
  36. </ul>
  37. </div>
  38. {% else %}
  39. <div class="messages messages--status">No error or warning messages.</div>
  40. {% endif %}
  41. {% if core.usage.contract.monthly.updateCount matches '/^\\d+$/' %}
  42. <h4>Contract usage</h4>
  43. <ul>
  44. <li>This month: {{ core.usage.contract.monthly.updateCount }}</li>
  45. </ul>
  46. {% endif %}
  47. <h4>This site</h4>
  48. <ul>
  49. {% if core.usage.site.monthly.updateCount matches '/^\\d+$/' %}
  50. <li>Updates received this month: {{ core.usage.site.monthly.updateCount }}</li>
  51. {% endif %}
  52. {% if core.usage.site.daily.updateCount matches '/^\\d+$/' %}
  53. <li>Updates received today: {{ core.usage.site.daily.updateCount }}</li>
  54. {% endif %}
  55. {% if core.usage.site.hourly.updateCount matches '/^\\d+$/' %}
  56. <li>Updates received this hour: {{ core.usage.site.hourly.updateCount }}</li>
  57. {% endif %}
  58. </ul>
  59. {% else %}
  60. <div class="messages messages--error">Offline</div>
  61. {% endif %}
  62. {% endfor %}
  63. <br>
  64. <h2>
  65. {{ 'Config issues'|trans }}
  66. </h2>
  67. <h3>{{ 'Local version differences'|trans }}</h3>
  68. {% if version_differences.local %}
  69. <div class="messages messages--error">
  70. The Flows of this site need to be updated:
  71. <ul>
  72. {% for msg in version_differences.local %}
  73. <li>{{ msg }}</li>
  74. {% endfor %}
  75. </ul>
  76. </div>
  77. {% else %}
  78. <div class="messages messages--status">
  79. All Flows from your local site are up to date.
  80. </div>
  81. {% endif %}
  82. <h3>{{ 'Remote version differences'|trans }}</h3>
  83. <a href="{{ path('entity.cms_content_sync.sync_health.version_mismatches') }}" class="button">{{ 'Check'|t }}</a>
  84. <br>
  85. <h2>
  86. {{ 'Sync issues'|trans }}
  87. </h2>
  88. {% if push_failures_hard.total or pull_failures_hard.total or error_log %}
  89. <div class="messages messages--warning">
  90. {% if push_failures_hard.total %}
  91. <div>There were errors pushing {{ push_failures_hard.total }} entities: <a href="{{ url('entity.cms_content_sync.sync_health.pushing') }}">details</a>.</div>
  92. {% endif %}
  93. {% if pull_failures_hard.total %}
  94. <div>There were errors pulling {{ pull_failures_hard.total }} entities: <a href="{{ url('entity.cms_content_sync.sync_health.pulling') }}">details</a>.</div>
  95. {% endif %}
  96. {% if error_log %}
  97. Last 10 Content Sync error messages:
  98. <ul>
  99. {% for msg in error_log %}
  100. <li>{{ msg|raw }}</li>
  101. {% endfor %}
  102. </ul>
  103. {% endif %}
  104. </div>
  105. {% endif %}
  106. {% if warning_log or site_log_disabled %}
  107. <div class="messages messages--warning">
  108. {% if site_log_disabled %}
  109. <div>The site log is disabled, so there's no report on log messages available.</div>
  110. {% endif %}
  111. {% if warning_log %}
  112. Last 10 Content Sync warning messages:
  113. <ul>
  114. {% for msg in warning_log %}
  115. <li>{{ msg|raw }}</li>
  116. {% endfor %}
  117. </ul>
  118. {% endif %}
  119. </div>
  120. {% endif %}
  121. {% if not push_failures_hard.total and not pull_failures_hard.total and not error_log and not warning_log and not site_log_disabled %}
  122. <div class="messages messages--status">
  123. There were no errors pushing or pulling entities on this site.
  124. </div>
  125. {% endif %}