diff --git a/.env.development b/.env.development new file mode 100644 index 0000000..9f22047 --- /dev/null +++ b/.env.development @@ -0,0 +1 @@ +NEXT_PUBLIC_NODE_ENV=development \ No newline at end of file diff --git a/.env.local b/.env.local deleted file mode 100644 index 8d9ec74..0000000 --- a/.env.local +++ /dev/null @@ -1 +0,0 @@ -NEXT_PUBLIC_NODE_ENV=development diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..146afc7 --- /dev/null +++ b/.env.production @@ -0,0 +1 @@ +NEXT_PUBLIC_NODE_ENV=production \ No newline at end of file diff --git a/app/dashboard/page.jsx b/app/dashboard/page.jsx index f8dbce9..8394595 100644 --- a/app/dashboard/page.jsx +++ b/app/dashboard/page.jsx @@ -100,7 +100,7 @@ function Dashboard() { useEffect(() => { loadWindowVariables() .then(() => { - console.log("kueOnline Data: ", window.kueOnline); // Debug: Ausgabe von kueOnline + // console.log("kueOnline Data: ", window.kueOnline); // Debug: Ausgabe von kueOnline if (window.kueOnline) { if (Array.isArray(window.kueOnline)) { @@ -126,11 +126,11 @@ function Dashboard() { loadWindowVariables() .then(() => { // Debug-Ausgaben für kueAlarm1 und kueAlarm2 - console.log("kueAlarm1 Data: ", window.kueAlarm1); - console.log("kueAlarm2 Data: ", window.kueAlarm2); + //console.log("kueAlarm1 Data: ", window.kueAlarm1); + //console.log("kueAlarm2 Data: ", window.kueAlarm2); if (window.kueAlarm1 && Array.isArray(window.kueAlarm1)) { - console.log("kueAlarm1 ist ein Array:", window.kueAlarm1); + //console.log("kueAlarm1 ist ein Array:", window.kueAlarm1); } else { console.error("kueAlarm1 ist kein Array oder nicht definiert."); setError( @@ -139,7 +139,7 @@ function Dashboard() { } if (window.kueAlarm2 && Array.isArray(window.kueAlarm2)) { - console.log("kueAlarm2 ist ein Array:", window.kueAlarm2); + //console.log("kueAlarm2 ist ein Array:", window.kueAlarm2); } else { console.error("kueAlarm2 ist kein Array oder nicht definiert."); setError( diff --git a/app/kabelueberwachung/page.jsx b/app/kabelueberwachung/page.jsx index 1ba9784..ac99828 100644 --- a/app/kabelueberwachung/page.jsx +++ b/app/kabelueberwachung/page.jsx @@ -55,10 +55,10 @@ function Kabelueberwachung() { rack4: allModules.slice(24, 32), }; // Log the racks in the console for debugging - console.log("Rack 1:", racks.rack1); + /* console.log("Rack 1:", racks.rack1); console.log("Rack 2:", racks.rack2); console.log("Rack 3:", racks.rack3); - console.log("Rack 4:", racks.rack4); + console.log("Rack 4:", racks.rack4); */ // Function to handle rack change const changeRack = (rack) => { @@ -149,10 +149,9 @@ function Kabelueberwachung() { alarmStatus={alarmStatus} // Pass the calculated alarm status slotIndex={slotIndex} /> - {console.log( - `Module Data (Rack ${activeRack}, Slot ${index + 1}):`, - slot - )} + {/* + console.log(`Module Data (Rack ${activeRack}, Slot ${index + 1}):`,slot); + */} ); })} diff --git a/app/layout.js b/app/layout.js index b45ff9b..7dc3f8f 100644 --- a/app/layout.js +++ b/app/layout.js @@ -11,6 +11,9 @@ export default function RootLayout({ children }) { {/* Hier können Meta-Tags oder Links für CSS hinzugefügt werden */} + + + Littwin Systemtechnik GmbH & Co. KG {/* Hier das Layout mit Header, Navigation und Footer */} diff --git a/components/Header.jsx b/components/Header.jsx index 560cc38..a07af0f 100644 --- a/components/Header.jsx +++ b/components/Header.jsx @@ -34,9 +34,6 @@ function Header() { loadWindowVariables() .then(() => { - // Überprüfe, ob die erwarteten Variablen verfügbar sind - console.log("Window-Variablen geladen:", window); - if (window.ip) { setStationsname(window.deviceName || "Unbekannt"); setCplStatus(window.hardware_version || "Unbekannt"); @@ -49,6 +46,56 @@ function Header() { }); } }, [isClient]); + useEffect(() => { + if (typeof window !== "undefined") { + console.log("Systemvariablen geladen:", { + // last20Messages.acp + last20Messages: window.last20Messages, + // System.acp Variablen + deviceName: window.deviceName, + mac1: window.mac1, + mac2: window.mac2, + ip: window.ip, + subnet: window.subnet, + gateway: window.gateway, + datetime: window.datetime, + // de.acp Variablen + de: window.de, + counter: window.counter, + flutter: window.flutter, + // kueConfig.acp Variablen + kueOnline: window.kueOnline, + kueID: window.kueID, + //kueIso: window.kueIso, von SERVICE/kueConfig.acp also von window.kueIso + // kuedetail.acp Variablen + kueValid: window.kueValid, + kueAlarm1: window.kueAlarm1, + kueAlarm2: window.kueAlarm2, + kueRes: window.kueRes, + kueCableBreak: window.kueCableBreak, + kueGroundFault: window.kueGroundFault, + kueLimit1: window.kueLimit1, + kueLimit2Low: window.kueLimit2Low, + kueLimit2High: window.kueLimit2High, + kueDelay1: window.kueDelay1, + kueLoopInterval: window.kueLoopInterval, + kueVersion: window.kueVersion, + tdrAtten: window.tdrAtten, + tdrPulse: window.tdrPulse, + tdrSpeed: window.tdrSpeed, + tdrAmp: window.tdrAmp, + tdrTrigger: window.tdrTrigger, + tdrLocation: window.tdrLocation, + tdrActive: window.tdrActive, + kueOverflow: window.kueOverflow, + kue100V: window.kue100V, + kueResidence: window.kueResidence, + tdrLastMeasurement: window.tdrLastMeasurement, + kueBooting: window.kueBooting, + appVersion: window.appVersion, + }); + } + }, []); useEffect(() => { if (isClient) { diff --git a/public/favicon.png b/public/favicon.png new file mode 100644 index 0000000..dd41dc3 Binary files /dev/null and b/public/favicon.png differ diff --git a/public/offline.html b/public/offline.html index 4cd969e..88f87bd 100644 --- a/public/offline.html +++ b/public/offline.html @@ -4,12 +4,8 @@ Abmeldung - - - - - - + +