diff --git a/app/globals.css b/app/globals.css index dbd1cc0..e71da9a 100644 --- a/app/globals.css +++ b/app/globals.css @@ -27,7 +27,7 @@ body { } } -@media (prefers-color-scheme: light) { +@media (prefers-color-scheme: dark) { input { background-color: #333 !important; /* Dunkler Hintergrund im Darkmode */ color: #fff !important; /* Weißer Text im Darkmode */ @@ -35,7 +35,7 @@ body { } } -@media (prefers-color-scheme: dark) { +@media (prefers-color-scheme: light) { input { background-color: white !important; /* Heller Hintergrund im Lightmode */ color: black !important; /* Schwarzer Text im Lightmode */ diff --git a/app/kabelueberwachung/page.jsx b/app/kabelueberwachung/page.jsx index 83e7e0e..1c80bba 100644 --- a/app/kabelueberwachung/page.jsx +++ b/app/kabelueberwachung/page.jsx @@ -72,7 +72,7 @@ function Kabelueberwachung() { if (environment === "production") { script.src = `CPL?/SERVICE/kueData.js`; // Produktions-Pfad } else { - script.src = `/mockData/kueData.js`; // Mock-Daten-Pfad + script.src = `/mockData/SERVICE/kueData.js`; // Mock-Daten-Pfad } script.async = true; document.body.appendChild(script); diff --git a/components/Header.jsx b/components/Header.jsx index cf0ee42..72009aa 100644 --- a/components/Header.jsx +++ b/components/Header.jsx @@ -116,7 +116,7 @@ function Header() { if (environment === "production") { script.src = `/CPL?/CPL/SERVICE/${file}`; // Produktions-Pfad } else { - script.src = `/mockData/${file}`; // Entwicklungs-Pfad + script.src = `/mockData/SERVICE/${file}`; // Entwicklungs-Pfad } script.async = true; diff --git a/components/modules/Kue705FO.jsx b/components/modules/Kue705FO.jsx index 2a09f28..0da7901 100644 --- a/components/modules/Kue705FO.jsx +++ b/components/modules/Kue705FO.jsx @@ -47,11 +47,17 @@ function Kue705FO({ const handleCloseChartModal = () => { setShowChartModal(false); }; - + const environment = process.env.NODE_ENV || "production"; + let fileData; // Daten laden und den TDR-Chart erstellen const loadTDRChartData = () => { 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") { + fileData = `CPL?/SERVICE/lastTDR/slot${slot}.json`; // Produktions-Pfad + } else { + fileData = `/mockData/lastTDR/slot${slot}.json`; // Mock-Daten-Pfad für Entwicklung + } fetch(fileData) .then((response) => response.json()) @@ -67,7 +73,12 @@ function Kue705FO({ // Daten laden und den Schleifenmessungs-Chart erstellen const loadLoopChartData = () => { 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") { + fileData = `CPL?/SERVICE/4000values/slot${slot}.json`; // Produktions-Pfad + } else { + fileData = `/mockData/4000values/slot${slot}.json`; // Mock-Daten-Pfad für Entwicklung + } fetch(fileData) .then((response) => response.json()) @@ -146,7 +157,7 @@ function Kue705FO({ // Funktion zum Erstellen des TDR-Charts const createTDRChart = (dataTDR) => { const ctx = document.getElementById("myChart").getContext("2d"); - + console.log(`TDR-Daten für Slot ${slotIndex + 1}:`, dataTDR); new Chart(ctx, { type: "line", data: { diff --git a/public/mockData/LastTDR/slot0.json b/public/mockData/LastTDR/slot0.json new file mode 100644 index 0000000..98a8890 --- /dev/null +++ b/public/mockData/LastTDR/slot0.json @@ -0,0 +1 @@ +<%=KTZ0%> diff --git a/public/mockData/LastTDR/slot1.json b/public/mockData/LastTDR/slot1.json new file mode 100644 index 0000000..edd4b48 --- /dev/null +++ b/public/mockData/LastTDR/slot1.json @@ -0,0 +1 @@ +<%=KTZ1%> diff --git a/public/mockData/LastTDR/slot10.json b/public/mockData/LastTDR/slot10.json new file mode 100644 index 0000000..62cce0d --- /dev/null +++ b/public/mockData/LastTDR/slot10.json @@ -0,0 +1 @@ +<%=KTZ10%> diff --git a/public/mockData/LastTDR/slot11.json b/public/mockData/LastTDR/slot11.json new file mode 100644 index 0000000..92c8578 --- /dev/null +++ b/public/mockData/LastTDR/slot11.json @@ -0,0 +1 @@ +<%=KTZ11%> diff --git a/public/mockData/LastTDR/slot12.json b/public/mockData/LastTDR/slot12.json new file mode 100644 index 0000000..3085cff --- /dev/null +++ b/public/mockData/LastTDR/slot12.json @@ -0,0 +1 @@ +<%=KTZ12%> diff --git a/public/mockData/LastTDR/slot13.json b/public/mockData/LastTDR/slot13.json new file mode 100644 index 0000000..f48d821 --- /dev/null +++ b/public/mockData/LastTDR/slot13.json @@ -0,0 +1 @@ +<%=KTZ13%> diff --git a/public/mockData/LastTDR/slot14.json b/public/mockData/LastTDR/slot14.json new file mode 100644 index 0000000..9d6c4f1 --- /dev/null +++ b/public/mockData/LastTDR/slot14.json @@ -0,0 +1 @@ +<%=KTZ14%> diff --git a/public/mockData/LastTDR/slot15.json b/public/mockData/LastTDR/slot15.json new file mode 100644 index 0000000..fe2745f --- /dev/null +++ b/public/mockData/LastTDR/slot15.json @@ -0,0 +1 @@ +<%=KTZ15%> diff --git a/public/mockData/LastTDR/slot16.json b/public/mockData/LastTDR/slot16.json new file mode 100644 index 0000000..de0a2a6 --- /dev/null +++ b/public/mockData/LastTDR/slot16.json @@ -0,0 +1 @@ +<%=KTZ16%> diff --git a/public/mockData/LastTDR/slot17.json b/public/mockData/LastTDR/slot17.json new file mode 100644 index 0000000..54cf9e0 --- /dev/null +++ b/public/mockData/LastTDR/slot17.json @@ -0,0 +1 @@ +<%=KTZ17%> diff --git a/public/mockData/LastTDR/slot18.json b/public/mockData/LastTDR/slot18.json new file mode 100644 index 0000000..b163760 --- /dev/null +++ b/public/mockData/LastTDR/slot18.json @@ -0,0 +1 @@ +<%=KTZ18%> diff --git a/public/mockData/LastTDR/slot19.json b/public/mockData/LastTDR/slot19.json new file mode 100644 index 0000000..ba2cf5d --- /dev/null +++ b/public/mockData/LastTDR/slot19.json @@ -0,0 +1 @@ +<%=KTZ19%> diff --git a/public/mockData/LastTDR/slot2.json b/public/mockData/LastTDR/slot2.json new file mode 100644 index 0000000..edd4b48 --- /dev/null +++ b/public/mockData/LastTDR/slot2.json @@ -0,0 +1 @@ +<%=KTZ1%> diff --git a/public/mockData/LastTDR/slot20.json b/public/mockData/LastTDR/slot20.json new file mode 100644 index 0000000..7b0450e --- /dev/null +++ b/public/mockData/LastTDR/slot20.json @@ -0,0 +1 @@ +<%=KTZ20%> diff --git a/public/mockData/LastTDR/slot21.json b/public/mockData/LastTDR/slot21.json new file mode 100644 index 0000000..d8d90e4 --- /dev/null +++ b/public/mockData/LastTDR/slot21.json @@ -0,0 +1 @@ +<%=KTZ21%> diff --git a/public/mockData/LastTDR/slot22.json b/public/mockData/LastTDR/slot22.json new file mode 100644 index 0000000..cd7acf4 --- /dev/null +++ b/public/mockData/LastTDR/slot22.json @@ -0,0 +1 @@ +<%=KTZ22%> diff --git a/public/mockData/LastTDR/slot23.json b/public/mockData/LastTDR/slot23.json new file mode 100644 index 0000000..87d169c --- /dev/null +++ b/public/mockData/LastTDR/slot23.json @@ -0,0 +1 @@ +<%=KTZ23%> diff --git a/public/mockData/LastTDR/slot24.json b/public/mockData/LastTDR/slot24.json new file mode 100644 index 0000000..d0ddbdf --- /dev/null +++ b/public/mockData/LastTDR/slot24.json @@ -0,0 +1 @@ +<%=KTZ24%> diff --git a/public/mockData/LastTDR/slot25.json b/public/mockData/LastTDR/slot25.json new file mode 100644 index 0000000..a2d1a5d --- /dev/null +++ b/public/mockData/LastTDR/slot25.json @@ -0,0 +1 @@ +<%=KTZ25%> diff --git a/public/mockData/LastTDR/slot26.json b/public/mockData/LastTDR/slot26.json new file mode 100644 index 0000000..0c90afc --- /dev/null +++ b/public/mockData/LastTDR/slot26.json @@ -0,0 +1 @@ +<%=KTZ26%> diff --git a/public/mockData/LastTDR/slot27.json b/public/mockData/LastTDR/slot27.json new file mode 100644 index 0000000..38e5d5e --- /dev/null +++ b/public/mockData/LastTDR/slot27.json @@ -0,0 +1 @@ +<%=KTZ27%> diff --git a/public/mockData/LastTDR/slot28.json b/public/mockData/LastTDR/slot28.json new file mode 100644 index 0000000..31c5555 --- /dev/null +++ b/public/mockData/LastTDR/slot28.json @@ -0,0 +1 @@ +<%=KTZ28%> diff --git a/public/mockData/LastTDR/slot29.json b/public/mockData/LastTDR/slot29.json new file mode 100644 index 0000000..921d4ea --- /dev/null +++ b/public/mockData/LastTDR/slot29.json @@ -0,0 +1 @@ +<%=KTZ29%> diff --git a/public/mockData/LastTDR/slot3.json b/public/mockData/LastTDR/slot3.json new file mode 100644 index 0000000..3d5e2d7 --- /dev/null +++ b/public/mockData/LastTDR/slot3.json @@ -0,0 +1 @@ +<%=KTZ3%> diff --git a/public/mockData/LastTDR/slot30.json b/public/mockData/LastTDR/slot30.json new file mode 100644 index 0000000..9b85999 --- /dev/null +++ b/public/mockData/LastTDR/slot30.json @@ -0,0 +1 @@ +<%=KTZ30%> diff --git a/public/mockData/LastTDR/slot31.json b/public/mockData/LastTDR/slot31.json new file mode 100644 index 0000000..a154b35 --- /dev/null +++ b/public/mockData/LastTDR/slot31.json @@ -0,0 +1 @@ +<%=KTZ31%> diff --git a/public/mockData/LastTDR/slot4.json b/public/mockData/LastTDR/slot4.json new file mode 100644 index 0000000..cc7b198 --- /dev/null +++ b/public/mockData/LastTDR/slot4.json @@ -0,0 +1 @@ +<%=KTZ4%> diff --git a/public/mockData/LastTDR/slot5.json b/public/mockData/LastTDR/slot5.json new file mode 100644 index 0000000..cf8ad88 --- /dev/null +++ b/public/mockData/LastTDR/slot5.json @@ -0,0 +1 @@ +<%=KTZ5%> diff --git a/public/mockData/LastTDR/slot6.json b/public/mockData/LastTDR/slot6.json new file mode 100644 index 0000000..c8a9730 --- /dev/null +++ b/public/mockData/LastTDR/slot6.json @@ -0,0 +1 @@ +<%=KTZ6%> diff --git a/public/mockData/LastTDR/slot7.json b/public/mockData/LastTDR/slot7.json new file mode 100644 index 0000000..3c44b9b --- /dev/null +++ b/public/mockData/LastTDR/slot7.json @@ -0,0 +1 @@ +<%=KTZ7%> diff --git a/public/mockData/LastTDR/slot8.json b/public/mockData/LastTDR/slot8.json new file mode 100644 index 0000000..756e50e --- /dev/null +++ b/public/mockData/LastTDR/slot8.json @@ -0,0 +1 @@ +<%=KTZ8%> diff --git a/public/mockData/LastTDR/slot9.json b/public/mockData/LastTDR/slot9.json new file mode 100644 index 0000000..18e7d0e --- /dev/null +++ b/public/mockData/LastTDR/slot9.json @@ -0,0 +1 @@ +<%=KTZ9%> diff --git a/public/mockData/Start.acp b/public/mockData/SERVICE/Start.acp similarity index 100% rename from public/mockData/Start.acp rename to public/mockData/SERVICE/Start.acp diff --git a/public/mockData/System.acp b/public/mockData/SERVICE/System.acp similarity index 100% rename from public/mockData/System.acp rename to public/mockData/SERVICE/System.acp diff --git a/public/mockData/de.acp b/public/mockData/SERVICE/de.acp similarity index 100% rename from public/mockData/de.acp rename to public/mockData/SERVICE/de.acp diff --git a/public/mockData/kueConfig.acp b/public/mockData/SERVICE/kueConfig.acp similarity index 100% rename from public/mockData/kueConfig.acp rename to public/mockData/SERVICE/kueConfig.acp diff --git a/public/mockData/kueData.js b/public/mockData/SERVICE/kueData.js similarity index 100% rename from public/mockData/kueData.js rename to public/mockData/SERVICE/kueData.js diff --git a/public/mockData/kueDetailTdr.acp b/public/mockData/SERVICE/kueDetailTdr.acp similarity index 100% rename from public/mockData/kueDetailTdr.acp rename to public/mockData/SERVICE/kueDetailTdr.acp diff --git a/public/mockData/last20Messages.acp b/public/mockData/SERVICE/last20Messages.acp similarity index 100% rename from public/mockData/last20Messages.acp rename to public/mockData/SERVICE/last20Messages.acp diff --git a/utils/loadWindowVariables.js b/utils/loadWindowVariables.js index 672d451..7ca56c4 100644 --- a/utils/loadWindowVariables.js +++ b/utils/loadWindowVariables.js @@ -13,7 +13,7 @@ export async function loadWindowVariables() { if (environment === "production") { script.src = `/CPL?/${src}`; // Produktions-Pfad } else { - script.src = `/mockData/${src}`; // Entwicklungs-Pfad + script.src = `/mockData/SERVICE/${src}`; // Entwicklungs-Pfad } script.async = true; script.onload = () => {