lastTDR in CPL Verzeichnis

This commit is contained in:
ISA
2024-10-25 06:40:49 +02:00
parent 85bc6f86de
commit f085787053
85 changed files with 383943 additions and 165 deletions

View File

@@ -70,7 +70,7 @@ function Kabelueberwachung() {
// Dynamischer Pfad basierend auf der Umgebung // Dynamischer Pfad basierend auf der Umgebung
const environment = process.env.NEXT_PUBLIC_NODE_ENV || "production"; const environment = process.env.NEXT_PUBLIC_NODE_ENV || "production";
if (environment === "production") { if (environment === "production") {
script.src = `CPL?/SERVICE/kueData.js`; // Produktions-Pfad script.src = `CPL?/CPL/SERVICE/kueData.js`; // Produktions-Pfad
} else { } else {
script.src = `/mockData/SERVICE/kueData.js`; // Mock-Daten-Pfad script.src = `/mockData/SERVICE/kueData.js`; // Mock-Daten-Pfad
} }

View File

@@ -1,31 +1,33 @@
// components/Header.jsx "use client"; // components/Header.jsx
"use client";
import React, { useEffect, useState } from "react"; import React, { useEffect, useState } from "react";
import Image from "next/image"; import Image from "next/image";
import "bootstrap-icons/font/bootstrap-icons.css"; import "bootstrap-icons/font/bootstrap-icons.css";
import { loadWindowVariables } from "../utils/loadWindowVariables"; // Importiere die Funktion import { loadWindowVariables } from "../utils/loadWindowVariables";
import SettingsModal from "./modales/SettingsModal"; import SettingsModal from "./modales/SettingsModal";
function Header() { function Header() {
const [isClient, setIsClient] = useState(false); const [isClient, setIsClient] = useState(false);
const [stationsname, setStationsname] = useState("Lädt..."); // Platzhalter const [stationsname, setStationsname] = useState("Lädt...");
const [cplStatus, setCplStatus] = useState("Lädt..."); const [cplStatus, setCplStatus] = useState("Lädt...");
const [showSettingsModal, setShowSettingsModal] = useState(false); const [showSettingsModal, setShowSettingsModal] = useState(false);
// Boolean-Flag, um sicherzustellen, dass der console.log nur einmal ausgeführt wird
const [logOnce, setLogOnce] = useState(false);
useEffect(() => { useEffect(() => {
setIsClient(true); setIsClient(true);
}, []); }, []);
const handleSettingsClick = () => { const handleSettingsClick = () => {
setShowSettingsModal(true); // Öffne das Modal setShowSettingsModal(true);
}; };
const handleCloseSettingsModal = () => { const handleCloseSettingsModal = () => {
setShowSettingsModal(false); // Schließe das Modal setShowSettingsModal(false);
}; };
const handleLogout = () => { const handleLogout = () => {
window.location.href = "/offline.html"; // Öffnet offline.html window.location.href = "/offline.html";
}; };
useEffect(() => { useEffect(() => {
@@ -46,93 +48,93 @@ function Header() {
}); });
} }
}, [isClient]); }, [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(() => { useEffect(() => {
if (isClient) { if (isClient && !logOnce) {
const files = [ const files = [
"de.acp", "de.js",
"kueConfig.acp", "kueConfig.js",
"kueData.js", "kueData.js",
"kueDetailTdr.acp", "kueDetailTdr.js",
"Start.acp", "Start.js",
"System.acp", "System.js",
]; ];
const environment = process.env.NEXT_PUBLIC_NODE_ENV || "production"; // Fallback auf 'production' const environment = process.env.NEXT_PUBLIC_NODE_ENV || "production";
let filesLoadedCount = 0; // Zähle die Anzahl der erfolgreich geladenen Dateien
files.forEach((file) => { files.forEach((file) => {
const script = document.createElement("script"); const script = document.createElement("script");
if (environment === "production") { if (environment === "production") {
script.src = `/CPL?/CPL/SERVICE/${file}`; // Produktions-Pfad script.src = `/CPL?/CPL/SERVICE/${file}`;
} else { } else {
script.src = `/mockData/SERVICE/${file}`; // Entwicklungs-Pfad script.src = `/mockData/SERVICE/${file}`;
} }
script.async = true; script.async = true;
script.onload = () => console.log(`${file} wurde erfolgreich geladen.`); script.onload = () => {
console.log(`${file} wurde erfolgreich geladen.`);
filesLoadedCount++;
// Wenn alle Dateien geladen sind und der logOnce noch false ist, führe den log aus
if (filesLoadedCount === files.length && !logOnce) {
console.log("Systemvariablen geladen:", {
last20Messages: window.last20Messages,
deviceName: window.deviceName,
mac1: window.mac1,
mac2: window.mac2,
ip: window.ip,
subnet: window.subnet,
gateway: window.gateway,
datetime: window.datetime,
de: window.de,
counter: window.counter,
flutter: window.flutter,
kueOnline: window.kueOnline,
kueID: window.kueID,
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,
});
setLogOnce(true); // Setze das Flag auf true, damit der log nicht erneut ausgeführt wird
}
};
script.onerror = (error) => script.onerror = (error) =>
console.error(`Fehler beim Laden von ${file}:`, error); console.error(`Fehler beim Laden von ${file}:`, error);
document.head.appendChild(script); document.head.appendChild(script);
}); });
} }
}, [isClient]); }, [isClient, logOnce]);
useEffect(() => { useEffect(() => {
console.log("Environment:", process.env.NEXT_PUBLIC_NODE_ENV); // Logge die Umgebungsvariable console.log("Environment:", process.env.NEXT_PUBLIC_NODE_ENV);
}, []); }, []);
if (!isClient) return null; // Rendere die Komponente nicht, bis sie clientseitig ausgeführt wird if (!isClient) return null;
return ( return (
<header className="bg-gray-300 flex justify-between items-center w-full h-28 relative text-black"> <header className="bg-gray-300 flex justify-between items-center w-full h-28 relative text-black">
@@ -148,7 +150,6 @@ function Header() {
</div> </div>
<div className="w-64 flex-shrink-0 h-full mt-24 "></div> <div className="w-64 flex-shrink-0 h-full mt-24 "></div>
{/* CPL Status und Stationsname */}
<div className="flex items-start space-x-4 w-full"> <div className="flex items-start space-x-4 w-full">
<div className="flex flex-col text-left pl-8"> <div className="flex flex-col text-left pl-8">
<h2 className="text-base">Stationsname</h2> <h2 className="text-base">Stationsname</h2>

View File

@@ -114,7 +114,7 @@ function KueModal({ showModal, onClose, slot, onModulNameChange }) {
// Falls Änderungen vorhanden sind, die fetch-Requests auslösen // Falls Änderungen vorhanden sind, die fetch-Requests auslösen
if (Object.keys(changes).length > 0) { if (Object.keys(changes).length > 0) {
let url = `/cpl?/SERVICE/kueDetail.HTML&slot=${slot}`; let url = `/cpl?/CPL/SERVICE/kueDetail.HTML&slot=${slot}`;
Object.keys(changes).forEach((paramKey) => { Object.keys(changes).forEach((paramKey) => {
url += `&${paramKey}${slot}=${encodeURIComponent(changes[paramKey])}`; url += `&${paramKey}${slot}=${encodeURIComponent(changes[paramKey])}`;
@@ -142,7 +142,7 @@ function KueModal({ showModal, onClose, slot, onModulNameChange }) {
}; };
const handleDisplayEinschalten = () => { const handleDisplayEinschalten = () => {
const url = `/CPL?/Service/kueDetail.HTML&KSD${slot}=1`; const url = `/CPL?/CPL/Service/kueDetail.HTML&KSD${slot}=1`;
fetch(url, { method: "GET" }) fetch(url, { method: "GET" })
.then((response) => { .then((response) => {
if (response.ok) { if (response.ok) {

View File

@@ -54,7 +54,7 @@ function Kue705FO({
const slot = slotIndex; const slot = slotIndex;
//const fileData = `../cpl?lastTDR/slot${slot}.json`; // TDR-Daten je nach Slot laden //const fileData = `../cpl?lastTDR/slot${slot}.json`; // TDR-Daten je nach Slot laden
if (environment === "production") { if (environment === "production") {
fileData = `CPL?/SERVICE/lastTDR/slot${slot}.json`; // Produktions-Pfad fileData = `/CPL?/CPL/lastTDR/slot${slot}.json`; // Produktions-Pfad
} else { } else {
fileData = `/mockData/lastTDR/slot${slot}.json`; // Mock-Daten-Pfad für Entwicklung fileData = `/mockData/lastTDR/slot${slot}.json`; // Mock-Daten-Pfad für Entwicklung
} }
@@ -75,7 +75,7 @@ function Kue705FO({
const slot = slotIndex; const slot = slotIndex;
//const fileData = `../cpl?4000values/slot${slot}.json`; // Schleifenmessdaten je nach Slot laden //const fileData = `../cpl?4000values/slot${slot}.json`; // Schleifenmessdaten je nach Slot laden
if (environment === "production") { if (environment === "production") {
fileData = `CPL?/SERVICE/4000values/slot${slot}.json`; // Produktions-Pfad fileData = `/CPL?/CPL/4000values/slot${slot}.json`; // Produktions-Pfad
} else { } else {
fileData = `/mockData/4000values/slot${slot}.json`; // Mock-Daten-Pfad für Entwicklung fileData = `/mockData/4000values/slot${slot}.json`; // Mock-Daten-Pfad für Entwicklung
} }
@@ -375,9 +375,9 @@ function Kue705FO({
<span className="text-white text-[18px]"></span> <span className="text-white text-[18px]"></span>
</button> </button>
<div className="absolute bottom-[5px] left-1/2 transform -translate-x-1/2"> <div className="absolute bottom-[5px] left-1/2 transform -translate-x-1/2 w-[100px] flex justify-center items-center">
<div className="top-[220px] left-[10px] text-black text-[10px]"> <div className="text-center text-black text-[10px]">
<p>{currentDisplayValue}</p> <p>{currentDisplayValue + " KOhm"}</p>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -1,16 +0,0 @@
var appVersion="<%=SAV00%>";
var deviceName="<%=SAN01%>";
var mac1="<%=SEM01%>";
var mac2="<%=SEM02%>";
var ip="<%=SEI01%>";
var subnet="<%=SES01%>";
var gateway="<%=SEG01%>";
var datetime="<%=SCL01%>";
var opcState="<%=SOS01%>";
var opcSessions="<%=SOC01%>";
var opcName="<%=SON01%>";
var ntp1="<%=STP01%>";
var ntp2="<%=STP02%>";
var ntp3="<%=STP03%>";
var ntpTimezone="<%=STT00%>";
var ntpActive="<%=STA00%>";

View File

@@ -0,0 +1,16 @@
var appVersion = "<%=SAV00%>";
var deviceName = "<%=SAN01%>";
var mac1 = "<%=SEM01%>";
var mac2 = "<%=SEM02%>";
var ip = "<%=SEI01%>";
var subnet = "<%=SES01%>";
var gateway = "<%=SEG01%>";
var datetime = "<%=SCL01%>";
var ntp1 = "<%=STP01%>";
var ntp2 = "<%=STP02%>";
var ntp3 = "<%=STP03%>";
var ntpTimezone = "<%=STT00%>";
var ntpActive = "<%=STA00%>";
var opcState = "<%=SOS01%>";
var opcSessions = "<%=SOC01%>";
var opcName = "<%=SON01%>";

View File

@@ -1,21 +1,58 @@
// Letzte 20 Meldungen für dashboard.html Start.acp
var last20Messages = `<%=SAM01%>`;
//System.acp
var appVersion="<%=SAV00%>";
var deviceName="<%=SAN01%>";
var mac1="<%=SEM01%>";
var mac2="<%=SEM02%>";
var ip="<%=SEI01%>";
var subnet="<%=SES01%>";
var gateway="<%=SEG01%>";
var datetime="<%=SCL01%>";
//de.acp
var de=[<%=DES80%>,<%=DES81%>,<%=DES82%>,<%=DES83%>];
var counter=[<%=DEC80%>,<%=DEC81%>,<%=DEC82%>,<%=DEC83%>];
var flutter=[<%=DEF80%>,<%=DEF81%>,<%=DEF82%>,<%=DEF83%>];
//kueConfig.acp
var kueOnline=[<%=KSO80%>,<%=KSO81%>,<%=KSO82%>,<%=KSO83%>];
var kueID=[<%=KSI80%>,<%=KSI81%>,<%=KSI82%>,<%=KSI83%>];
var kueIso=[<%=KIM80%>,<%=KIM81%>,<%=KIM82%>,<%=KIM83%>];
//kueDetail.acp
var kueOnline=[<%=KSO80%>,<%=KSO81%>,<%=KSO82%>,<%=KSO83%>]; var kueOnline=[<%=KSO80%>,<%=KSO81%>,<%=KSO82%>,<%=KSO83%>];
var kueIso=[<%=KIM80%>,<%=KIM81%>,<%=KIM82%>,<%=KIM83%>]; var kueIso=[<%=KIM80%>,<%=KIM81%>,<%=KIM82%>,<%=KIM83%>];
var kueValid=[<%=KIV80%>,<%=KIV81%>,<%=KIV82%>,<%=KIV83%>]; var kueValid=[<%=KIV80%>,<%=KIV81%>,<%=KIV82%>,<%=KIV83%>];
var kueAlarm1=[<%=KIA80%>,<%=KIA81%>,<%=KIA82%>,<%=KIA83%>]; var kueAlarm1=[<%=KIA80%>,<%=KIA81%>,<%=KIA82%>,<%=KIA83%>];
var kueAlarm2=[<%=KRA80%>,<%=KRA81%>,<%=KRA82%>,<%=KRA83%>]; var kueAlarm2=[<%=KRA80%>,<%=KRA81%>,<%=KRA82%>,<%=KRA83%>];
var kueRes=[<%=KRM80%>,<%=KRM81%>,<%=KRM82%>,<%=KRM83%>]; var kueRes=[<%=KRM80%>,<%=KRM81%>,<%=KRM82%>,<%=KRM83%>];
var kueCableBreak=[<%=KSC80%>,<%=KSC81%>,<%=KSC82%>,<%=KSC83%>]; var kueCableBreak=[<%=KSC80%>,<%=KSC81%>,<%=KSC82%>,<%=KSC83%>];
var kueGroundFault=[<%=KSG80%>,<%=KSG81%>,<%=KSG82%>,<%=KSG83%>]; var kueGroundFault=[<%=KSG80%>,<%=KSG81%>,<%=KSG82%>,<%=KSG83%>];
var kueLimit1=[<%=KIG80%>,<%=KIG81%>,<%=KIG82%>,<%=KIG83%>]; var kueLimit1=[<%=KIG80%>,<%=KIG81%>,<%=KIG82%>,<%=KIG83%>];
var kueLimit2Low=[<%=KRG80%>,<%=KRG81%>,<%=KRG82%>,<%=KRG83%>]; var kueLimit2Low=[<%=KRG80%>,<%=KRG81%>,<%=KRG82%>,<%=KRG83%>];
var kueLimit2High=[<%=KRH80%>,<%=KRH81%>,<%=KRH82%>,<%=KRH83%>]; var kueLimit2High=[<%=KRH80%>,<%=KRH81%>,<%=KRH82%>,<%=KRH83%>];
var kueDelay1=[<%=KID80%>,<%=KID81%>,<%=KID82%>,<%=KID83%>]; var kueDelay1=[<%=KID80%>,<%=KID81%>,<%=KID82%>,<%=KID83%>];
var kueLoopInterval=[<%=KRI80%>,<%=KRI81%>,<%=KRI82%>,<%=KRI83%>]; var kueLoopInterval=[<%=KRI80%>,<%=KRI81%>,<%=KRI82%>,<%=KRI83%>];
var kueID=[<%=KSI80%>,<%=KSI81%>,<%=KSI82%>,<%=KSI83%>]; var kueID=[<%=KSI80%>,<%=KSI81%>,<%=KSI82%>,<%=KSI83%>];
var kueName=[<%=KSA80%>,<%=KSA81%>,<%=KSA82%>,<%=KSA83%>];
var kueVersion=[<%=KSV80%>,<%=KSV81%>,<%=KSV82%>,<%=KSV83%>]; var kueVersion=[<%=KSV80%>,<%=KSV81%>,<%=KSV82%>,<%=KSV83%>];
var kueName=[<%=KSA80%>,<%=KSA81%>,<%=KSA82%>,<%=KSA83%>];
var tdrAtten=[<%=KTD80%>,<%=KTD81%>,<%=KTD82%>,<%=KTD83%>];
var tdrPulse=[<%=KTP80%>,<%=KTP81%>,<%=KTP82%>,<%=KTP83%>];
var tdrSpeed=[<%=KTS80%>,<%=KTS81%>,<%=KTS82%>,<%=KTS83%>];
var tdrAmp=[<%=KTA80%>,<%=KTA81%>,<%=KTA82%>,<%=KTA83%>];
var tdrTrigger=[<%=KTE80%>,<%=KTE81%>,<%=KTE82%>,<%=KTE83%>];
var tdrLocation=[<%=KTF80%>,<%=KTF81%>,<%=KTF82%>,<%=KTF83%>];
var tdrActive=[<%=KTX80%>,<%=KTX81%>,<%=KTX82%>,<%=KTX83%>];
var kueOverflow=[<%=KIW80%>,<%=KIW81%>,<%=KIW82%>,<%=KIW83%>]; var kueOverflow=[<%=KIW80%>,<%=KIW81%>,<%=KIW82%>,<%=KIW83%>];
var kue100V=[<%=KSS80%>,<%=KSS81%>,<%=KSS82%>,<%=KSS83%>]; var kue100V=[<%=KSS80%>,<%=KSS81%>,<%=KSS82%>,<%=KSS83%>];
var kueResidence=[<%=KSN80%>,<%=KSN81%>,<%=KSN82%>,<%=KSN83%>]; var kueResidence=[<%=KSN80%>,<%=KSN81%>,<%=KSN82%>,<%=KSN83%>];
var tdrLastMeasurement=[<%=KTL80%>,<%=KTL81%>,<%=KTL82%>,<%=KTL83%>];
var kueBooting=[<%=KSB80%>,<%=KSB81%>,<%=KSB82%>,<%=KSB83%>]; var kueBooting=[<%=KSB80%>,<%=KSB81%>,<%=KSB82%>,<%=KSB83%>];

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +0,0 @@
var de=[<%=DES80%>,<%=DES81%>,<%=DES82%>,<%=DES83%>];
var counter=[<%=DEC80%>,<%=DEC81%>,<%=DEC82%>,<%=DEC83%>];
var flutter=[<%=DEF80%>,<%=DEF81%>,<%=DEF82%>,<%=DEF83%>];

View File

@@ -1,17 +0,0 @@
var kueOnline=[<%=KSO80%>,<%=KSO81%>,<%=KSO82%>,<%=KSO83%>];
var kueValid=[<%=KIV80%>,<%=KIV81%>,<%=KIV82%>,<%=KIV83%>];
var kueID=[<%=KSI80%>,<%=KSI81%>,<%=KSI82%>,<%=KSI83%>];
var kueName=[<%=KSA80%>,<%=KSA81%>,<%=KSA82%>,<%=KSA83%>];
var kueVersion=[<%=KSV80%>,<%=KSV81%>,<%=KSV82%>,<%=KSV83%>];
var tdrAtten=[<%=KTD80%>,<%=KTD81%>,<%=KTD82%>,<%=KTD83%>];
var tdrPulse=[<%=KTP80%>,<%=KTP81%>,<%=KTP82%>,<%=KTP83%>];
var tdrSpeed=[<%=KTS80%>,<%=KTS81%>,<%=KTS82%>,<%=KTS83%>];
var tdrAmp=[<%=KTA80%>,<%=KTA81%>,<%=KTA82%>,<%=KTA83%>];
var tdrTrigger=[<%=KTE80%>,<%=KTE81%>,<%=KTE82%>,<%=KTE83%>];
var tdrLocation=[<%=KTF80%>,<%=KTF81%>,<%=KTF82%>,<%=KTF83%>];
var tdrActive=[<%=KTX80%>,<%=KTX81%>,<%=KTX82%>,<%=KTX83%>];
var tdrLast=[<%=KTL80%>,<%=KTL81%>,<%=KTL82%>,<%=KTL83%>];

View File

@@ -1 +0,0 @@
var last20Messages =<%=SAM01%>;

View File

@@ -1,15 +0,0 @@
var deviceName="<%=SAN01%>";
var mac1="<%=SEM01%>";
var mac2="<%=SEM02%>";
var ip="<%=SEI01%>";
var subnet="<%=SES01%>";
var gateway="<%=SEG01%>";
var datetime="<%=SCL01%>";
var opcState="<%=SOS01%>";
var opcSessions="<%=SOC01%>";
var opcName="<%=SON01%>";
var ntp1="<%=STP01%>";
var ntp2="<%=STP02%>";
var ntp3="<%=STP03%>";
var ntpTimezone="<%=STT00%>";
var ntpActive="<%=STA00%>";

View File

@@ -11,7 +11,7 @@ export async function loadWindowVariables() {
const environment = process.env.NEXT_PUBLIC_NODE_ENV || "production"; // Fallback auf 'production' const environment = process.env.NEXT_PUBLIC_NODE_ENV || "production"; // Fallback auf 'production'
if (environment === "production") { if (environment === "production") {
script.src = `/CPL?/${src}`; // Produktions-Pfad script.src = `/CPL?/CPL/SERVICE/${src}`; // Produktions-Pfad
} else { } else {
script.src = `/mockData/SERVICE/${src}`; // Entwicklungs-Pfad script.src = `/mockData/SERVICE/${src}`; // Entwicklungs-Pfad
} }