Files
gilles 8a8641e9cd feat(widgets): implémentation Phase 4 — widgets Glance complets
- widget-network-scan : liste équipements avec état (online/offline),
  hostname, IP, vendor, badges services, tri online en premier
- widget-agent-metrics : barres CPU/RAM/disque/température par agent,
  code couleur ok (vert) / warn (orange) / crit (rouge)
- sentinelmesh.css : styles custom (points statut, badges, barres de
  progression animées) compatibles thèmes Glance
- glance-page-example.yaml : page Infrastructure prête à l'emploi
- Backend widgets enrichi : mac, ports, offline count, net_rx/tx_bps
- ROADMAP Phase 4 marquée complète

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 06:21:57 +02:00

88 lines
1.9 KiB
CSS

/* ============================================================
SentinelMesh — CSS custom pour widgets Glance
Copier dans le répertoire assets de Glance et référencer :
custom-css-file: /assets/sentinelmesh.css
============================================================ */
/* --- Widget réseau --- */
.sm-net-header {
align-items: center;
}
.sm-device {
align-items: flex-start;
padding: 4px 0;
}
/* Point de statut coloré */
.sm-state-dot {
width: 8px;
height: 8px;
border-radius: 50%;
margin-top: 5px;
flex-shrink: 0;
}
.sm-dot-online { background: var(--color-positive, #4caf50); }
.sm-dot-offline { background: var(--color-negative, #f44336); opacity: 0.5; }
/* Badges services / vendor */
.sm-badge {
display: inline-block;
padding: 1px 6px;
border-radius: 4px;
background: var(--color-widget-content-background, rgba(255,255,255,0.06));
color: var(--color-text-subdue, #aaa);
line-height: 1.6;
}
.sm-badge-vendor {
color: var(--color-primary, #7ca9d4);
}
/* --- Widget métriques --- */
.sm-agent {
padding-bottom: 6px;
border-bottom: 1px solid var(--color-widget-content-background, rgba(255,255,255,0.06));
}
.sm-agent:last-child { border-bottom: none; }
.sm-metric-row {
display: flex;
align-items: center;
gap: 8px;
margin-top: 4px;
}
.sm-metric-label {
width: 40px;
flex-shrink: 0;
text-align: right;
}
.sm-metric-val {
width: 36px;
flex-shrink: 0;
text-align: right;
}
/* Barre de progression */
.sm-bar-track {
flex: 1;
height: 4px;
border-radius: 2px;
background: var(--color-widget-content-background, rgba(255,255,255,0.08));
overflow: hidden;
}
.sm-bar {
height: 100%;
border-radius: 2px;
min-width: 2px;
transition: width 0.4s ease;
}
.sm-bar-ok { background: var(--color-positive, #4caf50); }
.sm-bar-warn { background: var(--color-base-500, #ff9800); }
.sm-bar-crit { background: var(--color-negative, #f44336); }