diff --git a/package-lock.json b/package-lock.json index 37046ab..debea4c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,9 +35,10 @@ "devDependencies": { "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.2.0", + "@types/bcryptjs": "^2.4.6", "@types/cypress": "^1.1.6", "@types/jest": "^29.5.14", - "@types/node": "22.10.10", + "@types/node": "^22.10.10", "@types/react": "^18.3.18", "@types/react-dom": "^18.3.5", "@types/react-modal": "^3.16.3", @@ -1595,6 +1596,12 @@ "@babel/types": "^7.20.7" } }, + "node_modules/@types/bcryptjs": { + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/@types/bcryptjs/-/bcryptjs-2.4.6.tgz", + "integrity": "sha512-9xlo6R2qDs5uixm0bcIqCeMCE6HiQsIyel9KQySStiyqNl2tnj2mP3DX1Nf56MD6KMenNNlBBsy3LJ7gUEQPXQ==", + "dev": true + }, "node_modules/@types/cypress": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/@types/cypress/-/cypress-1.1.6.tgz", diff --git a/package.json b/package.json index 8292de9..04fa320 100644 --- a/package.json +++ b/package.json @@ -39,9 +39,10 @@ "devDependencies": { "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.2.0", + "@types/bcryptjs": "^2.4.6", "@types/cypress": "^1.1.6", "@types/jest": "^29.5.14", - "@types/node": "22.10.10", + "@types/node": "^22.10.10", "@types/react": "^18.3.18", "@types/react-dom": "^18.3.5", "@types/react-modal": "^3.16.3", diff --git a/pages/dashboard.tsx b/pages/dashboard.tsx index 3bfdece..539fd2e 100644 --- a/pages/dashboard.tsx +++ b/pages/dashboard.tsx @@ -8,24 +8,39 @@ import CPLStatus from "../components/modulesStatus/CPLStatus"; import KabelModulStatus from "../components/modulesStatus/KabelModulStatus"; import { Icon } from "@iconify/react"; import { useSelector } from "react-redux"; +import { RootState } from "../store/store"; function Dashboard() { const router = useRouter(); // Redux-Variablen abrufen const rawLast20Messages = useSelector( - (state) => state.variables.last20Messages + (state: RootState) => state.variables.last20Messages + ); + const ip = useSelector((state: RootState) => state.variables.ip); + const subnet = useSelector((state: RootState) => state.variables.subnet); + const gateway = useSelector((state: RootState) => state.variables.gateway); + const appVersion = useSelector( + (state: RootState) => state.variables.appVersion + ); + const kueCableBreak = useSelector( + (state: RootState) => state.variables.kueCableBreak + ); + const kueOnline = useSelector( + (state: RootState) => state.variables.kueOnline + ); + const kueVersion = useSelector( + (state: RootState) => state.variables.kueVersion + ); + const kueAlarm1 = useSelector( + (state: RootState) => state.variables.kueAlarm1 + ); + const kueAlarm2 = useSelector( + (state: RootState) => state.variables.kueAlarm2 + ); + const kueGroundFault = useSelector( + (state: RootState) => state.variables.kueGroundFault ); - const ip = useSelector((state) => state.variables.ip); - const subnet = useSelector((state) => state.variables.subnet); - const gateway = useSelector((state) => state.variables.gateway); - const appVersion = useSelector((state) => state.variables.appVersion); - const kueCableBreak = useSelector((state) => state.variables.kueCableBreak); - const kueOnline = useSelector((state) => state.variables.kueOnline); - const kueVersion = useSelector((state) => state.variables.kueVersion); - const kueAlarm1 = useSelector((state) => state.variables.kueAlarm1); - const kueAlarm2 = useSelector((state) => state.variables.kueAlarm2); - const kueGroundFault = useSelector((state) => state.variables.kueGroundFault); // Hilfsfunktion zum Parsen der Nachrichten const parseMessages = (messages) => { @@ -54,7 +69,7 @@ function Dashboard() { }; const renderBaugruppentraeger = () => { - const baugruppen = []; + const baugruppen: JSX.Element[] = []; const numBaugruppen = Math.ceil(kueOnline.length / 8); for (let i = 0; i < numBaugruppen; i++) { @@ -157,7 +172,7 @@ function Dashboard() { )) ) : (
{ip}
+OPCUA Status
+{ip}
+