diff --git a/react-app/src/components/AnalyticsPage.css b/react-app/src/components/AnalyticsPage.css new file mode 100644 index 0000000..0031b1a --- /dev/null +++ b/react-app/src/components/AnalyticsPage.css @@ -0,0 +1,67 @@ +body { + background-color: #000; + color: #fff; + font-family: Arial, sans-serif; + height: 100vh; + display: flex; + justify-content: center; + align-items: center; +} + +.analytics-container { + background-color: #1a1a1a; + border-radius: 15px; + padding: 30px; + box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2); + max-width: 900px; + width: 100%; +} + +.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; + display: flex; + justify-content: center; + align-items: center; + border-radius: 10px; +} + +.metrics-table { + width: 100%; + border-collapse: collapse; + margin-top: 15px; + 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; +} diff --git a/react-app/src/components/AnalyticsPage.js b/react-app/src/components/AnalyticsPage.js index f9a46a6..e9cce10 100644 --- a/react-app/src/components/AnalyticsPage.js +++ b/react-app/src/components/AnalyticsPage.js @@ -1,14 +1,52 @@ import React from 'react'; +import 'bootstrap/dist/css/bootstrap.min.css'; +import './AnalyticsPage.css'; function AnalyticsPage() { - return ( -
-

Аналитика

-

Здесь будут отображаться метрики и графики:

-
[График метрик]
-
[Таблица метрик]
-
- ); + 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), + })); + + return ( +
+

Аналитика и результаты обучения

+
+
+

Графики метрик

+
Здесь будут графики (accuracy, loss)
+
+ +
+

Таблица метрик

+ + + + + + + + + + {metricsData.map((row, index) => ( + + + + + + ))} + +
ЭпохаТочность (Accuracy)Потери (Loss)
{row.epoch}{row.accuracy}%{row.loss}
+
+ +
+

Визуализация процесса обучения

+
Здесь будет визуализация (например, конфигурация модели)
+
+
+
+ ); } export default AnalyticsPage; diff --git a/react-app/src/components/Dashboard.css b/react-app/src/components/Dashboard.css new file mode 100644 index 0000000..09307fc --- /dev/null +++ b/react-app/src/components/Dashboard.css @@ -0,0 +1,74 @@ +body { + background-color: #000; + color: #fff; + font-family: Arial, sans-serif; + height: 100vh; + display: flex; + justify-content: center; + align-items: center; +} + +.dashboard-container { + background-color: #1a1a1a; + border-radius: 15px; + padding: 30px; + box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2); + max-width: 800px; + width: 100%; +} + +.dashboard-content { + display: flex; + flex-direction: column; + gap: 20px; +} + +.buttons-section { + display: flex; + justify-content: space-between; +} + +.btn-dashboard { + background-color: #fff; + color: #000; + border-radius: 10px; + padding: 10px 20px; + transition: all 0.3s ease; +} + +.btn-dashboard:hover { + background-color: #000; + color: #fff; + border: 1px solid #fff; +} + +.projects-section, .analytics-section { + background-color: #2a2a2a; + border-radius: 10px; + padding: 20px; +} + +.section-title { + margin-bottom: 15px; + color: #ccc; +} + +.projects-list { + list-style: none; + padding: 0; +} + +.project-item { + background-color: #1a1a1a; + border-radius: 5px; + padding: 10px; + margin-bottom: 10px; + color: #fff; + cursor: pointer; + transition: all 0.3s ease; +} + +.project-item:hover { + background-color: #e6e6e6; + color: #000; +} \ No newline at end of file diff --git a/react-app/src/components/Dashboard.js b/react-app/src/components/Dashboard.js index f29718e..68f8a29 100644 --- a/react-app/src/components/Dashboard.js +++ b/react-app/src/components/Dashboard.js @@ -1,26 +1,34 @@ import React from 'react'; -import { Link } from 'react-router-dom'; +import 'bootstrap/dist/css/bootstrap.min.css'; +import './Dashboard.css'; +import { useNavigate } from 'react-router-dom'; function Dashboard() { - return ( -
-

Главная страница

-
- - Создать новую модель - - - Загрузка и обработка данных - - - Аналитика - - - Настройки пользователя - -
-
- ); + const navigate = useNavigate(); + + return ( +
+

Главная страница

+
+
+ + +
+
+

Текущие проекты

+
    +
  • alert('Управление проектом 1')}>Проект 1
  • +
  • alert('Управление проектом 2')}>Проект 2
  • +
  • alert('Управление проектом 3')}>Проект 3
  • +
+
+
+

Аналитика

+ +
+
+
+ ); } export default Dashboard; diff --git a/react-app/src/components/DataProcessing.css b/react-app/src/components/DataProcessing.css new file mode 100644 index 0000000..3e0a4a3 --- /dev/null +++ b/react-app/src/components/DataProcessing.css @@ -0,0 +1,121 @@ +body { + background-color: #000; + color: #fff; + font-family: Arial, sans-serif; + height: 100vh; + display: flex; + justify-content: center; + align-items: center; +} + +.data-processing-container { + background-color: #1a1a1a; + border-radius: 15px; + padding: 30px; + box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2); + max-width: 900px; + width: 100%; +} + +.data-processing-content { + display: flex; + flex-direction: column; + gap: 20px; +} + +.upload-section, .preprocessing-section { + background-color: #2a2a2a; + border-radius: 10px; + padding: 20px; +} + +.section-title { + margin-bottom: 15px; + color: #ccc; +} + +.file-input { + background-color: #fff; + color: #000; + border-radius: 10px; + padding: 10px; + width: 100%; + transition: all 0.3s ease; +} + +.file-input:hover { + background-color: #ccc; +} + +.file-name { + margin-top: 10px; + color: #fff; +} + +.data-table { + width: 100%; + border-collapse: collapse; + margin-top: 15px; + color: #fff; +} + +.data-table th, .data-table td { + border: 1px solid #555; + padding: 10px; + text-align: center; +} + +.data-table th { + background-color: #444; + color: #fff; +} + +.data-table tr:nth-child(even) { + background-color: #333; +} + +.pagination { + display: flex; + justify-content: center; + margin-top: 15px; + gap: 5px; +} + +.page-button { + background-color: #444; + color: #fff; + border: none; + padding: 5px 10px; + border-radius: 5px; + cursor: pointer; + transition: all 0.3s ease; +} + +.page-button.active { + background-color: #fff; + color: #000; + font-weight: bold; +} + +.page-button:hover { + background-color: #666; +} + +.processing-section { + display: flex; + justify-content: center; +} + +.btn-process { + background-color: #fff; + color: #000; + border-radius: 10px; + padding: 10px 20px; + transition: all 0.3s ease; +} + +.btn-process:hover { + background-color: #000; + color: #fff; + border: 1px solid #fff; +} \ No newline at end of file diff --git a/react-app/src/components/DataProcessing.js b/react-app/src/components/DataProcessing.js index 3f1dba0..0dd32ee 100644 --- a/react-app/src/components/DataProcessing.js +++ b/react-app/src/components/DataProcessing.js @@ -1,14 +1,98 @@ -import React from 'react'; +import React, { useState } from 'react'; +import 'bootstrap/dist/css/bootstrap.min.css'; +import './DataProcessing.css'; function DataProcessing() { - return ( -
-

Загрузка и обработка данных

-

Загрузите данные и настройте параметры обработки:

- - -
- ); + const [fileName, setFileName] = useState(null); + const [currentPage, setCurrentPage] = useState(1); + const rowsPerPage = 10; + + // Пример данных для таблицы + const data = Array.from({ length: 25 }, (_, index) => ({ + col1: `Данные ${index + 1}.1`, + col2: `Данные ${index + 1}.2`, + col3: `Данные ${index + 1}.3`, + })); + + const handleFileUpload = (event) => { + const file = event.target.files[0]; + if (file) { + setFileName(file.name); + alert(`Файл ${file.name} загружен`); + } + }; + + const handleDataProcessing = () => { + alert('Обработка данных начата'); + }; + + const handlePageChange = (pageNumber) => { + setCurrentPage(pageNumber); + }; + + // Определяем текущие строки для отображения + const indexOfLastRow = currentPage * rowsPerPage; + const indexOfFirstRow = indexOfLastRow - rowsPerPage; + const currentRows = data.slice(indexOfFirstRow, indexOfLastRow); + + // Генерация кнопок пагинации + const pageNumbers = []; + for (let i = 1; i <= Math.ceil(data.length / rowsPerPage); i++) { + pageNumbers.push(i); + } + + return ( +
+

Загрузка и обработка данных

+
+
+

Загрузка данных

+ + {fileName &&

Загруженный файл: {fileName}

} +
+
+

Предобработка данных

+ + + + + + + + + + {currentRows.map((row, index) => ( + + + + + + ))} + +
Столбец 1Столбец 2Столбец 3
{row.col1}{row.col2}{row.col3}
+
+ {pageNumbers.map((number) => ( + + ))} +
+
+
+ +
+
+
+ ); } export default DataProcessing; diff --git a/react-app/src/components/ModelDesigner.css b/react-app/src/components/ModelDesigner.css new file mode 100644 index 0000000..2a9a549 --- /dev/null +++ b/react-app/src/components/ModelDesigner.css @@ -0,0 +1,104 @@ +body { + background-color: #000; + color: #fff; + font-family: Arial, sans-serif; + height: 100vh; + display: flex; + justify-content: center; + align-items: center; +} + +.model-designer-container { + background-color: #1a1a1a; + border-radius: 15px; + padding: 30px; + box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2); + max-width: 900px; + width: 100%; +} + +.model-designer-content { + display: flex; + flex-direction: column; + gap: 20px; +} + +.toolbar { + display: flex; + justify-content: space-between; +} + +.btn-designer { + background-color: #fff; + color: #000; + border-radius: 10px; + padding: 10px 20px; + transition: all 0.3s ease; +} + +.btn-designer:hover { + background-color: #000; + color: #fff; + border: 1px solid #fff; +} + +.layers-section, .training-section { + background-color: #2a2a2a; + border-radius: 10px; + padding: 20px; +} + +.section-title { + margin-bottom: 15px; + color: #ccc; +} + +.layers-list { + list-style: none; + padding: 0; +} + +.layer-item { + background-color: #1a1a1a; + border-radius: 5px; + padding: 10px; + margin-bottom: 10px; + color: #fff; + display: flex; + justify-content: space-between; + align-items: center; + transition: all 0.3s ease; +} + +.layer-item:hover { + background-color: #e6e6e6; + color: #000; +} + +.btn-remove { + background-color: #e63946; + color: #fff; + border: none; + border-radius: 5px; + padding: 5px 10px; + cursor: pointer; + transition: all 0.3s ease; +} + +.btn-remove:hover { + background-color: #ff0000; +} + +.btn-train { + background-color: #fff; + color: #000; + border-radius: 10px; + padding: 10px 20px; + transition: all 0.3s ease; +} + +.btn-train:hover { + background-color: #000; + color: #fff; + border: 1px solid #fff; +} diff --git a/react-app/src/components/ModelDesigner.js b/react-app/src/components/ModelDesigner.js index 13e286e..aa19868 100644 --- a/react-app/src/components/ModelDesigner.js +++ b/react-app/src/components/ModelDesigner.js @@ -1,17 +1,58 @@ -import React from 'react'; +import React, { useState } from 'react'; +import 'bootstrap/dist/css/bootstrap.min.css'; +import './ModelDesigner.css'; function ModelDesigner() { - return ( -
-

Проектирование модели

-

Инструменты для настройки нейронной сети:

-
- - - -
-
- ); + const [layers, setLayers] = useState([]); + + const addLayer = (type) => { + setLayers([...layers, { id: layers.length + 1, type, settings: {} }]); + }; + + const removeLayer = (id) => { + setLayers(layers.filter((layer) => layer.id !== id)); + }; + + const handleTrainModel = () => { + alert('Начало процесса обучения модели'); + }; + + return ( +
+

Проектирование модели

+
+
+ + + +
+
+

Слои модели

+ {layers.length === 0 ? ( +

Слои пока не добавлены

+ ) : ( +
    + {layers.map((layer) => ( +
  • + {layer.type} + +
  • + ))} +
+ )} +
+
+

Обучение модели

+ +
+
+
+ ); } export default ModelDesigner;