diff --git a/frontend/src/TrafficDashboard.jsx b/frontend/src/TrafficDashboard.jsx index 9cf62e9..4c393c6 100644 --- a/frontend/src/TrafficDashboard.jsx +++ b/frontend/src/TrafficDashboard.jsx @@ -11,15 +11,15 @@ import { Pie, Cell, ResponsiveContainer, - Legend, Tooltip, } from 'recharts'; import PageHeader from './components/PageHeader.jsx'; +/** Палитра в стиле UniFi: зелёные, жёлтые, оранжевые, красные, фиолетовые, серые */ const CHART_COLORS = [ - '#206bc4', '#4299e1', '#2fb344', '#5eba00', '#e64980', '#f76707', - '#fd7e14', '#fab005', '#e67700', '#20c997', '#0dcaf0', '#6f42c1', - '#6366f1', '#8b5cf6', '#a855f7', '#d63384', '#0d6efd', '#198754', + '#2fb344', '#5eba00', '#94c748', '#fab005', '#fd7e14', '#f76707', + '#e64980', '#ae3ec9', '#7950f2', '#5c7cfa', '#748cab', '#868e96', + '#adb5bd', '#ced4da', '#206bc4', '#20c997', ]; function formatBytes(bytes) { @@ -30,6 +30,10 @@ function formatBytes(bytes) { return `${parseFloat((bytes / Math.pow(k, i)).toFixed(2))} ${sizes[i]}`; } +const DONUT_SIZE = 200; +const DONUT_OUTER = 88; +const DONUT_INNER = 52; + function JumphostCard({ jumphost }) { const { name, host, error, interfaces } = jumphost; const hasData = Array.isArray(interfaces) && interfaces.length > 0; @@ -81,47 +85,73 @@ function JumphostCard({ jumphost }) { )} {!error && chartData.length > 0 && ( - <> -