Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / modules / contrib / devel / webprofiler / templates / Collector / events.html.twig
index 9167413af1df7e68febdb90cdd475c6c4b06258f..17087e1bff172f0353a93f10f29dac32eea21617 100644 (file)
@@ -1,21 +1,22 @@
 {% block toolbar %}
     {% set icon %}
-    <a href="{{ url("webprofiler.dashboard", {profile: token}, {fragment: 'events'}) }}" title="{{ 'Events'|t }}">
-        <img width="20" height="28" alt="{{ 'Events'|t }}"
-             src="data:image/png;base64,{{ collector.icon }}">
-        <span class="sf-toolbar-info-piece-additional sf-toolbar-status">{{ collector.getCalledListenersCount }}</span>
-    </a>
+        <a href="{{ url("webprofiler.dashboard", {profile: token}, {fragment: 'events'}) }}" title="{{ 'Events'|t }}">
+            <img width="20" height="28" alt="{{ 'Events'|t }}"
+                 src="data:image/png;base64,{{ collector.icon }}">
+            <span class="sf-toolbar-info-piece-additional sf-toolbar-status">{{ collector.getCalledListenersCount }}</span>
+        </a>
     {% endset %}
 
     {% set text %}
-    <div class="sf-toolbar-info-piece">
-        <b>{{ 'Triggered'|t }}</b>
-        <span>{{ collector.getCalledListenersCount }}</span>
-    </div>
-    <div class="sf-toolbar-info-piece">
-        <b>{{ 'Not triggered'|t }}</b>
-        <span>{{ collector.getNotCalledListenersCount }}</span>
-    </div>
+        <div class="sf-toolbar-info-piece">
+            <b>{{ 'Called'|t }}</b>
+            <span>{{ collector.getCalledListenersCount }}</span>
+        </div>
+
+        <div class="sf-toolbar-info-piece">
+            <b>{{ 'Not called'|t }}</b>
+            <span>{{ collector.getNotCalledListenersCount }}</span>
+        </div>
     {% endset %}
 
     <div class="sf-toolbar-block">
                 <th>{{ 'Class'|t }}</th>
                 <th>{{ 'Priority'|t }}</th>
                 </thead>
-                <tbody> <% _.each( data.called_listeners, function( item ){ %>
-                <tr>
-                    <td><%= item.event %></td>
-                    <% if(item.type == 'Method') { %>
-                    <td>
-                        <%= Drupal.webprofiler.helpers.classLink(item) %>
-                    </td>
-                    <% } else { %>
-                    <td>{{ 'Closure'|t }}</td>
-                    <% } %>
-                    <td><%= item.priority %></td>
-                </tr>
+                <tbody>
+                <% _.each( data.called_listeners, function( events, event_name ){ %>
+                    <% _.each( events, function( priority, priority_value ){ %>
+                        <% _.each( priority, function( listener ){ %>
+                            <tr>
+                                <td><%= event_name %></td>
+                                <% if( listener.clazz ) { %>
+                                    <td><%= Drupal.webprofiler.helpers.classLink(listener.clazz) %></td>
+                                <% } else { %>
+                                    <td><%= listener.service[0] %>::<%= listener.service[1] %></td>
+                                <% } %>
+                                <td><%= priority_value %></td>
+                            </tr>
+                        <% }); %>
+                    <% }); %>
                 <% }); %>
                 </tbody>
             </table>
-        </div>
-        <div class="panel__container">
 
             <table class="table--duo">
                 <thead>
-                <th>{{ 'Non called listeners'|t }}</th>
-                <th>{{ 'Class'|t }}</th>
+                <th>{{ 'Not called listeners'|t }}</th>
+                <th>{{ 'Service'|t }}</th>
+                <th>{{ 'Priority'|t }}</th>
                 </thead>
                 <tbody>
-                <% _.each( data.not_called_listeners, function( item ){ %>
+                <% _.each( data.not_called_listeners, function( events, event_name ){ %>
+                <% _.each( events, function( priority, priority_value ){ %>
+                <% _.each( priority, function( listener ){ %>
                 <tr>
-                    <td><%= item.event %></td>
-                    <% if(item.type == 'Method') { %>
-                    <td>
-                        <%= Drupal.webprofiler.helpers.classLink(item) %>
-                    </td>
-                    <% } else { %>
-                    <td>{{ 'Closure'|t }}</td>
-                    <% } %>
+                    <td><%= event_name %></td>
+                    <td><%= listener.service[0] %>::<%= listener.service[1] %></td>
+                    <td><%= priority_value %></td>
                 </tr>
                 <% }); %>
+                <% }); %>
+                <% }); %>
                 </tbody>
             </table>
         </div>
+
     </script>
 {% endblock %}