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:
@@ -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 && (
|
||||
|
||||
Reference in New Issue
Block a user