fix(qualys/duplicates): renomme cle items -> groups (conflit Jinja avec dict.items)
This commit is contained in:
parent
cc550c2d84
commit
6c52d05393
@ -1210,7 +1210,7 @@ def find_duplicate_hostnames(db, force_refresh=False):
|
||||
# Trier par count desc puis shortname
|
||||
dupes.sort(key=lambda x: (-x["count"], x["shortname"]))
|
||||
result = {"total_assets": len(assets), "duplicate_hostnames": len(dupes),
|
||||
"total_zombies": sum(d["count"] - 1 for d in dupes), "items": dupes}
|
||||
"total_zombies": sum(d["count"] - 1 for d in dupes), "groups": dupes}
|
||||
_cache.set(cache_key, result, CACHE_TTL)
|
||||
return result
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if not dupes_data.items %}
|
||||
{% if not dupes_data.groups %}
|
||||
<div class="card p-6 text-center text-gray-400">
|
||||
Aucun doublon detecte. Si la page semble vide, clique sur "Re-scan API" pour forcer un scan complet.
|
||||
</div>
|
||||
@ -61,7 +61,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for grp in dupes_data.items %}
|
||||
{% for grp in dupes_data.groups %}
|
||||
{% for a in grp.assets %}
|
||||
<tr class="border-b border-cyber-border/30 hover:bg-cyber-card/50 {% if loop.first %}bg-green-900/10{% else %}bg-red-900/10{% endif %}">
|
||||
<td class="py-1 font-mono">{% if loop.first %}<strong class="text-cyber-accent">{{ grp.shortname }}</strong> ({{ grp.count }}){% endif %}</td>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user