patchcenter/app/templates/qualys_agents.html
Khalid MOUTAOUAKIL c139dfbaa2 Cache mémoire 10min pour Qualys API, bouton Resync temps réel, page Agents (activation keys + versions)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 23:04:48 +02:00

78 lines
3.1 KiB
HTML

{% extends 'base.html' %}
{% block title %}Agents Qualys{% endblock %}
{% block content %}
<div class="flex justify-between items-center mb-4">
<div>
<h2 class="text-xl font-bold text-cyber-accent">Agents Qualys</h2>
<p class="text-xs text-gray-500 mt-1">Activation keys et versions des agents déployés</p>
</div>
<a href="/qualys/search" class="btn-sm bg-cyber-border text-cyber-accent px-4 py-2">Recherche</a>
</div>
<!-- Activation Keys -->
<div class="card p-4 mb-4">
<h3 class="text-sm font-bold text-cyber-accent mb-3">Activation Keys</h3>
<table class="w-full table-cyber text-xs">
<thead><tr>
<th class="text-left p-2">Titre</th>
<th class="p-2">Statut</th>
<th class="p-2">Type</th>
<th class="p-2">Utilisés</th>
<th class="text-left p-2">Clé</th>
</tr></thead>
<tbody>
{% for k in keys %}
<tr>
<td class="p-2 font-bold text-cyber-accent">{{ k.title }}</td>
<td class="p-2 text-center"><span class="badge {% if k.status == 'ACTIVE' %}badge-green{% else %}badge-red{% endif %}">{{ k.status }}</span></td>
<td class="p-2 text-center text-gray-400">{{ k.type }}</td>
<td class="p-2 text-center font-bold">{{ k.used }}</td>
<td class="p-2 font-mono text-gray-500" style="font-size:10px;">{{ k.key }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<!-- Statut agents -->
<div class="grid grid-cols-2 gap-4 mb-4">
<div class="card p-4">
<h3 class="text-sm font-bold text-cyber-accent mb-3">Statut des agents</h3>
{% if summary.statuses %}
<table class="w-full table-cyber text-xs">
<thead><tr><th class="text-left p-2">Statut</th><th class="p-2">Nombre</th></tr></thead>
<tbody>
{% for s in summary.statuses %}
<tr>
<td class="p-2"><span class="badge {% if 'ACTIVE' in (s.agent_status or '').upper() or 'STATUS_ACTIVE' in (s.agent_status or '').upper() %}badge-green{% elif 'INACTIVE' in (s.agent_status or '').upper() %}badge-red{% else %}badge-gray{% endif %}">{{ s.agent_status }}</span></td>
<td class="p-2 text-center font-bold">{{ s.cnt }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p class="text-gray-500 text-xs">Aucune donnée</p>
{% endif %}
</div>
<div class="card p-4">
<h3 class="text-sm font-bold text-cyber-accent mb-3">Versions déployées</h3>
{% if summary.versions %}
<table class="w-full table-cyber text-xs">
<thead><tr><th class="text-left p-2">Version</th><th class="p-2">Nombre</th></tr></thead>
<tbody>
{% for v in summary.versions %}
<tr>
<td class="p-2 font-mono">{{ v.agent_version }}</td>
<td class="p-2 text-center font-bold">{{ v.cnt }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p class="text-gray-500 text-xs">Aucune donnée</p>
{% endif %}
</div>
</div>
{% endblock %}