devices anlegen

This commit is contained in:
2026-02-11 15:46:50 +01:00
parent a6b56ffd75
commit 699ffe3d6b
6 changed files with 101 additions and 21 deletions

View File

@@ -51,16 +51,17 @@ $whereSql = $where ? 'WHERE ' . implode(' AND ', $where) : '';
// =========================
// Geräte laden
// =========================
$devices = $sql->get(
"
SELECT
d.id,
d.name,
d.serial_number,
d.rack_position_he,
d.rack_height_he,
dt.name AS device_type,
dt.image_path,
$devices = $sql->get(
"
SELECT
d.id,
d.name,
d.serial_number,
d.rack_position_he,
d.rack_height_he,
d.web_config_url,
dt.name AS device_type,
dt.image_path,
f.name AS floor_name,
r.name AS rack_name
FROM devices d
@@ -148,6 +149,7 @@ $racks = $sql->get("SELECT id, name FROM racks ORDER BY name", "", []);
<th>Rack</th>
<th>Position (HE)</th>
<th>Seriennummer</th>
<th>Webconfig</th>
<th>Aktionen</th>
</tr>
</thead>
@@ -187,6 +189,16 @@ $racks = $sql->get("SELECT id, name FROM racks ORDER BY name", "", []);
<small><?php echo htmlspecialchars($d['serial_number'] ?? '—'); ?></small>
</td>
<td>
<?php if (!empty($d['web_config_url'])): ?>
<a href="<?php echo htmlspecialchars($d['web_config_url']); ?>" target="_blank" rel="noopener noreferrer" class="button button-small">
Webconfig
</a>
<?php else: ?>
<?php endif; ?>
</td>
<td class="actions">
<a href="?module=devices&action=edit&id=<?php echo $d['id']; ?>" class="button button-small">Bearbeiten</a>
<a href="#" class="button button-small button-danger" onclick="confirmDelete(<?php echo $d['id']; ?>)">Löschen</a>