From 7d6263b6fb18d0d4d18efa4b60a380a22044a79c Mon Sep 17 00:00:00 2001 From: ISA Date: Fri, 15 Aug 2025 13:23:25 +0200 Subject: [PATCH] =?UTF-8?q?Das=20automatische=20Nachladen=20im=20DetailMod?= =?UTF-8?q?al.tsx=20passiert=20jetzt=20nur=20noch=20alle=204=20Sekunden=20?= =?UTF-8?q?und=20maximal=202=20Mal.=20Damit=20wird=20dein=20Embedded-Syste?= =?UTF-8?q?m=20geschont=20und=20es=20gibt=20keine=20=C3=9Cberlastung=20dur?= =?UTF-8?q?ch=20zu=20viele=20Anfragen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- .env.production | 2 +- CHANGELOG.md | 10 ++++++++++ components/main/system/DetailModal.tsx | 14 ++++++++++---- package-lock.json | 4 ++-- package.json | 2 +- 6 files changed, 25 insertions(+), 9 deletions(-) diff --git a/.env.development b/.env.development index 993fe68..3cecc55 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.730 +NEXT_PUBLIC_APP_VERSION=1.6.731 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 0b59695..eea7f30 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.730 +NEXT_PUBLIC_APP_VERSION=1.6.731 NEXT_PUBLIC_CPL_MODE=production \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ad4bd7..c36762c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## [1.6.731] – 2025-08-15 + +- Fix: Messkurven-Modal (ISO/RSL) lädt Kurve automatisch, setzt Dropdown & DateRangePicker korrekt zurück + +- Dropdown für Messkurven (ISO/RSL) wird beim Öffnen auf 'Alle Messwerte' (DIA0) gesetzt +- Messkurve wird beim Öffnen des Modals automatisch geladen +- Beim Schließen werden vonDatum, bisDatum, Dropdown und DateRangePicker zurückgesetzt +- Gleiches Verhalten für ISO- und RSL/Loop-Modal + +--- ## [1.6.730] – 2025-08-15 - Fix: Messkurven-Modal (ISO/RSL) lädt Kurve automatisch, setzt Dropdown & DateRangePicker korrekt zurück diff --git a/components/main/system/DetailModal.tsx b/components/main/system/DetailModal.tsx index 75bac0f..f790479 100644 --- a/components/main/system/DetailModal.tsx +++ b/components/main/system/DetailModal.tsx @@ -233,13 +233,19 @@ export const DetailModal = ({ } }, [isOpen, chartData.datasets]); - // Automatisches "Daten laden" alle 2 Sekunden wenn keine Daten vorhanden + // Automatisches "Daten laden" alle 4 Sekunden, maximal 2 Versuche useEffect(() => { if (isOpen && (!chartData.datasets || chartData.datasets.length === 0)) { + let attempts = 0; const interval = setInterval(() => { - console.log("Auto-clicking 'Daten laden' button..."); - handleFetchData(); // Automatisch Daten laden - }, 2000); + if (attempts < 2) { + console.log("Auto-clicking 'Daten laden' button..."); + handleFetchData(); + attempts++; + } else { + clearInterval(interval); + } + }, 4000); return () => clearInterval(interval); } diff --git a/package-lock.json b/package-lock.json index cad81b2..d82f40d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cpl-v4", - "version": "1.6.730", + "version": "1.6.731", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cpl-v4", - "version": "1.6.730", + "version": "1.6.731", "dependencies": { "@fontsource/roboto": "^5.1.0", "@headlessui/react": "^2.2.4", diff --git a/package.json b/package.json index cc2c62c..e6d3cca 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cpl-v4", - "version": "1.6.730", + "version": "1.6.731", "private": true, "scripts": { "dev": "next dev",