blob: 96e3fc3ae31c2a42f831f86d5ea9b8c325b9df58 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
{% import _self as local %}
<table class="entityTable system-check" id="systemCheckRequired" piwik-content-table>
{{ local.diagnosticTable(diagnosticReport.getMandatoryDiagnosticResults()) }}
</table>
<h3>{{ 'Installation_Optional'|translate }}</h3>
<table class="entityTable system-check" id="systemCheckOptional" piwik-content-table>
{{ local.diagnosticTable(diagnosticReport.getOptionalDiagnosticResults()) }}
</table>
{% macro diagnosticTable(results) %}
{% set error = constant('Piwik\\Plugins\\Diagnostics\\Diagnostic\\DiagnosticResult::STATUS_ERROR') %}
{% set warning = constant('Piwik\\Plugins\\Diagnostics\\Diagnostic\\DiagnosticResult::STATUS_WARNING') %}
{% set errorIcon %} <span class="icon-error"></span> {% endset %}
{% set warningIcon %} <span class="icon-warning"></span> {% endset %}
{% set okIcon %} <span class="icon-ok"></span> {% endset %}
{% for result in results %}
<tr>
<td>{{ result.label }}</td>
<td>
{% for item in result.items %}
{% if item.status == error %}
{{ errorIcon }} <span class="err">{{ item.comment|raw }}</span>
{% elseif item.status == warning %}
{{ warningIcon }} {{ item.comment|raw }}
{% else %}
{{ okIcon }} {{ item.comment|raw }}
{% endif %}
<br/>
{% endfor %}
</td>
</tr>
{% if result.longErrorMessage %}
<tr>
<td colspan="2" class="error" style="font-size: small;">
{{ result.longErrorMessage|raw }}
</td>
</tr>
{% endif %}
{% endfor %}
{% endmacro %}
|