esLint
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
"use client"; //components/main/uebersicht/NetworkInfo.tsx
|
||||
import React, { useEffect } from "react";
|
||||
import Image from "next/image";
|
||||
import { useSelector, useDispatch } from "react-redux";
|
||||
import { RootState, AppDispatch } from "../../../redux/store";
|
||||
import { getSystemSettingsThunk } from "../../../redux/thunks/getSystemSettingsThunk";
|
||||
import { getOpcUaSettingsThunk } from "../../../redux/thunks/getOpcUaSettingsThunk";
|
||||
import { RootState, AppDispatch } from "@/redux/store";
|
||||
import { getSystemSettingsThunk } from "@/redux/thunks/getSystemSettingsThunk";
|
||||
import { getOpcUaSettingsThunk } from "@/redux/thunks/getOpcUaSettingsThunk";
|
||||
|
||||
const NetworkInfo: React.FC = () => {
|
||||
const dispatch: AppDispatch = useDispatch();
|
||||
@@ -26,10 +27,7 @@ const NetworkInfo: React.FC = () => {
|
||||
const opcUaZustandRaw = useSelector(
|
||||
(state: RootState) => state.opcuaSettingsSlice.opcUaZustand
|
||||
);
|
||||
const opcUaNodesetName =
|
||||
useSelector(
|
||||
(state: RootState) => state.opcuaSettingsSlice.opcUaNodesetName
|
||||
) || "Unbekannt";
|
||||
|
||||
// OPC-UA Zustand in lesbaren Text umwandeln
|
||||
const opcUaZustand =
|
||||
Number(opcUaZustandRaw) === 1
|
||||
@@ -41,47 +39,59 @@ const NetworkInfo: React.FC = () => {
|
||||
return (
|
||||
<div className="w-full flex-direction: row flex">
|
||||
<div className=" flex-grow flex justify-between items-center mt-1 bg-white p-2 rounded-lg shadow-md border border-gray-200 laptop:m-0 laptop:scale-y-75 2xl:scale-y-75">
|
||||
<div className="flex items-center space-x-4">
|
||||
<img
|
||||
src="/images/IP-icon.svg"
|
||||
alt="IP Address"
|
||||
className="w-6 text-littwin-blue"
|
||||
/>
|
||||
<div>
|
||||
<p className="text-xs text-gray-500">IP-Adresse</p>
|
||||
<p className="text-sm font-medium text-gray-700">{ip}</p>
|
||||
</div>
|
||||
<Image
|
||||
src="/images/IP-icon.svg"
|
||||
alt="IP Address"
|
||||
width={24}
|
||||
height={24}
|
||||
className="w-6 text-littwin-blue"
|
||||
priority
|
||||
/>
|
||||
<div>
|
||||
<p className="text-xs text-gray-500">IP-Adresse</p>
|
||||
<p className="text-sm font-medium text-gray-700">{ip}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center space-x-4">
|
||||
<img
|
||||
src="/images/subnet-mask.svg"
|
||||
alt="subnet mask"
|
||||
className="w-6"
|
||||
/>
|
||||
<div>
|
||||
<p className="text-xs text-gray-500">Subnet-Maske</p>
|
||||
<p className="text-sm font-medium text-gray-700">{subnet}</p>
|
||||
</div>
|
||||
<div className="flex items-center space-x-4">
|
||||
<Image
|
||||
src="/images/subnet-mask.svg"
|
||||
alt="subnet mask"
|
||||
width={24}
|
||||
height={24}
|
||||
className="w-6"
|
||||
priority
|
||||
/>
|
||||
<div>
|
||||
<p className="text-xs text-gray-500">Subnet-Maske</p>
|
||||
<p className="text-sm font-medium text-gray-700">{subnet}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center space-x-4">
|
||||
<img src="/images/gateway.svg" alt="gateway" className="w-6" />
|
||||
<div>
|
||||
<p className="text-xs text-gray-500">Gateway</p>
|
||||
<p className="text-sm font-medium text-gray-700">{gateway}</p>
|
||||
</div>
|
||||
<div className="flex items-center space-x-4">
|
||||
<Image
|
||||
src="/images/gateway.svg"
|
||||
alt="gateway"
|
||||
width={24}
|
||||
height={24}
|
||||
className="w-6"
|
||||
priority
|
||||
/>
|
||||
<div>
|
||||
<p className="text-xs text-gray-500">Gateway</p>
|
||||
<p className="text-sm font-medium text-gray-700">{gateway}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center space-x-4">
|
||||
<div className="text-xs font-bold text-littwin-blue">OPC-UA</div>
|
||||
<div>
|
||||
<p className="text-xs text-gray-500">Status</p>
|
||||
<p className="text-sm font-medium text-gray-700">{opcUaZustand}</p>
|
||||
</div>
|
||||
<div className="flex items-center space-x-4">
|
||||
<div className="text-xs font-bold text-littwin-blue">OPC-UA</div>
|
||||
<div>
|
||||
<p className="text-xs text-gray-500">Status</p>
|
||||
<p className="text-sm font-medium text-gray-700">{opcUaZustand}</p>
|
||||
</div>
|
||||
{/* OPC UA Nodeset Name */}
|
||||
{/*
|
||||
</div>
|
||||
{/* OPC UA Nodeset Name */}
|
||||
{/*
|
||||
<div className="flex items-center space-x-4">
|
||||
<div>
|
||||
<p className="text-xs text-gray-500">Nodeset Name</p>
|
||||
@@ -91,7 +101,6 @@ const NetworkInfo: React.FC = () => {
|
||||
</div>
|
||||
</div>
|
||||
*/}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user