From 10a9167a1f0ab09a4579ff163efd699896800b10 Mon Sep 17 00:00:00 2001 From: ISA Date: Mon, 7 Jul 2025 10:36:40 +0200 Subject: [PATCH] system --- .env.development | 2 +- .env.production | 2 +- CHANGELOG.md | 11 +++++++++++ components/main/system/SystemView.tsx | 24 ++++++++++++++++++++++-- package-lock.json | 4 ++-- package.json | 2 +- 6 files changed, 38 insertions(+), 7 deletions(-) diff --git a/.env.development b/.env.development index 5b87f7e..2d18ae7 100644 --- a/.env.development +++ b/.env.development @@ -6,6 +6,6 @@ NEXT_PUBLIC_USE_MOCK_BACKEND_LOOP_START=false NEXT_PUBLIC_EXPORT_STATIC=false NEXT_PUBLIC_USE_CGI=false # App-Versionsnummer -NEXT_PUBLIC_APP_VERSION=1.6.539 +NEXT_PUBLIC_APP_VERSION=1.6.540 NEXT_PUBLIC_CPL_MODE=json # json (Entwicklungsumgebung) oder jsSimulatedProd (CPL ->CGI-Interface-Simulator) oder production (CPL-> CGI-Interface Platzhalter) diff --git a/.env.production b/.env.production index 4713886..dac7517 100644 --- a/.env.production +++ b/.env.production @@ -5,5 +5,5 @@ NEXT_PUBLIC_CPL_API_PATH=/CPL NEXT_PUBLIC_EXPORT_STATIC=true NEXT_PUBLIC_USE_CGI=true # App-Versionsnummer -NEXT_PUBLIC_APP_VERSION=1.6.539 +NEXT_PUBLIC_APP_VERSION=1.6.540 NEXT_PUBLIC_CPL_MODE=production \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index ead0de8..c2bce20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +## [1.6.540] – 2025-07-07 + +- refactor: Seitenkomponenten ausgelagert in View-Komponenten + +- meldungen.tsx → MeldungenView.tsx erstellt + → beinhaltet Filterleiste, Tabellenansicht und Datenabruf +- system.tsx → SystemView.tsx ausgelagert + → verbessert Lesbarkeit und Trennung von Routing und Inhalt +- View-Suffix verwendet für klare Struktur (Page = Entry, View = Inhalt) + +--- ## [1.6.539] – 2025-07-07 - feat: fetch-Services für Spannung und Temperatur für Dev- und Prod-Modus angepasst diff --git a/components/main/system/SystemView.tsx b/components/main/system/SystemView.tsx index 3623871..378db79 100644 --- a/components/main/system/SystemView.tsx +++ b/components/main/system/SystemView.tsx @@ -14,6 +14,7 @@ import { getSystemspannung15VminusThunk } from "@/redux/thunks/getSystemspannung import { getSystemspannung98VminusThunk } from "@/redux/thunks/getSystemspannung98VminusThunk"; import { getTemperaturAdWandlerThunk } from "@/redux/thunks/getTemperaturAdWandlerThunk"; import { getTemperaturProzessorThunk } from "@/redux/thunks/getTemperaturProzessorThunk"; +import { ClipLoader } from "react-spinners"; const SystemPage = () => { const dispatch = useDispatch(); @@ -24,6 +25,7 @@ const SystemPage = () => { const history = useSelector( (state: RootState) => state.systemVoltTemp.history ) as HistoryEntry[]; + const isLoading = !history.length || Object.keys(voltages).length === 0; const [selectedKey, setSelectedKey] = useState(null); const [isModalOpen, setIsModalOpen] = useState(false); @@ -62,8 +64,26 @@ const SystemPage = () => {

System Spannungen & Temperaturen

- - + + {isLoading ? ( +
+
+ +

+ Lade Systemdaten … bitte warten +

+
+
+ ) : ( + <> + + + + )} +