durch loadWindowVariables setinterval in _app.js aktualisiert sich der Browser
This commit is contained in:
@@ -9,48 +9,10 @@ import "../styles/globals.css";
|
||||
function MyApp({ Component, pageProps }) {
|
||||
useEffect(() => {
|
||||
if (typeof window !== "undefined") {
|
||||
loadWindowVariables()
|
||||
.then(() => {
|
||||
// Das Netzteil PST-M "-96V" hat eine Störung oder ist ausgefallen
|
||||
console.log("Window variables loaded successfully.");
|
||||
console.log("Variablen von CPL in Window Objekt speichern:", {
|
||||
deviceName: window.deviceName,
|
||||
ip: window.ip,
|
||||
mac1: window.mac1,
|
||||
mac2: window.mac2,
|
||||
subnet: window.subnet,
|
||||
gateway: window.gateway,
|
||||
datetime: window.datetime,
|
||||
kueOnline: window.kueOnline,
|
||||
kuePSTmMinus96V: window.kuePSTmMinus96V,
|
||||
kueIso: window.kueIso,
|
||||
kueAlarm1: window.kueAlarm1,
|
||||
kueAlarm2: window.kueAlarm2,
|
||||
kueRes: window.kueRes,
|
||||
kueCableBreak: window.kueCableBreak,
|
||||
kueGroundFault: window.kueGroundFault,
|
||||
kueLimit1: window.kueLimit1,
|
||||
kueLimit2Low: window.kueLimit2Low,
|
||||
kueDelay1: window.kueDelay1,
|
||||
kueLoopInterval: window.kueLoopInterval,
|
||||
kueID: window.kueID,
|
||||
kueVersion: window.kueVersion,
|
||||
kueOverflow: window.kueOverflow,
|
||||
kueResidence: window.kueResidence,
|
||||
tdrAtten: window.tdrAtten,
|
||||
tdrPulse: window.tdrPulse,
|
||||
tdrSpeed: window.tdrSpeed,
|
||||
tdrAmp: window.tdrAmp,
|
||||
tdrTrigger: window.tdrTrigger,
|
||||
tdrLocation: window.tdrLocation,
|
||||
tdrActive: window.tdrActive,
|
||||
tdrLast: window.tdrLast,
|
||||
});
|
||||
localStorage.setItem("variablesLoaded", "true");
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("Error loading window variables:", error);
|
||||
});
|
||||
setInterval(() => {
|
||||
loadWindowVariables();
|
||||
}, 5000);
|
||||
loadWindowVariables();
|
||||
}
|
||||
}, []);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//Modul vorhanden 1 = vorhanden, 0 = nicht vorhanden
|
||||
var kueOnline = [
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1,
|
||||
];
|
||||
//---------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user