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:
ISA
2024-10-24 13:36:25 +02:00
parent c2b4f40d39
commit 85bc6f86de
44 changed files with 52 additions and 9 deletions

View File

@@ -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 */

View File

@@ -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);

View File

@@ -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;

View File

@@ -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: {

View File

@@ -0,0 +1 @@
<%=KTZ0%>

View File

@@ -0,0 +1 @@
<%=KTZ1%>

View File

@@ -0,0 +1 @@
<%=KTZ10%>

View File

@@ -0,0 +1 @@
<%=KTZ11%>

View File

@@ -0,0 +1 @@
<%=KTZ12%>

View File

@@ -0,0 +1 @@
<%=KTZ13%>

View File

@@ -0,0 +1 @@
<%=KTZ14%>

View File

@@ -0,0 +1 @@
<%=KTZ15%>

View File

@@ -0,0 +1 @@
<%=KTZ16%>

View File

@@ -0,0 +1 @@
<%=KTZ17%>

View File

@@ -0,0 +1 @@
<%=KTZ18%>

View File

@@ -0,0 +1 @@
<%=KTZ19%>

View File

@@ -0,0 +1 @@
<%=KTZ1%>

View File

@@ -0,0 +1 @@
<%=KTZ20%>

View File

@@ -0,0 +1 @@
<%=KTZ21%>

View File

@@ -0,0 +1 @@
<%=KTZ22%>

View File

@@ -0,0 +1 @@
<%=KTZ23%>

View File

@@ -0,0 +1 @@
<%=KTZ24%>

View File

@@ -0,0 +1 @@
<%=KTZ25%>

View File

@@ -0,0 +1 @@
<%=KTZ26%>

View File

@@ -0,0 +1 @@
<%=KTZ27%>

View File

@@ -0,0 +1 @@
<%=KTZ28%>

View File

@@ -0,0 +1 @@
<%=KTZ29%>

View File

@@ -0,0 +1 @@
<%=KTZ3%>

View File

@@ -0,0 +1 @@
<%=KTZ30%>

View File

@@ -0,0 +1 @@
<%=KTZ31%>

View File

@@ -0,0 +1 @@
<%=KTZ4%>

View File

@@ -0,0 +1 @@
<%=KTZ5%>

View File

@@ -0,0 +1 @@
<%=KTZ6%>

View File

@@ -0,0 +1 @@
<%=KTZ7%>

View File

@@ -0,0 +1 @@
<%=KTZ8%>

View File

@@ -0,0 +1 @@
<%=KTZ9%>

View File

@@ -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 = () => {