Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / modules / contrib / devel / webprofiler / templates / Collector / events.html.twig
1 {% block toolbar %}
2     {% set icon %}
3         <a href="{{ url("webprofiler.dashboard", {profile: token}, {fragment: 'events'}) }}" title="{{ 'Events'|t }}">
4             <img width="20" height="28" alt="{{ 'Events'|t }}"
5                  src="data:image/png;base64,{{ collector.icon }}">
6             <span class="sf-toolbar-info-piece-additional sf-toolbar-status">{{ collector.getCalledListenersCount }}</span>
7         </a>
8     {% endset %}
9
10     {% set text %}
11         <div class="sf-toolbar-info-piece">
12             <b>{{ 'Called'|t }}</b>
13             <span>{{ collector.getCalledListenersCount }}</span>
14         </div>
15
16         <div class="sf-toolbar-info-piece">
17             <b>{{ 'Not called'|t }}</b>
18             <span>{{ collector.getNotCalledListenersCount }}</span>
19         </div>
20     {% endset %}
21
22     <div class="sf-toolbar-block">
23         <div class="sf-toolbar-icon">{{ icon|default('') }}</div>
24         <div class="sf-toolbar-info">{{ text|default('') }}</div>
25     </div>
26 {% endblock %}
27
28 {% block panel %}
29     <script id="events" type="text/template">
30
31         <h2 class="panel__title">{{ 'Events'|t }}</h2>
32         <div class="panel__container">
33
34             <table class="table--duo">
35                 <thead>
36                 <th>{{ 'Called listeners'|t }}</th>
37                 <th>{{ 'Class'|t }}</th>
38                 <th>{{ 'Priority'|t }}</th>
39                 </thead>
40                 <tbody>
41                 <% _.each( data.called_listeners, function( events, event_name ){ %>
42                     <% _.each( events, function( priority, priority_value ){ %>
43                         <% _.each( priority, function( listener ){ %>
44                             <tr>
45                                 <td><%= event_name %></td>
46                                 <% if( listener.clazz ) { %>
47                                     <td><%= Drupal.webprofiler.helpers.classLink(listener.clazz) %></td>
48                                 <% } else { %>
49                                     <td><%= listener.service[0] %>::<%= listener.service[1] %></td>
50                                 <% } %>
51                                 <td><%= priority_value %></td>
52                             </tr>
53                         <% }); %>
54                     <% }); %>
55                 <% }); %>
56                 </tbody>
57             </table>
58
59             <table class="table--duo">
60                 <thead>
61                 <th>{{ 'Not called listeners'|t }}</th>
62                 <th>{{ 'Service'|t }}</th>
63                 <th>{{ 'Priority'|t }}</th>
64                 </thead>
65                 <tbody>
66                 <% _.each( data.not_called_listeners, function( events, event_name ){ %>
67                 <% _.each( events, function( priority, priority_value ){ %>
68                 <% _.each( priority, function( listener ){ %>
69                 <tr>
70                     <td><%= event_name %></td>
71                     <td><%= listener.service[0] %>::<%= listener.service[1] %></td>
72                     <td><%= priority_value %></td>
73                 </tr>
74                 <% }); %>
75                 <% }); %>
76                 <% }); %>
77                 </tbody>
78             </table>
79         </div>
80
81     </script>
82 {% endblock %}