From 86b35e99252e08937c30dd3c3441a6aa4107ca91 Mon Sep 17 00:00:00 2001 From: ISA Date: Thu, 31 Jul 2025 09:54:22 +0200 Subject: [PATCH] fix: Schleifenwiderstand (TDR) Messung starten Button auf der Produktion --- .env.development | 2 +- .env.production | 2 +- CHANGELOG.md | 5 ++++ .../LoopChartActionBar.tsx | 30 +++++++++++++++++-- package-lock.json | 4 +-- package.json | 2 +- 6 files changed, 37 insertions(+), 8 deletions(-) diff --git a/.env.development b/.env.development index 0d2cf46..676983f 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.658 +NEXT_PUBLIC_APP_VERSION=1.6.659 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 ccd910d..5bc7909 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.658 +NEXT_PUBLIC_APP_VERSION=1.6.659 NEXT_PUBLIC_CPL_MODE=production \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c0aebc..7de33b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## [1.6.659] – 2025-07-31 + +- feat: Display und Chart für KÜs + +--- ## [1.6.658] – 2025-07-31 - feat; in KÜ Chart RSL und ISO start button diff --git a/components/main/kabelueberwachung/kue705FO/Charts/LoopMeasurementChart/LoopChartActionBar.tsx b/components/main/kabelueberwachung/kue705FO/Charts/LoopMeasurementChart/LoopChartActionBar.tsx index e253fe5..58c1be4 100644 --- a/components/main/kabelueberwachung/kue705FO/Charts/LoopMeasurementChart/LoopChartActionBar.tsx +++ b/components/main/kabelueberwachung/kue705FO/Charts/LoopMeasurementChart/LoopChartActionBar.tsx @@ -7,12 +7,10 @@ import { RootState } from "@/redux/store"; import { setLoopMeasurementCurveChartData, setSelectedMode, - setSelectedSlotType, setChartOpen, setLoading, } from "@/redux/slices/kabelueberwachungChartSlice"; import { setBrushRange } from "@/redux/slices/brushSlice"; -import { setChartTitle } from "@/redux/slices/loopChartTypeSlice"; import { Listbox } from "@headlessui/react"; //-----------------------------------------------------------------------------------useLoopChartLoader @@ -130,6 +128,32 @@ const LoopChartActionBar: React.FC = () => { return `${year};${month};${day}`; }; + const handleStartRSL = async () => { + if (slotNumber === null) { + alert("⚠️ Bitte zuerst einen KÜ auswählen!"); + return; + } + + const cgiUrl = `${window.location.origin}/CPL?kabelueberwachung.html&KS_${slotNumber}=1`; + + try { + console.log("🚀 Starte RSL Messung für Slot:", slotNumber); + console.log("📡 CGI URL:", cgiUrl); + + const response = await fetch(cgiUrl); + + if (!response.ok) { + throw new Error(`CGI-Fehler: ${response.status}`); + } + + console.log("✅ RSL Messung gestartet für Slot", slotNumber); + alert(`✅ RSL Messung für Slot ${slotNumber + 1} gestartet`); + } catch (err) { + console.error("❌ Fehler beim Starten der RSL Messung:", err); + alert("❌ Fehler beim Starten der RSL Messung."); + } + }; + const handleFetchData = async () => { const type = selectedSlotType === "schleifenwiderstand" ? 4 : 3; @@ -260,7 +284,7 @@ const LoopChartActionBar: React.FC = () => { {/* Schleife starten button*/}