dashboard.tsx gereinegt
This commit is contained in:
@@ -5,34 +5,12 @@ import "tailwindcss/tailwind.css";
|
||||
import "@fontsource/roboto";
|
||||
import "bootstrap-icons/font/bootstrap-icons.css";
|
||||
import { Icon } from "@iconify/react";
|
||||
import { useDispatch } from "react-redux";
|
||||
import {
|
||||
setOpcUaZustand,
|
||||
setOpcUaActiveClientCount,
|
||||
setOpcUaNodesetName,
|
||||
} from "../redux/slices/variablesSlice";
|
||||
import Last20MessagesTable from "../components/main/uebersicht/Last20MessagesTable";
|
||||
import NetworkInfo from "../components/main/uebersicht/NetworkInfo";
|
||||
import VersionInfo from "../components/main/uebersicht/VersionInfo";
|
||||
import Baugruppentraeger from "../components/main/uebersicht/Baugruppentraeger";
|
||||
|
||||
const Dashboard: React.FC = () => {
|
||||
const router = useRouter();
|
||||
const dispatch = useDispatch();
|
||||
|
||||
// Setzt OPC-UA-Werte beim Laden der Seite
|
||||
useEffect(() => {
|
||||
if (typeof window !== "undefined") {
|
||||
dispatch(setOpcUaZustand(window.win_opcUaZustand || "Unbekannt"));
|
||||
dispatch(
|
||||
setOpcUaActiveClientCount(
|
||||
Number(window.win_opcUaActiveClientCount) || 0
|
||||
)
|
||||
);
|
||||
dispatch(setOpcUaNodesetName(window.win_opcUaNodesetName || "Unbekannt"));
|
||||
}
|
||||
}, [dispatch]);
|
||||
|
||||
return (
|
||||
<div className="flex flex-col gap-3 p-4 h-[calc(100vh-13vh-8vh)] laptop:h-[calc(100vh-10vh-5vh)] xl:h-[calc(100vh-10vh-6vh)] laptop:gap-0">
|
||||
{/* Header */}
|
||||
|
||||
Reference in New Issue
Block a user