diff --git a/app/kabelueberwachung/page.jsx b/app/kabelueberwachung/page.jsx index c85443f..179e2de 100644 --- a/app/kabelueberwachung/page.jsx +++ b/app/kabelueberwachung/page.jsx @@ -119,21 +119,31 @@ function Kabelueberwachung() {
- {racks[`rack${activeRack}`].map((slot, index) => ( -
- - {console.log( - `Module Data (Rack ${activeRack}, Slot ${index + 1}):`, - slot - )} -
- ))} + {racks[`rack${activeRack}`].map((slot, index) => { + const slotIndex = index + (activeRack - 1) * 8; + const alarmStatus = + (window.kueAlarm1 && window.kueAlarm1[slotIndex]) || + (window.kueAlarm2 && window.kueAlarm2[slotIndex]) || + (window.kueCableBreak && window.kueCableBreak[slotIndex]) || + (window.kueGroundFault && window.kueGroundFault[slotIndex]); + + return ( +
+ + {console.log( + `Module Data (Rack ${activeRack}, Slot ${index + 1}):`, + slot + )} +
+ ); + })}
); diff --git a/components/modules/Kue705FO.jsx b/components/modules/Kue705FO.jsx index 35efffc..8b5136f 100644 --- a/components/modules/Kue705FO.jsx +++ b/components/modules/Kue705FO.jsx @@ -13,6 +13,7 @@ function Kue705FO({ kueOnline, slotIndex, tdrLocation, + alarmStatus, }) { const [currentModulName, setCurrentModulName] = useState(modulName); const [activeButton, setActiveButton] = useState("Schleife"); @@ -177,6 +178,11 @@ function Kue705FO({ } */ //------------------------------------------------- let slot = slotIndex; + const alarmStatus = + (window.kueAlarm1 && window.kueAlarm1[slotIndex]) || + (window.kueAlarm2 && window.kueAlarm2[slotIndex]) || + (window.kueCableBreak && window.kueCableBreak[slotIndex]) || + (window.kueGroundFault && window.kueGroundFault[slotIndex]); if (slot >= 32) { return; @@ -307,12 +313,7 @@ function Kue705FO({
Alarm