Bei den Kabelüberwachung kann neben den Button “Firmware Update” noch zwei Button “Konfiguration sichern” und “Konfiguration zurücksichern” im Admin-Modus hinzukommen.

Store: Befehl KSB%i=%i z.B. KSB03=1 sichert die Konfiguration der KÜ 4

Restore: Befehl KSR%i=%i z.B. KSR03=1 sichert die Konfiguration der KÜ 4 zurück
This commit is contained in:
ISA
2025-07-08 13:55:55 +02:00
parent b091a8d82a
commit 93c3bc612d
6 changed files with 47 additions and 8 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.563
NEXT_PUBLIC_APP_VERSION=1.6.564
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.563
NEXT_PUBLIC_APP_VERSION=1.6.564
NEXT_PUBLIC_CPL_MODE=production

View File

@@ -1,3 +1,8 @@
## [1.6.564] 2025-07-08
- refactor: extract Kabelueberwachung logic into KabelueberwachungView for better structure
---
## [1.6.563] 2025-07-08
- refactor: move analog inputs logic to AnalogInputsView component

View File

@@ -2,9 +2,9 @@
// components/main/kabelueberwachung/kue705FO/modals/KueEinstellung.tsx
import { useState } from "react";
import { useDispatch, useSelector } from "react-redux";
import type { RootState, AppDispatch } from "../../../../../redux/store";
import type { RootState, AppDispatch } from "@/redux/store";
import handleSave from "../handlers/handleSave";
import handleDisplayEinschalten from "../handlers/handleDisplayEinschalten";
import handleDisplayEinschalten from "@/components/main/kabelueberwachung/kue705FO/handlers/handleDisplayEinschalten";
import firmwareUpdate from "../handlers/firmwareUpdate";
import ProgressModal from "@/components/main/settingsPageComponents/modals/ProgressModal";
import { toast } from "react-toastify";
@@ -286,7 +286,7 @@ export default function KueEinstellung({
</div>
</div>
</div>
<div className="flex justify-end gap-2 p-0 rounded">
<div className="flex flex-wrap justify-end gap-2 p-0 rounded">
{isAdminLoggedIn && (
<>
<button
@@ -295,6 +295,40 @@ export default function KueEinstellung({
>
Firmware Update
</button>
{/* Konfiguration sichern */}
<button
onClick={async () => {
try {
await fetch(`/CPL?KSB${slot.toString().padStart(2, "0")}=1`);
toast.success("✅ Konfiguration gesichert.");
} catch (err) {
console.error("KSB Fehler", err);
toast.error("❌ Fehler beim Sichern der Konfiguration");
}
}}
className="bg-littwin-blue text-white px-4 py-2 rounded flex items-center"
>
Konfig. sichern
</button>
{/* Konfiguration zurücksichern */}
<button
onClick={async () => {
try {
await fetch(`/CPL?KSR${slot.toString().padStart(2, "0")}=1`);
toast.success("✅ Konfiguration wiederhergestellt.");
} catch (err) {
console.error("KSR Fehler", err);
toast.error(
"❌ Fehler beim Wiederherstellen der Konfiguration"
);
}
}}
className="bg-littwin-blue text-white px-4 py-2 rounded flex items-center"
>
Konfig. zurücksichern
</button>
</>
)}
{showConfirmModal && (

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "cpl-v4",
"version": "1.6.563",
"version": "1.6.564",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "cpl-v4",
"version": "1.6.563",
"version": "1.6.564",
"dependencies": {
"@fontsource/roboto": "^5.1.0",
"@headlessui/react": "^2.2.4",

View File

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