Skip to content

Commit

Permalink
chg: Improve rendering of ressources in tree
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafiot committed Jan 20, 2025
1 parent 0009bbe commit 0351861
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
26 changes: 18 additions & 8 deletions website/web/templates/tree_body_hashes.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,24 @@
{{hash_icon(tree_uuid, info['nodes'][0][0].uuid, info['mimetype'], body_hash)}}
</td>
<td>
<ul>
{% for node, embedded in info['nodes'] %}
<li>
<span class="text-break">{{ node.name }} {% if embedded %}<b>(embedded)</b>{%endif%}</span>
<a href="#" role="button" class="btn btn-link openNewTab"
data-capture="{{tree_uuid}}" data-hostnode="{{node.uuid}}">Show on tree</a>
</li>
{% endfor %}
There are <b>{{ info['nodes'] | length }}</b> URLs loading this ressource in the current tree.
<br>
<p class="d-inline-flex gap-1">
<button class="btn btn-link" type="button"
data-bs-toggle="collapse" data-bs-target="#collapseAllNodes_{{loop.index}}"
aria-expanded="false" aria-controls="collapseAllNodes_{{loop.index}}">
Show
</button>
</p>
<div class="collapse" id="collapseAllNodes_{{loop.index}}">
<ul class="list-group list-group-flush">
{% for node, embedded in info['nodes'] %}
<li class="list-group-item">
<p class="text-break">{{ node.name }} {% if embedded %}<b>(embedded)</b>{%endif%}</p>
<button type="button" class="btn btn-link openNewTab" data-capture="{{tree_uuid}}" data-hostnode="{{node.uuid}}">Show on tree</button>
</li>
{% endfor %}
</ul>
</td>
<td>
<span class="d-inline-block text-truncate" style="max-width: 200px;">
Expand Down
2 changes: 1 addition & 1 deletion website/web/templates/tree_hostnames.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</span>
</td>
<td>
There are <b>{{ info['nodes'] | length }}</b> URLs in this hostname in the current tree.
There are <b>{{ info['nodes'] | length }}</b> URLs with this hostname in the current tree.
<br>
<p class="d-inline-flex gap-1">
<button class="btn btn-link" type="button"
Expand Down

0 comments on commit 0351861

Please sign in to comment.