Skip to content

Commit

Permalink
Add display of preloaded URLs in ServiceWorker tab
Browse files Browse the repository at this point in the history
The ServiceWorker tab in the Collector template now includes an option to show preloaded URLs for each caching strategy. This additional information aids in debugging and analysis, by providing visibility into preloaded URLs at a per-strategy level.
  • Loading branch information
Spomky committed Jun 1, 2024
1 parent 7ad8716 commit e967cbc
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion templates/Collector/serviceworker-tab.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
</tr>
</thead>
<tbody>
{% for cachingStrategy in collector.cachingStrategies %}
{% for id, cachingStrategy in collector.cachingStrategies %}
<tr>
<td>{{ cachingStrategy.getName() }}</td>
<td class="break-long-words font-normal">
Expand Down Expand Up @@ -163,6 +163,20 @@
{% endif %}
</td>
</tr>
{% if preloadedUrls > 0 %}
<tr>
<td colspan="5">
<div>
<a class="btn btn-link text-small sf-toggle sf-toggle-off" data-toggle-selector="#data-serialize-{{ id }}" data-toggle-alt-content="Hide preloaded URLs" data-toggle-original-content="Show preloaded URLs">
Show preloaded URLs
</a>
<div id="data-serialize-{{ id }}" class="context sf-toggle-content sf-toggle-hidden">
{{ dump(cachingStrategy.preloadUrls) }}
</div>
</div>
</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
Expand Down

0 comments on commit e967cbc

Please sign in to comment.