| {%- 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 -%} ⚠ Error: {{ item.comment|anonymiseSystemInfo|striptags('<br><p><strong><code>') }}{% elseif item.status == warning %} ⚠ Warning: {{ item.comment|anonymiseSystemInfo|striptags('<br><p><strong><code>') }}{% elseif item.status == informational %} {{ item.comment|anonymiseSystemInfo|striptags('<br><p><strong><code>') }}{% else %} ✔ {{ 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> |