Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / modules / contrib / devel / webprofiler / templates / Collector / cache.html.twig
1 {% block toolbar %}
2     {% set icon %}
3     <a href="{{ url("webprofiler.dashboard", {profile: token}, {fragment: 'cache'}) }}" title="{{ 'Cache'|t }}">
4         <img width="20" height="28" alt="{{ 'Cache'|t }}"
5              src="data:image/png;base64,{{ collector.icon }}"/>
6         <span class="sf-toolbar-info-piece-additional sf-toolbar-status">{{ collector.getCacheHitsCount }}
7             / {{ collector.getCacheMissesCount }}</span>
8     </a>
9     {% endset %}
10     {% set text %}
11
12     {% for bin, cids in collector.getCacheHits %}
13         <div class="sf-toolbar-info-piece">
14             <b>{{ bin }}</b>
15             <span>{{ cids }}</span>
16         </div>
17     {% endfor %}
18     {% endset %}
19
20     <div class="sf-toolbar-block">
21         <div class="sf-toolbar-icon">{{ icon|default('') }}</div>
22         <div class="sf-toolbar-info">{{ text|default('') }}</div>
23     </div>
24 {% endblock %}
25
26 {% block panel %}
27     <script id="cache" type="text/template">
28         <h2 class="panel__title">{{ 'Cache'|t }}</h2>
29         <% if( data.cache.length != 0){ %>
30         <% _.each( data.cache, function( item, key ){ %>
31         <div class="panel__container">
32
33             <ul class="list--inline">
34                 <li><b>Bin</b> <%= key %></li>
35             </ul>
36
37             <table class="table--trio">
38                 <thead>
39                 <tr>
40                     <th>{{ 'ID'|t }}</th>
41                     <th>{{ 'hit'|t }}</th>
42                     <th>{{ 'miss'|t }}</th>
43                 </tr>
44                 </thead>
45                 <tbody>
46                 <% _.each( item, function( value, key ){ %>
47                 <tr>
48                     <td><%= key %></td>
49                     <td><%= value['bin_cids_hit'] %></td>
50                     <td><%= value['bin_cids_miss'] %></td>
51                 </tr>
52                 <% }); %>
53                 </tbody>
54             </table>
55         </div>
56         <% }); %>
57         <% } else { %>
58         <div class="panel__container">
59             <p>{{ 'No results'|t }}</p>
60         </div>
61         <% } %>
62     </script>
63 {% endblock %}