">
Description
Type
Model
Depth
Location
Physical Location
Notes
U
Device
= 1; $i--) {
// Find all devices that occupy the current unit $i
$unit_devices = [];
foreach ($rack_units_data as $unit_data) {
$start = (int) $unit_data['unit_start_number'];
$end = (int) $unit_data['unit_end_number'];
// If $i is between start and end, device occupies this unit
if ($i >= $start && $i <= $end) {
$unit_devices[] = [
'unit_id' => (int) $unit_data['unit_id'],
'unit_device' => nullable_htmlentities($unit_data['unit_device']),
'unit_start_number'=> $start,
'unit_end_number' => $end,
'asset_id' => (int) $unit_data['asset_id'],
'asset_name' => nullable_htmlentities($unit_data['asset_name']),
'asset_type' => nullable_htmlentities($unit_data['asset_type']),
'icon' => getAssetIcon($unit_data['asset_type'])
];
}
}
?>
1) {
// If your data might have multiple devices in the same row,
// you have to decide how to handle them.
// For now, we can fallback to older logic or display them all in one cell, etc.
?>
No device