diff --git a/react-app/src/components/AnalyticsPage.css b/react-app/src/components/AnalyticsPage.css index 0031b1a..c95bfdc 100644 --- a/react-app/src/components/AnalyticsPage.css +++ b/react-app/src/components/AnalyticsPage.css @@ -1,13 +1,18 @@ +/* Общие стили для страницы */ body { background-color: #000; color: #fff; font-family: Arial, sans-serif; + margin: 0; + padding: 0; height: 100vh; display: flex; justify-content: center; - align-items: center; + align-items: flex-start; /* Выравнивание по верхнему краю */ + overflow-y: auto; } +/* Контейнер с аналитикой */ .analytics-container { background-color: #1a1a1a; border-radius: 15px; @@ -15,35 +20,44 @@ body { box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2); max-width: 900px; width: 100%; + overflow-y: auto; + margin-top: 20px; /* Добавляем отступ сверху, чтобы контент не прижимался к верхнему краю */ } +/* Секция с контентом */ .analytics-content { display: flex; flex-direction: column; gap: 20px; } +/* Секция графиков */ .graph-section, .metrics-section, .visualization-section { background-color: #2a2a2a; border-radius: 10px; padding: 20px; } +/* Названия секций */ .section-title { margin-bottom: 15px; color: #ccc; } -.graph-placeholder, .visualization-placeholder { - background-color: #333; - color: #ccc; - height: 200px; +/* Контейнер для графиков */ +.graph-container { display: flex; - justify-content: center; - align-items: center; - border-radius: 10px; + flex-wrap: wrap; + gap: 20px; } +/* Каждый график */ +.graph { + flex: 1; + min-width: 300px; +} + +/* Таблица метрик */ .metrics-table { width: 100%; border-collapse: collapse; @@ -51,17 +65,32 @@ body { color: #fff; } +/* Стили для ячеек таблицы */ .metrics-table th, .metrics-table td { border: 1px solid #555; padding: 10px; text-align: center; } +/* Заголовки таблицы */ .metrics-table th { background-color: #444; color: #fff; } +/* Строки таблицы */ .metrics-table tr:nth-child(even) { background-color: #333; } + +/* Визуализация */ +.visualization-placeholder { + background-color: #333; + border-radius: 10px; + height: 200px; + text-align: center; + color: #ccc; + display: flex; + justify-content: center; + align-items: center; +} diff --git a/react-app/src/components/AnalyticsPage.js b/react-app/src/components/AnalyticsPage.js index e9cce10..0415cf6 100644 --- a/react-app/src/components/AnalyticsPage.js +++ b/react-app/src/components/AnalyticsPage.js @@ -5,19 +5,63 @@ import './AnalyticsPage.css'; function AnalyticsPage() { const metricsData = Array.from({ length: 10 }, (_, epoch) => ({ epoch: epoch + 1, - accuracy: (Math.random() * 20 + 80).toFixed(2), - loss: (Math.random() * 0.5 + 0.5).toFixed(2), + accuracy: Math.random() * 20 + 80, + loss: Math.random() * 0.5 + 0.5, })); return (
{row.epoch} | -{row.accuracy}% | -{row.loss} | +{row.accuracy.toFixed(2)}% | +{row.loss.toFixed(2)} |