@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* modules/dashboard/list.php
|
||||
* Dashboard / Startseite - Uebersicht ueber alle Komponenten
|
||||
* Dashboard / Startseite - Übersicht über alle Komponenten
|
||||
*/
|
||||
|
||||
$stats = [
|
||||
@@ -263,7 +263,7 @@ foreach ($rackLinksByKey as $entry) {
|
||||
<button type="button" class="button button-small" data-topology-zoom="reset">Reset</button>
|
||||
</div>
|
||||
</div>
|
||||
<p class="topology-wall__hint">Hierarchie: Standort → Gebaeude → Stockwerk → Rack → Geraet. Linien zeigen Rack-Verbindungen (dicker = mehr Links).</p>
|
||||
<p class="topology-wall__hint">Hierarchie: Standort → Gebäude → Stockwerk → Rack → Gerät. Linien zeigen Rack-Verbindungen (dicker = mehr Links).</p>
|
||||
|
||||
<svg id="dashboard-topology-svg" viewBox="0 0 2400 1400" role="img" aria-label="Topologie-Wand">
|
||||
<rect id="dashboard-topology-bg" x="0" y="0" width="2400" height="1400" class="topology-bg" fill="#f7faff"></rect>
|
||||
@@ -272,12 +272,12 @@ foreach ($rackLinksByKey as $entry) {
|
||||
<g id="dashboard-topology-layer"></g>
|
||||
</svg>
|
||||
|
||||
<div id="dashboard-topology-empty" class="topology-empty" hidden>Keine Geraete vorhanden. Bitte zuerst Geraete erfassen.</div>
|
||||
<div id="dashboard-topology-empty" class="topology-empty" hidden>Keine Geräte vorhanden. Bitte zuerst Geräte erfassen.</div>
|
||||
|
||||
<aside id="dashboard-topology-overlay" class="topology-overlay" hidden>
|
||||
<div class="topology-overlay__header">
|
||||
<h3 data-topology-title>Rack-Detail</h3>
|
||||
<button type="button" class="button button-small" data-topology-close>Schliessen</button>
|
||||
<button type="button" class="button button-small" data-topology-close>Schließen</button>
|
||||
</div>
|
||||
<p data-topology-meta></p>
|
||||
<p data-topology-rack-link></p>
|
||||
@@ -295,13 +295,13 @@ foreach ($rackLinksByKey as $entry) {
|
||||
|
||||
<div class="stat-card">
|
||||
<h3><?php echo (int)$stats['device_types']; ?></h3>
|
||||
<p>Geraetetypen</p>
|
||||
<p>Gerätetypen</p>
|
||||
<a href="?module=device_types&action=list">Verwalten -></a>
|
||||
</div>
|
||||
|
||||
<div class="stat-card">
|
||||
<h3><?php echo (int)$stats['devices']; ?></h3>
|
||||
<p>Geraete</p>
|
||||
<p>Geräte</p>
|
||||
<a href="?module=devices&action=list">Verwalten -></a>
|
||||
</div>
|
||||
|
||||
@@ -312,7 +312,7 @@ foreach ($rackLinksByKey as $entry) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>Zuletzt hinzugefuegt</h2>
|
||||
<h2>Zuletzt hinzugefügt</h2>
|
||||
<?php if (!empty($recentDevices)): ?>
|
||||
<table class="recent-devices">
|
||||
<thead>
|
||||
@@ -337,7 +337,7 @@ foreach ($rackLinksByKey as $entry) {
|
||||
</tbody>
|
||||
</table>
|
||||
<?php else: ?>
|
||||
<p><em>Noch keine Geraete vorhanden. <a href="?module=device_types&action=list">Starten Sie mit Geraetetypen</a>.</em></p>
|
||||
<p><em>Noch keine Geräte vorhanden. <a href="?module=device_types&action=list">Starten Sie mit Gerätetypen</a>.</em></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
@@ -482,7 +482,7 @@ foreach ($rackLinksByKey as $entry) {
|
||||
const locationId = Number(entry.location_id || 0);
|
||||
const locationName = (entry.location_name || '').trim() || 'Ohne Standort';
|
||||
const buildingId = Number(entry.building_id || 0);
|
||||
const buildingName = (entry.building_name || '').trim() || 'Ohne Gebaeude';
|
||||
const buildingName = (entry.building_name || '').trim() || 'Ohne Gebäude';
|
||||
const floorId = Number(entry.floor_id || 0);
|
||||
const floorName = (entry.floor_name || '').trim() || 'Ohne Stockwerk';
|
||||
const rackId = Number(entry.rack_id || 0);
|
||||
@@ -599,7 +599,7 @@ foreach ($rackLinksByKey as $entry) {
|
||||
rack_id: Number(device.rack_id || 0),
|
||||
rack_name: device.rack_name || 'Ohne Rack',
|
||||
floor_name: device.floor_name || 'Ohne Stockwerk',
|
||||
building_name: device.building_name || 'Ohne Gebaeude',
|
||||
building_name: device.building_name || 'Ohne Gebäude',
|
||||
location_name: device.location_name || 'Ohne Standort',
|
||||
device_id: Number(device.device_id || 0),
|
||||
device_name: device.device_name || 'Unbenannt',
|
||||
@@ -668,7 +668,7 @@ foreach ($rackLinksByKey as $entry) {
|
||||
overlayMeta.textContent = `${item.from_name} <-> ${item.to_name} | Anzahl: ${item.count}`;
|
||||
if (item.sample_connection_id > 0) {
|
||||
overlayRackLink.innerHTML = `<a href="?module=connections&action=edit&id=${item.sample_connection_id}">Verbindung bearbeiten</a>`;
|
||||
overlayDeviceLink.innerHTML = `<a href="?module=connections&action=delete&id=${item.sample_connection_id}" onclick="return confirm('Diese Verbindung wirklich loeschen?');">Verbindung entfernen</a>`;
|
||||
overlayDeviceLink.innerHTML = `<a href="?module=connections&action=delete&id=${item.sample_connection_id}" onclick="return confirm('Diese Verbindung wirklich löschen?');">Verbindung entfernen</a>`;
|
||||
}
|
||||
overlay.hidden = false;
|
||||
return;
|
||||
@@ -676,9 +676,9 @@ foreach ($rackLinksByKey as $entry) {
|
||||
|
||||
if (item.kind === 'port') {
|
||||
overlayTitle.textContent = `Port: ${item.port_name}`;
|
||||
overlayMeta.textContent = `Geraet: ${item.device_name} | Rack: ${item.rack_name} | Stockwerk: ${item.floor_name}`;
|
||||
overlayMeta.textContent = `Gerät: ${item.device_name} | Rack: ${item.rack_name} | Stockwerk: ${item.floor_name}`;
|
||||
if (item.device_id > 0) {
|
||||
overlayRackLink.innerHTML = `<a href="?module=devices&action=edit&id=${item.device_id}">Geraet bearbeiten</a>`;
|
||||
overlayRackLink.innerHTML = `<a href="?module=devices&action=edit&id=${item.device_id}">Gerät bearbeiten</a>`;
|
||||
if (item.port_id > 0 && !item.is_connected) {
|
||||
overlayDeviceLink.innerHTML = `<a href="?module=connections&action=edit&port_a_type=device&port_a_id=${item.port_id}&port_b_type=patchpanel">Mit Patchfeld verbinden</a>`;
|
||||
} else {
|
||||
@@ -686,7 +686,7 @@ foreach ($rackLinksByKey as $entry) {
|
||||
}
|
||||
}
|
||||
if (item.port_id > 0) {
|
||||
overlayActions.innerHTML = `<a class="button button-small" href="?module=devices&action=edit&id=${item.device_id}">Port im Geraet aendern</a>`;
|
||||
overlayActions.innerHTML = `<a class="button button-small" href="?module=devices&action=edit&id=${item.device_id}">Port im Gerät ändern</a>`;
|
||||
}
|
||||
overlay.hidden = false;
|
||||
return;
|
||||
@@ -694,19 +694,19 @@ foreach ($rackLinksByKey as $entry) {
|
||||
|
||||
overlayTitle.textContent = item.rack_name || 'Ohne Rack';
|
||||
const typeLabel = item.device_type_name ? ` (${item.device_type_name})` : '';
|
||||
overlayMeta.textContent = `Standort: ${item.location_name} | Gebaeude: ${item.building_name} | Stockwerk: ${item.floor_name} | Geraet: ${item.device_name}${typeLabel}`;
|
||||
overlayMeta.textContent = `Standort: ${item.location_name} | Gebäude: ${item.building_name} | Stockwerk: ${item.floor_name} | Gerät: ${item.device_name}${typeLabel}`;
|
||||
|
||||
if (item.rack_id > 0) {
|
||||
overlayRackLink.innerHTML = `<a href="?module=racks&action=edit&id=${item.rack_id}">Rack bearbeiten</a>`;
|
||||
} else {
|
||||
overlayRackLink.textContent = 'Kein Rack verknuepft';
|
||||
overlayRackLink.textContent = 'Kein Rack verknüpft';
|
||||
}
|
||||
|
||||
if (item.device_id > 0) {
|
||||
overlayDeviceLink.innerHTML = `<a href="?module=devices&action=edit&id=${item.device_id}">Geraet bearbeiten</a>`;
|
||||
overlayDeviceLink.innerHTML = `<a href="?module=devices&action=edit&id=${item.device_id}">Gerät bearbeiten</a>`;
|
||||
overlayActions.innerHTML = `
|
||||
<a class="button button-small" href="?module=devices&action=edit&id=${item.device_id}">Editieren</a>
|
||||
<a class="button button-small button-danger" href="?module=devices&action=delete&id=${item.device_id}&force=1" onclick="return confirm('Dieses Geraet wirklich loeschen?');">Entfernen</a>
|
||||
<a class="button button-small button-danger" href="?module=devices&action=delete&id=${item.device_id}&force=1" onclick="return confirm('Dieses Gerät wirklich löschen?');">Entfernen</a>
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* app/modules/floor_infrastructure/list.php
|
||||
*
|
||||
* Uebersicht ueber Patchpanels und Netzwerkbuchsen auf Stockwerken.
|
||||
* Übersicht über Patchpanels und Netzwerkbuchsen auf Stockwerken.
|
||||
*/
|
||||
|
||||
$floorId = (int)($_GET['floor_id'] ?? 0);
|
||||
@@ -108,10 +108,10 @@ if ($editorFloor) {
|
||||
|
||||
<div class="toolbar">
|
||||
<a href="?module=floor_infrastructure&action=edit&type=patchpanel" class="button button-primary">
|
||||
+ Patchpanel hinzufuegen
|
||||
+ Patchpanel hinzufügen
|
||||
</a>
|
||||
<a href="?module=floor_infrastructure&action=edit&type=outlet" class="button">
|
||||
+ Wandbuchse hinzufuegen
|
||||
+ Wandbuchse hinzufügen
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -120,7 +120,7 @@ if ($editorFloor) {
|
||||
<input type="hidden" name="action" value="list">
|
||||
|
||||
<select name="floor_id" id="infra-floor-select">
|
||||
<option value="">- Stockwerk waehlen -</option>
|
||||
<option value="">- Stockwerk wählen -</option>
|
||||
<?php foreach ($floors as $floor): ?>
|
||||
<option value="<?php echo (int)$floor['id']; ?>" <?php echo ((int)$floor['id'] === $floorId) ? 'selected' : ''; ?>>
|
||||
<?php echo htmlspecialchars((string)$floor['name']); ?>
|
||||
@@ -129,20 +129,20 @@ if ($editorFloor) {
|
||||
</select>
|
||||
|
||||
<button class="button" type="submit">Filter</button>
|
||||
<a href="?module=floor_infrastructure&action=list" class="button">Zuruecksetzen</a>
|
||||
<a href="?module=floor_infrastructure&action=list" class="button">Zurücksetzen</a>
|
||||
</form>
|
||||
|
||||
<section class="infra-plan">
|
||||
<h2>Stockwerkskarte</h2>
|
||||
<?php if ($floorId <= 0): ?>
|
||||
<p class="empty-state">Bitte ein Stockwerk auswaehlen, um die Karte anzuzeigen.</p>
|
||||
<p class="empty-state">Bitte ein Stockwerk auswählen, um die Karte anzuzeigen.</p>
|
||||
<?php elseif (!$editorFloor): ?>
|
||||
<p class="empty-state">Gewaehltes Stockwerk wurde nicht gefunden.</p>
|
||||
<p class="empty-state">Gewähltes Stockwerk wurde nicht gefunden.</p>
|
||||
<?php elseif (($editorFloor['svg_url'] ?? '') === ''): ?>
|
||||
<p class="empty-state">Das gewaehlte Stockwerk hat keinen SVG-Plan hinterlegt.</p>
|
||||
<p class="empty-state">Das gewählte Stockwerk hat keinen SVG-Plan hinterlegt.</p>
|
||||
<?php else: ?>
|
||||
<p>
|
||||
Read-only Vorschau fuer <strong><?php echo htmlspecialchars((string)$editorFloor['name']); ?></strong>.
|
||||
Read-only Vorschau für <strong><?php echo htmlspecialchars((string)$editorFloor['name']); ?></strong>.
|
||||
Alle Objekte werden angezeigt; Hover zeigt Details.
|
||||
</p>
|
||||
<div id="infra-floor-canvas"
|
||||
@@ -152,7 +152,7 @@ if ($editorFloor) {
|
||||
<img src="<?php echo htmlspecialchars((string)$editorFloor['svg_url']); ?>" class="infra-floor-svg" alt="Stockwerksplan">
|
||||
<svg id="infra-floor-overlay" class="infra-floor-overlay" viewBox="0 0 1 1" preserveAspectRatio="xMidYMid meet" aria-hidden="true"></svg>
|
||||
</div>
|
||||
<p class="floor-plan-hint">Blau: Patchpanel | Gruen: Wandbuchse. Hover zeigt Name, Raum und Ports (Browser-Tooltip).</p>
|
||||
<p class="floor-plan-hint">Blau: Patchpanel | Grün: Wandbuchse. Hover zeigt Name, Raum und Ports (Browser-Tooltip).</p>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
|
||||
@@ -165,7 +165,7 @@ if ($editorFloor) {
|
||||
<th>Name</th>
|
||||
<th>Stockwerk</th>
|
||||
<th>Position</th>
|
||||
<th>Groesse</th>
|
||||
<th>Größe</th>
|
||||
<th>Ports</th>
|
||||
<th>Aktionen</th>
|
||||
</tr>
|
||||
@@ -186,7 +186,7 @@ if ($editorFloor) {
|
||||
data-delete-id="<?php echo (int)$panel['id']; ?>"
|
||||
data-delete-type="patchpanel"
|
||||
data-delete-label="<?php echo htmlspecialchars((string)$panel['name'], ENT_QUOTES, 'UTF-8'); ?>">
|
||||
Loeschen
|
||||
Löschen
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -239,7 +239,7 @@ if ($editorFloor) {
|
||||
data-delete-id="<?php echo (int)$outlet['id']; ?>"
|
||||
data-delete-type="outlet"
|
||||
data-delete-label="<?php echo htmlspecialchars((string)$outlet['name'], ENT_QUOTES, 'UTF-8'); ?>">
|
||||
Loeschen
|
||||
Löschen
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -264,7 +264,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
}
|
||||
|
||||
const entityLabel = type === 'patchpanel' ? 'Patchpanel' : 'Wandbuchse';
|
||||
if (!confirm(entityLabel + ' "' + label + '" wirklich loeschen?')) {
|
||||
if (!confirm(entityLabel + ' "' + label + '" wirklich löschen?')) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -279,9 +279,9 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
window.location.reload();
|
||||
return;
|
||||
}
|
||||
alert((data && data.message) ? data.message : 'Loeschen fehlgeschlagen');
|
||||
alert((data && data.message) ? data.message : 'Löschen fehlgeschlagen');
|
||||
})
|
||||
.catch(() => alert('Loeschen fehlgeschlagen'));
|
||||
.catch(() => alert('Löschen fehlgeschlagen'));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user