LED Alarm in Kabelüberwachung
This commit is contained in:
@@ -119,21 +119,31 @@ function Kabelueberwachung() {
|
||||
</div>
|
||||
|
||||
<div className="flex flex-row space-x-4 scale-110 ml-[5%] mt-[5%]">
|
||||
{racks[`rack${activeRack}`].map((slot, index) => (
|
||||
<div key={index} className="flex">
|
||||
<Kue705FO
|
||||
isolationswert={slot.isolationswert}
|
||||
schleifenwiderstand={slot.schleifenwiderstand}
|
||||
modulName={slot.modulName}
|
||||
kueOnline={slot.kueOnlineStatus}
|
||||
slotIndex={index + (activeRack - 1) * 8}
|
||||
/>
|
||||
{console.log(
|
||||
`Module Data (Rack ${activeRack}, Slot ${index + 1}):`,
|
||||
slot
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
{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 (
|
||||
<div key={index} className="flex">
|
||||
<Kue705FO
|
||||
isolationswert={slot.isolationswert}
|
||||
schleifenwiderstand={slot.schleifenwiderstand}
|
||||
modulName={slot.modulName}
|
||||
kueOnline={slot.kueOnlineStatus}
|
||||
alarmStatus={alarmStatus} // Pass the calculated alarm status
|
||||
slotIndex={slotIndex}
|
||||
/>
|
||||
{console.log(
|
||||
`Module Data (Rack ${activeRack}, Slot ${index + 1}):`,
|
||||
slot
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user