diff --git a/package-lock.json b/package-lock.json
index c70f3d8..7a36899 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -8,6 +8,7 @@
"name": "hackaton-form",
"version": "0.1.0",
"dependencies": {
+ "@flaticon/flaticon-uicons": "^3.3.1",
"@headlessui/react": "^2.2.2",
"@heroicons/react": "^2.2.0",
"@testing-library/dom": "^10.4.0",
@@ -2487,6 +2488,15 @@
"npm": ">=9.0.0"
}
},
+ "node_modules/@flaticon/flaticon-uicons": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/@flaticon/flaticon-uicons/-/flaticon-uicons-3.3.1.tgz",
+ "integrity": "sha512-WN2zuECCdjuGBQrjzN0kpeSygzC5fgF8Q7pDR+FUuGtYWczSdIhIwoD+/fKBEfwqKfNIMZ1WouidevGQ4OJORg==",
+ "license": "SEE LICENSE IN LICENSE",
+ "optionalDependencies": {
+ "esbuild-linux-64": "^0.14.5"
+ }
+ },
"node_modules/@floating-ui/core": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.7.0.tgz",
@@ -7437,6 +7447,22 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/esbuild-linux-64": {
+ "version": "0.14.54",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.54.tgz",
+ "integrity": "sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
"node_modules/escalade": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
diff --git a/package.json b/package.json
index 797328c..cc3428f 100644
--- a/package.json
+++ b/package.json
@@ -3,6 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
+ "@flaticon/flaticon-uicons": "^3.3.1",
"@headlessui/react": "^2.2.2",
"@heroicons/react": "^2.2.0",
"@testing-library/dom": "^10.4.0",
diff --git a/src/dashboard/NetworkMonitor.js b/src/dashboard/NetworkMonitor.js
index 4e5aff0..c824a7b 100644
--- a/src/dashboard/NetworkMonitor.js
+++ b/src/dashboard/NetworkMonitor.js
@@ -1,4 +1,5 @@
import React, { useState } from "react";
+import { ArrowDownTrayIcon, ArrowUpTrayIcon } from "@heroicons/react/24/outline";
export default function NetworkMonitor(args) {
const [selectedTab, setSelectedTab] = useState("interfaces");
@@ -9,6 +10,37 @@ export default function NetworkMonitor(args) {
const handleTabClick = (tabId) => {
setSelectedTab(tabId);
};
+
+ const [NetIfaces, setNetIfaces] = useState(
+ [
+ {
+ name: "Ethernet 6",
+ wireless: false,
+ mac: "FF-FF-FF-FF-FF-FF",
+ ip: "192.168.2.5",
+ mask: "255.255.255.0",
+ mtu: 1500,
+ speed_mbit: 2500,
+ status: true,
+ trafic_down_mb: 100,
+ trafic_up_mb: 1000,
+
+ },
+ {
+ name: "Wireles Adapter 1",
+ wireless: true,
+ mac: "F1-FF-0F-FF-1F-F0",
+ ip: "192.168.1.5",
+ mask: "255.255.255.0",
+ mtu: 1500,
+ speed_mbit: 0,
+ status: false,
+ trafic_down_mb: 35,
+ trafic_up_mb: 2,
+
+ }
+ ]
+ );
return (
<>
@@ -18,8 +50,8 @@ export default function NetworkMonitor(args) {
+ {selectedTab === "interfaces" && (
+ <>
+
+ {NetIfaces.map((iface, index) => (
+
+
+ {!iface.wireless &&
+
+ }
+ {iface.wireless &&
+
+ }
+
+
+
+ {iface.name}
+
+
+
+
{iface.ip} • {iface.mac}
+
+
+
+
+ {iface.trafic_down_mb} МБ
+
+
+
+ {iface.trafic_up_mb} МБ
+
+
+
+ {iface.speed_mbit} Мбит/c
+
+
+
+
+
+
+ ))}
+
+ >
+ )}
>
);
diff --git a/src/dashboard/SystemMonitor.js b/src/dashboard/SystemMonitor.js
index b0c904f..6989c20 100644
--- a/src/dashboard/SystemMonitor.js
+++ b/src/dashboard/SystemMonitor.js
@@ -1,9 +1,8 @@
import React, { useState } from "react";
import Gauge from "../misc/Gauge";
-import { InformationCircleIcon, ComputerDesktopIcon, CodeBracketIcon, CpuChipIcon, ClockIcon, ChevronDoubleRightIcon } from "@heroicons/react/24/outline";
+import { InformationCircleIcon, ComputerDesktopIcon, CodeBracketIcon, CpuChipIcon, ClockIcon, ChevronDoubleRightIcon, } from "@heroicons/react/24/outline";
import CpuChart from "../misc/CpuChart";
-
const SystemMonitor = () => {
// Состояние для отслеживания выбранной вкладки
const [selectedTab, setSelectedTab] = useState("system");
@@ -37,21 +36,74 @@ const SystemMonitor = () => {
arch: "AMD64",
cpu_load: 20,
mem_load: 80,
- cpu_model:"AMD Ryzen 5 5600x 6-core processor",
+ cpu_model: "AMD Ryzen 5 5600x 6-core processor",
cpu_cores: 6,
cpu_threads: 12,
memory_gb: 32,
cpu_chart:
{
- "10:00":40,
- "11:00":34,
- "12:00":56,
- "13:00":60,
- "14:00":80
+ "1": 20,
+ "2": 14,
+ "3": 6,
+ "4": 5,
+ "5": 10,
+ "6": 10,
+ "7": 0,
+ "8": 0
}
});
+ const [Devices, setDevices] = useState({
+ cpu: [{
+ vendor: "AMD",
+ name: "AMD Ryzen 7 5700X 8-Core Processor",
+ desc: "AMD64 Ryzen Processor",
+ arch: "9",
+ freq: 3400,
+ max_freq: 3400,
+ cores: 8,
+ threads: 16,
+ status: "OK"
+ }],
+ graphics: [{
+ name: "AMD Radeon RX 6700 XT",
+ desc: "AMD Radeon RX 6700 XT",
+ driver: "1.1.4",
+ status: "OK"
+ }],
+ drives: [{
+ name: "INTEL SSD",
+ desc: "INTEL SSD ABCDEFGH123457",
+ serial: "ABCDEFGH123457",
+ interface: "IDE",
+ size_gb: 238,
+ status: "OK"
+ }],
+ motherboard: [{
+ name: "B550M PG Riptide",
+ vendor: "ASRock",
+ model: "B550M PG Riptide",
+ serial: "ABCDEFGH123457"
+ },
+ {
+ name: "BIOS",
+ vendor: "American Megatrends LLC",
+ version: "1.1.5",
+ date: "20240111"
+ }],
+ usb: [{
+ name: "AMD USB 3.10 - 1.10 xxxxx",
+ vendor: "AMD",
+ id: "PCI/VEN_1022&....",
+ status: "OK"
+ }],
+ audio: [{
+ name: "AMD Audio device",
+ vendor: "AMD",
+ status: "OK"
+ }]
+ });
// Функция для обработки клика по вкладке
const handleTabClick = (tabId) => {
@@ -67,8 +119,8 @@ const SystemMonitor = () => {