This commit is contained in:
ISA
2025-07-07 10:36:40 +02:00
parent ebe72c3ab0
commit 10a9167a1f
6 changed files with 38 additions and 7 deletions

View File

@@ -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)

View File

@@ -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

View File

@@ -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

View File

@@ -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<AppDispatch>();
@@ -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<string | null>(null);
const [isModalOpen, setIsModalOpen] = useState(false);
@@ -62,8 +64,26 @@ const SystemPage = () => {
<h1 className="text-xl font-bold mb-4">
System Spannungen & Temperaturen
</h1>
<SystemOverviewGrid voltages={voltages} onOpenDetail={handleOpenDetail} />
<SystemCharts history={history} zeitraum={zeitraum} />
{isLoading ? (
<div className="flex justify-center items-center h-[400px]">
<div className="text-center">
<ClipLoader size={50} color="#3B82F6" />
<p className="mt-4 text-gray-500">
Lade Systemdaten bitte warten
</p>
</div>
</div>
) : (
<>
<SystemOverviewGrid
voltages={voltages}
onOpenDetail={handleOpenDetail}
/>
<SystemCharts history={history} zeitraum={zeitraum} />
</>
)}
<DetailModal
isOpen={isModalOpen}
selectedKey={selectedKey}

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "cpl-v4",
"version": "1.6.539",
"version": "1.6.540",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "cpl-v4",
"version": "1.6.539",
"version": "1.6.540",
"dependencies": {
"@fontsource/roboto": "^5.1.0",
"@iconify-icons/ri": "^1.2.10",

View File

@@ -1,6 +1,6 @@
{
"name": "cpl-v4",
"version": "1.6.539",
"version": "1.6.540",
"private": true,
"scripts": {
"dev": "next dev",