diff --git a/.env.development b/.env.development index 5ea6aff..3bd0317 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.510 +NEXT_PUBLIC_APP_VERSION=1.6.511 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 276ffe3..3924c8f 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.510 +NEXT_PUBLIC_APP_VERSION=1.6.511 NEXT_PUBLIC_CPL_MODE=production \ No newline at end of file diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..c0c80ba --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +engine-strict=false diff --git a/CHANGELOG.md b/CHANGELOG.md index 073597a..413111f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## [1.6.511] – 2025-07-01 + +- feat: alle KÜs Firmware update + +--- ## [1.6.510] – 2025-06-30 - feat: handleKueFirmwareUpdate diff --git a/components/main/kabelueberwachung/kue705FO/handlers/firmwareUpdate.ts b/components/main/kabelueberwachung/kue705FO/handlers/firmwareUpdate.ts index fc76215..b922304 100644 --- a/components/main/kabelueberwachung/kue705FO/handlers/firmwareUpdate.ts +++ b/components/main/kabelueberwachung/kue705FO/handlers/firmwareUpdate.ts @@ -1,16 +1,24 @@ +// /komponents/main/kabelueberwachung/kue705FO/handlers/firmwareUpdate.ts const firmwareUpdate = (slot: number) => { - const url = `${window.location.origin}/CPL?/kabelueberwachung.html&KSU${slot}=1`; + const isDev = + typeof window !== "undefined" && window.location.hostname === "localhost"; + const url = isDev + ? `${window.location.origin}/api/cpl/kueSingleModuleUpdateMock?slot=${ + slot + 1 + }` + : `${window.location.origin}/CPL?/kabelueberwachung.html&KSU${slot}=1`; + fetch(url, { method: "GET" }) - .then((response) => { - if (response.ok) { - alert(`Update an ${slot + 1} erfolgreich gestartet!`); - } else { - alert("Fehler beim Update!"); - } + .then((response) => response.json()) + .then((data) => { + alert( + data.message || `Update an Slot ${slot + 1} erfolgreich gestartet!` + ); }) .catch((error) => { console.error("Fehler:", error); alert("Fehler beim Update!"); }); }; + export default firmwareUpdate; diff --git a/components/main/kabelueberwachung/kue705FO/modals/KueEinstellung.tsx b/components/main/kabelueberwachung/kue705FO/modals/KueEinstellung.tsx index e237b91..b5a03f2 100644 --- a/components/main/kabelueberwachung/kue705FO/modals/KueEinstellung.tsx +++ b/components/main/kabelueberwachung/kue705FO/modals/KueEinstellung.tsx @@ -246,7 +246,15 @@ export default function KueEinstellung({
{isAdminLoggedIn && ( - {isAdmin && ( + {isAdminLoggedIn && (