From 8579c779a0473c728e856be9b75c7ba4e461bb75 Mon Sep 17 00:00:00 2001 From: gotika Date: Wed, 4 Sep 2024 08:08:13 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BD=D0=B0=D1=81=D1=82=D1=80=D0=BE=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BC=D0=B0=D1=80=D1=88=D1=80=D1=83=D1=82=D0=B8?= =?UTF-8?q?=D0=B7=D0=B0=D1=86=D0=B8=D1=8F,=20=D0=BD=D1=83=D0=B6=D0=BD?= =?UTF-8?q?=D0=BE=20=D0=B4=D0=BE=D0=B4=D0=B5=D0=BB=D0=B0=D1=82=D1=8C=20?= =?UTF-8?q?=D0=B3=D1=80=D1=83=D0=BF=D0=BF=D1=8B=20=D1=8E=D0=B7=D0=B5=D1=80?= =?UTF-8?q?=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.js | 42 +++++++------ src/components/metrics.js | 0 src/components/navbar.js | 19 ++++++ .../{globalMailing.js => GlobalMailing.js} | 0 ...{globalVariables.js => GlobalVariables.js} | 0 src/pages/groups.js | 2 +- src/pages/performance.js | 59 +++++++++++++++++++ src/pages/users.js | 2 +- 8 files changed, 103 insertions(+), 21 deletions(-) delete mode 100644 src/components/metrics.js rename src/pages/{globalMailing.js => GlobalMailing.js} (100%) rename src/pages/{globalVariables.js => GlobalVariables.js} (100%) diff --git a/src/App.js b/src/App.js index 3784575..fc4225c 100644 --- a/src/App.js +++ b/src/App.js @@ -1,25 +1,29 @@ -import logo from './logo.svg'; -import './App.css'; +import React from 'react'; +import { BrowserRouter as Router, Route, Routes } from 'react-router-dom'; +import Users from './pages/users'; +import Groups from './pages/groups'; +import Migration from './pages/migration'; +import GlobalMailing from './pages/GlobalMailing'; +import GlobalVariables from './pages/GlobalVariables'; +import PerformanceMetrics from './pages/performance'; +import Navbar from './components/navbar'; function App() { return ( -
-
- logo -

- Edit src/App.js and save to reload. -

- - Learn React - -
-
+ +
+ + + } /> + } /> + } /> + } /> + } /> + } /> + +
+
); } -export default App; +export default App; \ No newline at end of file diff --git a/src/components/metrics.js b/src/components/metrics.js deleted file mode 100644 index e69de29..0000000 diff --git a/src/components/navbar.js b/src/components/navbar.js index e69de29..aebc805 100644 --- a/src/components/navbar.js +++ b/src/components/navbar.js @@ -0,0 +1,19 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; + +function Navbar() { + return ( + + ); +} + +export default Navbar; \ No newline at end of file diff --git a/src/pages/globalMailing.js b/src/pages/GlobalMailing.js similarity index 100% rename from src/pages/globalMailing.js rename to src/pages/GlobalMailing.js diff --git a/src/pages/globalVariables.js b/src/pages/GlobalVariables.js similarity index 100% rename from src/pages/globalVariables.js rename to src/pages/GlobalVariables.js diff --git a/src/pages/groups.js b/src/pages/groups.js index 40f9f08..1c3e7d5 100644 --- a/src/pages/groups.js +++ b/src/pages/groups.js @@ -1,7 +1,7 @@ import React from 'react'; const Groups = () => { - const groups = ['Admins', 'Editors', 'Viewers']; //заглушка + const groups = ['Admins', 'Editors', 'Viewers']; //заглушка(потом нужно убрать и доделать) return (
diff --git a/src/pages/performance.js b/src/pages/performance.js index e69de29..510957c 100644 --- a/src/pages/performance.js +++ b/src/pages/performance.js @@ -0,0 +1,59 @@ +import React from "react"; +import { + Chart as ChartJS, + CategoryScale, + LinearScale, + PointElement, + LineElement, + Title, + Tooltip, + Legend +} from 'chart.js'; +import { Line } from 'react-chartjs-2'; + +ChartJS.register( + CategoryScale, + LinearScale, + PointElement, + LineElement, + Title, + Tooltip, + Legend +); + +const PerformanceMetrics = () => { + const data = { + labels: ['Январь', 'Февраль', 'Март', 'Апрель', 'Май'], + datasets: [ + { + label: 'Производительность', + data: [65, 59, 80, 81, 56], + fill: false, + backgroundColor: 'rgb(75, 192, 192)', + borderColor: 'rgba(75, 192, 192, 0.2)', + }, + ], + }; + + const options = { + responsive: true, + plugins: { + legend: { + position: 'top', + }, + title: { + display: true, + text: 'График производительности', + }, + }, + }; + + return ( +
+

Производительность

+ +
+ ); +}; + +export default PerformanceMetrics; \ No newline at end of file diff --git a/src/pages/users.js b/src/pages/users.js index 754e7f8..7b8d5c6 100644 --- a/src/pages/users.js +++ b/src/pages/users.js @@ -2,7 +2,7 @@ import React from 'react'; import UserActions from '../components/userActions'; const Users = () => { - const users = ['User1', 'User2', 'User3']; //заглушка(потом можно убрать) + const users = ['User1', 'User2', 'User3']; //заглушка(потом нужно убрать и доделать) return (