File: getSystemCheckWidget.twig

package info (click to toggle)
matomo 5.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 95,068 kB
  • sloc: php: 289,425; xml: 127,249; javascript: 112,130; python: 202; sh: 178; makefile: 20; sql: 10
file content (45 lines) | stat: -rw-r--r-- 2,465 bytes parent folder | download | duplicates (2)
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
<div class="widgetBody system-check" vue-directive="CoreHome.Tooltips" vue-directive-value="{&quot;show&quot;: {&quot;delay&quot;: 200, &quot;duration&quot;: 100}}">
    {% if not numErrors and not numWarnings %}
        <p class="system-success"><span class="icon-ok"></span> {{ 'Installation_SystemCheckNoErrorsOrWarnings'|translate }}</p>
    {% endif %}

    {% if numErrors %}
        <ul>
            {% for thisResult in errors %}
                {% set checkItemMessages = '' %}
                {% if thisResult.getLongErrorMessage is empty and thisResult.getItems()|length > 1 %}
                    {% for checkItem in thisResult.getItems() %}
                        {% if checkItem.getStatus is same as('warning') %}
                            {% set checkItemMessages = checkItemMessages ~ checkItem.getComment() ~ "\n" %}
                        {% endif %}
                    {% endfor %}
                {% endif %}
                <li title="{{ checkItemMessages|default(thisResult.getLongErrorMessage)|default(thisResult.getItems()[0].getComment())|preg_replace('/<br.*?>/', "\n")|striptags }}" class="system-check-widget-error"><span class="icon-error"></span> {{ thisResult.getLabel }}</li>
            {% endfor %}
        </ul>
    {% endif %}

    {% if numWarnings %}
        <ul>
            {% for thisResult in warnings %}
                {% set checkItemMessages = '' %}
                {% if thisResult.getLongErrorMessage is empty and thisResult.getItems()|length > 1 %}
                    {% for checkItem in thisResult.getItems() %}
                        {% if checkItem.getStatus is same as('warning') %}
                            {% set checkItemMessages = checkItemMessages ~ checkItem.getComment() ~ "\n" %}
                        {% endif %}
                    {% endfor %}
                {% endif %}
                <li title="{{ checkItemMessages|default(thisResult.getLongErrorMessage)|default(thisResult.getItems()[0].getComment())|preg_replace('/<br.*?>/', "\n")|striptags }}" class="system-check-widget-warning"><span class="icon-warning"></span> {{ thisResult.getLabel }}</li>
            {% endfor %}
        </ul>
    {% endif %}

    {% if numErrors or numWarnings %}
        <p>
            <br />
            <a href="{{ linkTo({'module': 'Installation', 'action': 'systemCheckPage'}) }}"
               >{{ 'Installation_SystemCheckViewFullSystemCheck'|translate }}</a>
        </p>
    {% endif %}
</div>