|
11 | 11 | {% set text %} |
12 | 12 | <div class="sf-toolbar-info-piece"> |
13 | 13 | <b>Query count</b> |
14 | | - <span>{{ collector.queryCount }}</span> |
| 14 | + <span class="sf-toolbar-status">{{ collector.queryCount }}</span> |
15 | 15 | </div> |
| 16 | + {% if collector.failedStatements|length %} |
| 17 | + <div class="sf-toolbar-info-piece"> |
| 18 | + <b>Failed queries</b> |
| 19 | + <span class="sf-toolbar-status sf-toolbar-status-red">{{ collector.failedStatements|length }}</span> |
| 20 | + </div> |
| 21 | + {% endif %} |
16 | 22 | <div class="sf-toolbar-info-piece"> |
17 | 23 | <b>Total time</b> |
18 | | - <span>{{ '%0.2f'|format(collector.time) }}ms</span> |
| 24 | + <span class="sf-toolbar-status">{{ '%0.2f'|format(collector.time) }}ms</span> |
19 | 25 | </div> |
20 | 26 |
|
21 | 27 | {% endset %} |
22 | | - {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with { 'link': profiler_url } %} |
| 28 | + {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with { 'link': profiler_url, 'status': collector.failedStatements|length ? 'red' : '' } %} |
23 | 29 | {% endif %} |
24 | 30 | {% endblock %} |
25 | 31 |
|
|
31 | 37 |
|
32 | 38 | {% block menu %} |
33 | 39 | {# This left-hand menu appears when using the full-screen profiler. #} |
34 | | - <span class="label {{ collector.queryCount == 0 ? 'disabled' }}"> |
| 40 | + <span class="label {{ collector.queryCount == 0 ? 'disabled' }} {{ collector.failedStatements|length ? 'label-status-error' }}"> |
35 | 41 | <span class="icon"> |
36 | 42 | {{ include('@Neo4j/Icon/neo4j.svg') }} |
37 | 43 | </span> |
38 | 44 | <strong>Neo4j</strong> |
| 45 | + {% if collector.failedStatements|length %} |
| 46 | + <span class="count"> |
| 47 | + <span>{{ collector.failedStatements|length }}</span> |
| 48 | + </span> |
| 49 | + {% endif %} |
39 | 50 | </span> |
40 | 51 | {% endblock %} |
41 | 52 |
|
|
56 | 67 | {% set start_time = statement.start_time|default(null) %} |
57 | 68 | {% set end_time = statement.end_time|default(null) %} |
58 | 69 |
|
59 | | - <td class="nowrap">{{ idx + 1 }}</td> |
| 70 | + <td class="nowrap{% if not statement.success %} bg-red{% endif %}">{{ idx + 1 }}</td> |
60 | 71 | <td class="nowrap">{% if start_time is not null and end_time is not null %}{{ '%0.2f'|format(end_time - start_time) }}ms{% endif %}</td> |
61 | 72 | <td> |
62 | 73 | <div> |
|
73 | 84 | <div> |
74 | 85 | <strong class="font-normal text-small">Tag</strong>: {{ statement.tag|default('N/A')|yaml_encode }} |
75 | 86 | </div> |
| 87 | + {% if statement.sucess %} |
76 | 88 | <div> |
77 | 89 | <strong class="font-normal text-small">Number of results</strong>: {{ statement.nb_results }} |
78 | 90 | </div> |
|
82 | 94 | <div> |
83 | 95 | <strong class="font-normal text-small">Statistics</strong>: {{ statement.statistics|yaml_encode }} |
84 | 96 | </div> |
| 97 | + {% else %} |
| 98 | + <div> |
| 99 | + <strong class="font-normal text-small">Type</strong>: {{ statement.exceptionCode }} |
| 100 | + </div> |
| 101 | + <div> |
| 102 | + <strong class="font-normal text-small">message</strong>: {{ statement.exceptionMessage }} |
| 103 | + </div> |
| 104 | + {% endif %} |
85 | 105 | </div> |
86 | 106 | </td> |
87 | 107 | </tr> |
|
0 commit comments