File und Order Struktur wie bai Kai in mockData Verzeichnis
Chart in localhost testen und in die Umgebung development und production
This commit is contained in:
@@ -27,7 +27,7 @@ body {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (prefers-color-scheme: light) {
|
@media (prefers-color-scheme: dark) {
|
||||||
input {
|
input {
|
||||||
background-color: #333 !important; /* Dunkler Hintergrund im Darkmode */
|
background-color: #333 !important; /* Dunkler Hintergrund im Darkmode */
|
||||||
color: #fff !important; /* Weißer Text 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 {
|
input {
|
||||||
background-color: white !important; /* Heller Hintergrund im Lightmode */
|
background-color: white !important; /* Heller Hintergrund im Lightmode */
|
||||||
color: black !important; /* Schwarzer Text im Lightmode */
|
color: black !important; /* Schwarzer Text im Lightmode */
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ function Kabelueberwachung() {
|
|||||||
if (environment === "production") {
|
if (environment === "production") {
|
||||||
script.src = `CPL?/SERVICE/kueData.js`; // Produktions-Pfad
|
script.src = `CPL?/SERVICE/kueData.js`; // Produktions-Pfad
|
||||||
} else {
|
} else {
|
||||||
script.src = `/mockData/kueData.js`; // Mock-Daten-Pfad
|
script.src = `/mockData/SERVICE/kueData.js`; // Mock-Daten-Pfad
|
||||||
}
|
}
|
||||||
script.async = true;
|
script.async = true;
|
||||||
document.body.appendChild(script);
|
document.body.appendChild(script);
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ function Header() {
|
|||||||
if (environment === "production") {
|
if (environment === "production") {
|
||||||
script.src = `/CPL?/CPL/SERVICE/${file}`; // Produktions-Pfad
|
script.src = `/CPL?/CPL/SERVICE/${file}`; // Produktions-Pfad
|
||||||
} else {
|
} else {
|
||||||
script.src = `/mockData/${file}`; // Entwicklungs-Pfad
|
script.src = `/mockData/SERVICE/${file}`; // Entwicklungs-Pfad
|
||||||
}
|
}
|
||||||
|
|
||||||
script.async = true;
|
script.async = true;
|
||||||
|
|||||||
@@ -47,11 +47,17 @@ function Kue705FO({
|
|||||||
const handleCloseChartModal = () => {
|
const handleCloseChartModal = () => {
|
||||||
setShowChartModal(false);
|
setShowChartModal(false);
|
||||||
};
|
};
|
||||||
|
const environment = process.env.NODE_ENV || "production";
|
||||||
|
let fileData;
|
||||||
// Daten laden und den TDR-Chart erstellen
|
// Daten laden und den TDR-Chart erstellen
|
||||||
const loadTDRChartData = () => {
|
const loadTDRChartData = () => {
|
||||||
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") {
|
||||||
|
fileData = `CPL?/SERVICE/lastTDR/slot${slot}.json`; // Produktions-Pfad
|
||||||
|
} else {
|
||||||
|
fileData = `/mockData/lastTDR/slot${slot}.json`; // Mock-Daten-Pfad für Entwicklung
|
||||||
|
}
|
||||||
|
|
||||||
fetch(fileData)
|
fetch(fileData)
|
||||||
.then((response) => response.json())
|
.then((response) => response.json())
|
||||||
@@ -67,7 +73,12 @@ function Kue705FO({
|
|||||||
// Daten laden und den Schleifenmessungs-Chart erstellen
|
// Daten laden und den Schleifenmessungs-Chart erstellen
|
||||||
const loadLoopChartData = () => {
|
const loadLoopChartData = () => {
|
||||||
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") {
|
||||||
|
fileData = `CPL?/SERVICE/4000values/slot${slot}.json`; // Produktions-Pfad
|
||||||
|
} else {
|
||||||
|
fileData = `/mockData/4000values/slot${slot}.json`; // Mock-Daten-Pfad für Entwicklung
|
||||||
|
}
|
||||||
|
|
||||||
fetch(fileData)
|
fetch(fileData)
|
||||||
.then((response) => response.json())
|
.then((response) => response.json())
|
||||||
@@ -146,7 +157,7 @@ function Kue705FO({
|
|||||||
// Funktion zum Erstellen des TDR-Charts
|
// Funktion zum Erstellen des TDR-Charts
|
||||||
const createTDRChart = (dataTDR) => {
|
const createTDRChart = (dataTDR) => {
|
||||||
const ctx = document.getElementById("myChart").getContext("2d");
|
const ctx = document.getElementById("myChart").getContext("2d");
|
||||||
|
console.log(`TDR-Daten für Slot ${slotIndex + 1}:`, dataTDR);
|
||||||
new Chart(ctx, {
|
new Chart(ctx, {
|
||||||
type: "line",
|
type: "line",
|
||||||
data: {
|
data: {
|
||||||
|
|||||||
1
public/mockData/LastTDR/slot0.json
Normal file
1
public/mockData/LastTDR/slot0.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<%=KTZ0%>
|
||||||
1
public/mockData/LastTDR/slot1.json
Normal file
1
public/mockData/LastTDR/slot1.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<%=KTZ1%>
|
||||||
1
public/mockData/LastTDR/slot10.json
Normal file
1
public/mockData/LastTDR/slot10.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<%=KTZ10%>
|
||||||
1
public/mockData/LastTDR/slot11.json
Normal file
1
public/mockData/LastTDR/slot11.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<%=KTZ11%>
|
||||||
1
public/mockData/LastTDR/slot12.json
Normal file
1
public/mockData/LastTDR/slot12.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<%=KTZ12%>
|
||||||
1
public/mockData/LastTDR/slot13.json
Normal file
1
public/mockData/LastTDR/slot13.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<%=KTZ13%>
|
||||||
1
public/mockData/LastTDR/slot14.json
Normal file
1
public/mockData/LastTDR/slot14.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<%=KTZ14%>
|
||||||
1
public/mockData/LastTDR/slot15.json
Normal file
1
public/mockData/LastTDR/slot15.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<%=KTZ15%>
|
||||||
1
public/mockData/LastTDR/slot16.json
Normal file
1
public/mockData/LastTDR/slot16.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<%=KTZ16%>
|
||||||
1
public/mockData/LastTDR/slot17.json
Normal file
1
public/mockData/LastTDR/slot17.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<%=KTZ17%>
|
||||||
1
public/mockData/LastTDR/slot18.json
Normal file
1
public/mockData/LastTDR/slot18.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<%=KTZ18%>
|
||||||
1
public/mockData/LastTDR/slot19.json
Normal file
1
public/mockData/LastTDR/slot19.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<%=KTZ19%>
|
||||||
1
public/mockData/LastTDR/slot2.json
Normal file
1
public/mockData/LastTDR/slot2.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<%=KTZ1%>
|
||||||
1
public/mockData/LastTDR/slot20.json
Normal file
1
public/mockData/LastTDR/slot20.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<%=KTZ20%>
|
||||||
1
public/mockData/LastTDR/slot21.json
Normal file
1
public/mockData/LastTDR/slot21.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<%=KTZ21%>
|
||||||
1
public/mockData/LastTDR/slot22.json
Normal file
1
public/mockData/LastTDR/slot22.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<%=KTZ22%>
|
||||||
1
public/mockData/LastTDR/slot23.json
Normal file
1
public/mockData/LastTDR/slot23.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<%=KTZ23%>
|
||||||
1
public/mockData/LastTDR/slot24.json
Normal file
1
public/mockData/LastTDR/slot24.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<%=KTZ24%>
|
||||||
1
public/mockData/LastTDR/slot25.json
Normal file
1
public/mockData/LastTDR/slot25.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<%=KTZ25%>
|
||||||
1
public/mockData/LastTDR/slot26.json
Normal file
1
public/mockData/LastTDR/slot26.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<%=KTZ26%>
|
||||||
1
public/mockData/LastTDR/slot27.json
Normal file
1
public/mockData/LastTDR/slot27.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<%=KTZ27%>
|
||||||
1
public/mockData/LastTDR/slot28.json
Normal file
1
public/mockData/LastTDR/slot28.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<%=KTZ28%>
|
||||||
1
public/mockData/LastTDR/slot29.json
Normal file
1
public/mockData/LastTDR/slot29.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<%=KTZ29%>
|
||||||
1
public/mockData/LastTDR/slot3.json
Normal file
1
public/mockData/LastTDR/slot3.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<%=KTZ3%>
|
||||||
1
public/mockData/LastTDR/slot30.json
Normal file
1
public/mockData/LastTDR/slot30.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<%=KTZ30%>
|
||||||
1
public/mockData/LastTDR/slot31.json
Normal file
1
public/mockData/LastTDR/slot31.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<%=KTZ31%>
|
||||||
1
public/mockData/LastTDR/slot4.json
Normal file
1
public/mockData/LastTDR/slot4.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<%=KTZ4%>
|
||||||
1
public/mockData/LastTDR/slot5.json
Normal file
1
public/mockData/LastTDR/slot5.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<%=KTZ5%>
|
||||||
1
public/mockData/LastTDR/slot6.json
Normal file
1
public/mockData/LastTDR/slot6.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<%=KTZ6%>
|
||||||
1
public/mockData/LastTDR/slot7.json
Normal file
1
public/mockData/LastTDR/slot7.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<%=KTZ7%>
|
||||||
1
public/mockData/LastTDR/slot8.json
Normal file
1
public/mockData/LastTDR/slot8.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<%=KTZ8%>
|
||||||
1
public/mockData/LastTDR/slot9.json
Normal file
1
public/mockData/LastTDR/slot9.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<%=KTZ9%>
|
||||||
@@ -13,7 +13,7 @@ export async function loadWindowVariables() {
|
|||||||
if (environment === "production") {
|
if (environment === "production") {
|
||||||
script.src = `/CPL?/${src}`; // Produktions-Pfad
|
script.src = `/CPL?/${src}`; // Produktions-Pfad
|
||||||
} else {
|
} else {
|
||||||
script.src = `/mockData/${src}`; // Entwicklungs-Pfad
|
script.src = `/mockData/SERVICE/${src}`; // Entwicklungs-Pfad
|
||||||
}
|
}
|
||||||
script.async = true;
|
script.async = true;
|
||||||
script.onload = () => {
|
script.onload = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user