fix: Darstellung der Isolationsanzeige angepasst
- ">200 MOhm" wird nun als neutraler Wert angezeigt und nicht in Rot, da es auf eine gute Kabelisolation hinweist. - Rote Textfarbe bleibt auf Fehlerbeschränkungen wie Aderbruch, Erdschluss, Isolations- und Schleifenfehler begrenzt. - Code-Bedingungen für die Prioritätsanzeige optimiert, um korrekte Farbzuordnung und Alarmauslösung sicherzustellen.
This commit is contained in:
@@ -94,21 +94,22 @@ function Kabelueberwachung() {
|
||||
|
||||
useEffect(() => {
|
||||
const script = document.createElement("script");
|
||||
// Dynamischer Pfad basierend auf der Umgebung
|
||||
const environment = process.env.NEXT_PUBLIC_NODE_ENV || "production";
|
||||
if (environment === "production") {
|
||||
script.src = `CPL?/CPL/SERVICE/kueData.js`; // Produktions-Pfad
|
||||
} else {
|
||||
script.src = `/CPLmockData/SERVICE/kueData.js`; // Mock-Daten-Pfad
|
||||
}
|
||||
script.src =
|
||||
environment === "production"
|
||||
? "CPL?/CPL/SERVICE/kueData.js"
|
||||
: "/CPLmockData/SERVICE/kueData.js";
|
||||
script.async = true;
|
||||
document.body.appendChild(script);
|
||||
|
||||
// Cleanup the script if the component unmounts
|
||||
// Cleanup function mit Überprüfung
|
||||
return () => {
|
||||
document.body.removeChild(script);
|
||||
if (script.parentNode === document.body) {
|
||||
document.body.removeChild(script);
|
||||
}
|
||||
};
|
||||
}, []);
|
||||
|
||||
//----------------------------------------------
|
||||
useEffect(() => {
|
||||
const fetchData = () => {
|
||||
|
||||
Reference in New Issue
Block a user