Files
Andros Fenollosa 0a9a32c0e4 Add multi-technology alert system with performance benchmarks
Implemented the same alert system using 4 different Django technologies:
- Django LiveView (WebSocket real-time)
- Django SSR (traditional server-side rendering)
- HTMX (AJAX partial updates)
- Django Unicorn (reactive components)

Added comprehensive performance testing suite:
- Automated browser-based tests using Chrome DevTools
- Performance metrics collection (response time, network overhead)
- CSV data export for analysis
- Matplotlib visualizations comparing all implementations

Performance results show LiveView is fastest (9.35ms), followed by HTMX
(16.48ms), Unicorn (26.76ms), and SSR (47.25ms).

Updated README with detailed comparison tables, performance benchmarks,
and reproduction instructions.
2025-12-26 11:37:37 +01:00

45 lines
1.1 KiB
HTML

<table class="table is-fullwidth is-striped" hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'>
<thead>
<tr>
<th>ID</th>
<th>Type</th>
<th>Description</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for alert in alerts %}
<tr>
<td>{{ alert.id }}</td>
<td>
<span class="tag {% if alert.type == 'INFO' %}is-info{% elif alert.type == 'WARNING' %}is-warning{% else %}is-danger{% endif %}">
{{ alert.type }}
</span>
</td>
<td>{{ alert.description|truncatewords:10 }}</td>
<td>
<button
class="button is-small is-info"
hx-get="{% url 'alerts:htmx_alert_detail' alert.id %}"
hx-target="#modal-container"
hx-swap="innerHTML">
Details
</button>
<button
class="button is-small is-danger ml-1"
hx-delete="{% url 'alerts:htmx_delete_alert' alert.id %}"
hx-target="#alerts-table-content"
hx-swap="innerHTML"
hx-confirm="Are you sure you want to delete this alert?">
Delete
</button>
</td>
</tr>
{% empty %}
<tr>
<td colspan="4" class="has-text-centered">No alerts yet</td>
</tr>
{% endfor %}
</tbody>
</table>