Semaine 11

This commit is contained in:
gauvainboiche
2026-07-11 21:38:00 +02:00
parent d3d2416dea
commit 0d071d2843
281 changed files with 54412 additions and 0 deletions
@@ -0,0 +1,43 @@
{% extends "parc/base.html" %}
{% block title %}Équipements actifs{% endblock %}
{% block content %}
<h1>Équipements actifs</h1>
<a class="btn" href="{% url 'equipment_create' %}">Ajouter</a>
{% if equipments %}
<table>
<thead>
<tr>
<th>Hôte</th>
<th>Adresse IP</th>
<th>État</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for equipment in equipments %}
<tr>
<td>{{ equipment.hostname }}</td>
<td>{{ equipment.ip }}</td>
<td>
{% if equipment.is_active %}
<span class="status-active">Actif</span>
{% else %}
<span class="status-inactive">Inactif</span>
{% endif %}
</td>
<td>
<a class="btn" href="{% url 'equipment_detail' equipment.pk %}">Voir</a>
<a class="btn btn-secondary" href="{% url 'equipment_update' equipment.pk %}">Modifier</a>
<a class="btn btn-danger" href="{% url 'equipment_delete' equipment.pk %}">Supprimer</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p>Aucun équipement actif enregistré.</p>
{% endif %}
{% endblock %}