Skip to content

Real-time network monitor + outbound firewall — see & block every connection. Privacy-first, local-first, Rust fleet agent, SIEM exports, 8 languages. / Moniteur réseau temps réel + pare-feu sortant, agent de flotte Rust, exports SIEM. 100 % local.

ui: dashed LAN perimeter ring around the local zone + legend entry

MoneyLisae387c223affc
diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx
index a286819..53f5891 100644
--- a/frontend/src/App.jsx
+++ b/frontend/src/App.jsx
@@ -854,6 +854,9 @@ function Legend() {
// les appareils non identifiés ou sans particularité ne
// portent aucun verdict.
{ color: '#475569', label: t('legend_ring_none'), dashed: true },
+ // EN: Dashed orange swatch = the LAN perimeter circle.
+ // FR: Pastille orange en pointillés = le cercle du périmètre LAN.
+ { color: '#f97316', label: t('legend_perimeter'), dashed: true },
].map(({ color, label, dashed }) => (
<div key={label} style={{ display: 'flex', alignItems: 'center', gap: 8, marginBottom: 4 }}>
<span style={{
diff --git a/frontend/src/graph/ForceGraph.jsx b/frontend/src/graph/ForceGraph.jsx
index 123bee6..0380c56 100644
--- a/frontend/src/graph/ForceGraph.jsx
+++ b/frontend/src/graph/ForceGraph.jsx
@@ -52,6 +52,7 @@ const radius = d => d.id === 'local' ? 22 : d.category === 'lan_device' ? 18 : 1
export default function ForceGraph({ nodes, edges, lanDevices, alertedNodes = new Set(), onNodeClick, filter }) {
const svgRef = useRef(null)
const gRef = useRef(null) // EN: root <g> (zoom target) / FR: <g> racine (cible du zoom)
+ const perimG = useRef(null) // EN: <g> layer for the LAN perimeter ring / FR: calque <g> du périmètre LAN
const linkG = useRef(null) // EN: <g> layer for edges / FR: calque <g> des arêtes
const labelG = useRef(null) // EN: <g> layer for edge labels / FR: calque <g> des étiquettes d'arêtes
const nodeG = useRef(null) // EN: <g> layer for nodes / FR: calque <g> des nœuds
@@ -73,6 +74,8 @@ export default function ForceGraph({ nodes, edges, lanDevices, alertedNodes = ne
const displayName = d => d.label || (d.label_key ? t(d.label_key) : null) || d.ip
const displayNameRef = useRef(displayName)
displayNameRef.current = displayName
+ const tRef = useRef(t)
+ tRef.current = t
// EN: Always-latest data for effects that don't rebuild the sim.
// FR: Données toujours à jour pour les effets qui ne reconstruisent pas la sim.
@@ -123,6 +126,7 @@ export default function ForceGraph({ nodes, edges, lanDevices, alertedNodes = ne
const g = svg.append('g')
gRef.current = g
+ perimG.current = g.append('g') // EN: under edges & nodes / FR: sous les arêtes et les nœuds
linkG.current = g.append('g')
labelG.current = g.append('g')
nodeG.current = g.append('g')
@@ -221,6 +225,35 @@ export default function ForceGraph({ nodes, edges, lanDevices, alertedNodes = ne
sim.force('charge', d3.forceManyBody().strength(d => d.category === 'lan_device' ? -500 : -750))
sim.force('radial', d3.forceRadial(ringOf, width / 2, height / 2)
.strength(d => d.id === 'local' ? 1 : d.category === 'lan_device' ? 0.45 : 0.3))
+ // EN: LAN perimeter — dashed orange ring enclosing the center + the LAN
+ // orbit, so "my network" reads as a distinct zone from the internet
+ // ring. Redrawn each rebuild (2 elements — cheap).
+ // FR: Périmètre LAN — anneau orange en pointillés englobant le centre +
+ // l'orbite des appareils locaux, pour que « mon réseau » se lise
+ // comme une zone distincte de l'anneau internet. Redessiné à chaque
+ // reconstruction (2 éléments — négligeable).
+ {
+ const local = allNodes.find(n => n.id === 'local')
+ const cx = local?.x ?? width / 2
+ const cy = local?.y ?? height / 2
+ const pr = ringInner + 80
+ perimG.current.selectAll('*').remove()
+ perimG.current.append('circle')
+ .attr('cx', cx).attr('cy', cy).attr('r', pr)
+ .attr('fill', '#f97316').attr('fill-opacity', 0.03)
+ .attr('stroke', '#f97316').attr('stroke-opacity', 0.4)
+ .attr('stroke-width', 1.2).attr('stroke-dasharray', '5,7')
+ .attr('pointer-events', 'none')
+ perimG.current.append('text')
+ .attr('x', cx).attr('y', cy - pr - 10)
+ .attr('text-anchor', 'middle')
+ .attr('font-size', 10).attr('font-weight', 700)
+ .attr('letter-spacing', 3)
+ .attr('fill', '#f97316').attr('fill-opacity', 0.75)
+ .attr('pointer-events', 'none')
+ .text(tRef.current('perim_lan'))
+ }
+
// EN: Collision covers node + label (~90 px wide → half-width ~45-55).
// FR: La collision couvre nœud + étiquette (~90 px de large →
// demi-largeur ~45-55).
diff --git a/frontend/src/i18n.jsx b/frontend/src/i18n.jsx
index 613b12e..f3270d2 100644
--- a/frontend/src/i18n.jsx
+++ b/frontend/src/i18n.jsx
@@ -103,6 +103,8 @@ const en = {
legend_ring_warn: 'amber ring = suspicious',
legend_ring_crit: 'red ring = alert',
legend_ring_none: 'no ring = unidentified, neutral',
+ legend_perimeter: 'LAN perimeter',
+ perim_lan: 'LOCAL NETWORK',
// Alert panel / Panneau d'alertes
alerts_title: 'Alerts',
@@ -340,6 +342,8 @@ const fr = {
legend_ring_warn: 'anneau orange = suspect',
legend_ring_crit: 'anneau rouge = alerte',
legend_ring_none: 'sans anneau = non identifié, neutre',
+ legend_perimeter: 'périmètre LAN',
+ perim_lan: 'RÉSEAU LOCAL',
// Panneau d'alertes / Alert panel
alerts_title: 'Alertes',