1
0
قرینه از https://github.com/matomo-org/matomo.git synced 2025-08-21 22:47:43 +00:00
Files
matomo/plugins/Installation/templates/_systemCheckSection.twig
2022-09-17 20:05:36 -07:00

29 خطوط
1.5 KiB
Twig

{%- import _self as local -%}
{% macro diagnosticInfo(results) -%}
{% set error = constant('Piwik\\Plugins\\Diagnostics\\Diagnostic\\DiagnosticResult::STATUS_ERROR') %}
{% set warning = constant('Piwik\\Plugins\\Diagnostics\\Diagnostic\\DiagnosticResult::STATUS_WARNING') %}
{% set informational = constant('Piwik\\Plugins\\Diagnostics\\Diagnostic\\DiagnosticResult::STATUS_INFORMATIONAL') %}
{%- for result in results %}
#### {{ result.label|rawSafeDecoded }}:
{% for item in result.items -%}
{%- if item.status == error -%} &#9888; Error: {{ item.comment|anonymiseSystemInfo|striptags('<br><p><strong><code>') }}{% elseif item.status == warning %} &#9888; Warning: {{ item.comment|anonymiseSystemInfo|striptags('<br><p><strong><code>') }}{% elseif item.status == informational %} {{ item.comment|anonymiseSystemInfo|striptags('<br><p><strong><code>') }}{% else %} &#10004; {{ item.comment|anonymiseSystemInfo|striptags('<br><p><strong><code>') }}{% endif -%}
{%- endfor %}
{% if result.longErrorMessage -%}
{{ result.longErrorMessage|striptags('<br><p><strong><code>') }}
{%- endif -%}
{%- endfor -%}
{%- endmacro -%}
<details>
<summary>Click to view System Check</summary>
### Mandatory checks
{{ local.diagnosticInfo(diagnosticReport.getMandatoryDiagnosticResults()) }}
### Optional checks
{{ local.diagnosticInfo(diagnosticReport.getOptionalDiagnosticResults()) }}
### Informational results
{{ local.diagnosticInfo(diagnosticReport.getInformationalResults()) }}
</details>