mirror of https://github.com/CIRCL/lookyloo
chg: avoid duplicate URLs in hashlookup view
parent
649d7714cf
commit
e291fc6167
website/web
templates
|
@ -516,6 +516,9 @@ def urls_rendered_page(tree_uuid: str):
|
|||
@app.route('/tree/<string:tree_uuid>/hashlookup', methods=['GET'])
|
||||
def hashlookup(tree_uuid: str):
|
||||
merged, total_ressources = lookyloo.merge_hashlookup_tree(tree_uuid)
|
||||
# We only want unique URLs for the template
|
||||
for sha1, entries in merged.items():
|
||||
entries['nodes'] = set(node.name for node in entries['nodes'])
|
||||
return render_template('hashlookup.html', base_tree_uuid=tree_uuid, merged=merged, total_ressources=total_ressources)
|
||||
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<dt class="col-sm-2">URLs in tree</dt>
|
||||
<dd class="col-sm-10">
|
||||
{% for node in entries['nodes'] %}
|
||||
{{ node.name }} </br>
|
||||
{{ node }} </br>
|
||||
{% endfor %}
|
||||
</dd>
|
||||
</dl>
|
||||
|
|
Loading…
Reference in New Issue