Date : 20/12/2025 13:15 Statut : En attente de validation
generate.sh = 3820 lignes de bashEffort : Moyen | Impact : Amelioration notable
monitoring/
├── generate.sh # Script principal simplifie
├── templates/
│ ├── header.html # Header + nav communs
│ ├── footer.html # Footer commun
│ └── card.sh # Fonctions de generation
├── assets/
│ └── style.css # CSS unique partage
└── current.json # Donnees (inchange)
Avantages :
Inconvenients :
Effort : Important | Impact : Transformation complete
monitoring/
├── collect.sh # Collecte des donnees (inchange)
├── current.json # Donnees (inchange)
└── dashboard/
├── index.html # Page unique SPA
├── style.css # CSS moderne
└── app.js # Logique JS vanilla
Principe : Une seule page HTML qui charge current.json et affiche tout dynamiquement.
Avantages :
Inconvenients :
+------------------------------------------+
| 33800 Stack [dark] | <- Header fixe
+--------+---------------------------------+
| | |
| [*] | Vue d'ensemble |
| Accueil| +-------+ +-------+ +-------+ |
| | | Alerts| | Servers| |Services|
| [ ] | +-------+ +-------+ +-------+ |
| Servers| |
| | Serveurs |
| [ ] | +---------------------------+ |
| Sites | | PVE | Proxmox1 | |
| | | OK 4% CPU | WARN 94% RAM | |
| [ ] | +---------------------------+ |
| Services| +---------------------------+ |
| | | prod-port. | dev-port. | |
| [ ] | | 23 containers | 27 cont. | |
| Secrets| +---------------------------+ |
| | |
| [ ] | Services IA |
| Docs | +-------+ +-------+ +-------+ |
| | |Ollama | |Whisper| |YOLO | |
+--------+---------------------------------+
| Fonctionnalite | Description |
|---|---|
| Navigation sidebar | Acces rapide a chaque section |
| Badges resume | Compteurs OK/Warning/Error en haut |
| Cards collapsibles | Expand/collapse par serveur |
| Filtres | Montrer uniquement les erreurs |
| Recherche | Trouver un container/site rapidement |
| Auto-refresh | Actualisation toutes les 5 min |
| Dark/Light mode | Toggle theme |
| Mobile responsive | Sidebar devient drawer |
Vue d'ensemble (index)
Serveurs
Sites Nginx
Services
Montages
Secrets (si pertinent en dashboard)
Documentation
dashboard/index.html<!DOCTYPE html>
<html>
<head>
<title>33800 Stack</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<nav id="sidebar">...</nav>
<main id="content"></main>
<script src="app.js"></script>
</body>
</html>
style.css)app.js)// Chargement des donnees
async function loadData() {
const res = await fetch('current.json');
return res.json();
}
// Rendu dynamique
function render(data) {
document.getElementById('content').innerHTML = renderSection(currentView, data);
}
// Navigation
window.onhashchange = () => render(data);
index.html, style.css, app.jscurrent.json est copie sur nginx/var/www/dashboard/generate.sh (ou le garder en backup)| Tache | Temps estime |
|---|---|
| Structure HTML + routing | 1-2h |
| CSS complet | 2-3h |
| JS rendering | 2-3h |
| Tests + ajustements | 1-2h |
| Deploiement | 30min |
| Total | ~8h |