fix: Schleifenwiderstand (TDR) Messung starten Button auf der Produktion
This commit is contained in:
@@ -6,6 +6,6 @@ NEXT_PUBLIC_USE_MOCK_BACKEND_LOOP_START=false
|
|||||||
NEXT_PUBLIC_EXPORT_STATIC=false
|
NEXT_PUBLIC_EXPORT_STATIC=false
|
||||||
NEXT_PUBLIC_USE_CGI=false
|
NEXT_PUBLIC_USE_CGI=false
|
||||||
# App-Versionsnummer
|
# 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)
|
NEXT_PUBLIC_CPL_MODE=json # json (Entwicklungsumgebung) oder jsSimulatedProd (CPL ->CGI-Interface-Simulator) oder production (CPL-> CGI-Interface Platzhalter)
|
||||||
|
|
||||||
|
|||||||
@@ -5,5 +5,5 @@ NEXT_PUBLIC_CPL_API_PATH=/CPL
|
|||||||
NEXT_PUBLIC_EXPORT_STATIC=true
|
NEXT_PUBLIC_EXPORT_STATIC=true
|
||||||
NEXT_PUBLIC_USE_CGI=true
|
NEXT_PUBLIC_USE_CGI=true
|
||||||
# App-Versionsnummer
|
# App-Versionsnummer
|
||||||
NEXT_PUBLIC_APP_VERSION=1.6.658
|
NEXT_PUBLIC_APP_VERSION=1.6.659
|
||||||
NEXT_PUBLIC_CPL_MODE=production
|
NEXT_PUBLIC_CPL_MODE=production
|
||||||
@@ -1,3 +1,8 @@
|
|||||||
|
## [1.6.659] – 2025-07-31
|
||||||
|
|
||||||
|
- feat: Display und Chart für KÜs
|
||||||
|
|
||||||
|
---
|
||||||
## [1.6.658] – 2025-07-31
|
## [1.6.658] – 2025-07-31
|
||||||
|
|
||||||
- feat; in KÜ Chart RSL und ISO start button
|
- feat; in KÜ Chart RSL und ISO start button
|
||||||
|
|||||||
@@ -7,12 +7,10 @@ import { RootState } from "@/redux/store";
|
|||||||
import {
|
import {
|
||||||
setLoopMeasurementCurveChartData,
|
setLoopMeasurementCurveChartData,
|
||||||
setSelectedMode,
|
setSelectedMode,
|
||||||
setSelectedSlotType,
|
|
||||||
setChartOpen,
|
setChartOpen,
|
||||||
setLoading,
|
setLoading,
|
||||||
} from "@/redux/slices/kabelueberwachungChartSlice";
|
} from "@/redux/slices/kabelueberwachungChartSlice";
|
||||||
import { setBrushRange } from "@/redux/slices/brushSlice";
|
import { setBrushRange } from "@/redux/slices/brushSlice";
|
||||||
import { setChartTitle } from "@/redux/slices/loopChartTypeSlice";
|
|
||||||
import { Listbox } from "@headlessui/react";
|
import { Listbox } from "@headlessui/react";
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------------useLoopChartLoader
|
//-----------------------------------------------------------------------------------useLoopChartLoader
|
||||||
@@ -130,6 +128,32 @@ const LoopChartActionBar: React.FC = () => {
|
|||||||
return `${year};${month};${day}`;
|
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 handleFetchData = async () => {
|
||||||
const type = selectedSlotType === "schleifenwiderstand" ? 4 : 3;
|
const type = selectedSlotType === "schleifenwiderstand" ? 4 : 3;
|
||||||
|
|
||||||
@@ -260,7 +284,7 @@ const LoopChartActionBar: React.FC = () => {
|
|||||||
|
|
||||||
{/* Schleife starten button*/}
|
{/* Schleife starten button*/}
|
||||||
<button
|
<button
|
||||||
onClick={handleFetchData}
|
onClick={handleStartRSL}
|
||||||
className="px-4 py-1 bg-littwin-blue text-white rounded text-sm whitespace-nowrap"
|
className="px-4 py-1 bg-littwin-blue text-white rounded text-sm whitespace-nowrap"
|
||||||
disabled={isLoading}
|
disabled={isLoading}
|
||||||
>
|
>
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.658",
|
"version": "1.6.659",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.658",
|
"version": "1.6.659",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fontsource/roboto": "^5.1.0",
|
"@fontsource/roboto": "^5.1.0",
|
||||||
"@headlessui/react": "^2.2.4",
|
"@headlessui/react": "^2.2.4",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.658",
|
"version": "1.6.659",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
|
|||||||
Reference in New Issue
Block a user