show.php
- Pfad:
src/View/system-explorer/seiten/show.php
- Namespace: -
- Zeilen: 108 | Größe: 3,914 Bytes
- Geändert: 2025-12-20 14:50:15 | Gescannt: 2025-12-31 10:22:15
Code Hygiene Score: 99
- Dependencies: 100 (25%)
- LOC: 100 (20%)
- Methods: 100 (20%)
- Secrets: 100 (15%)
- Classes: 100 (10%)
- Magic Numbers: 90 (10%)
Issues 1
| Zeile |
Typ |
Beschreibung |
| 91 |
magic_number |
Magic Number gefunden: 100 |
Code
<?php ob_start(); ?>
<nav class="breadcrumb">
<a href="/">Home</a> » <a href="/explorer">Explorer</a> » <a href="/system-explorer">System Explorer</a> » <a href="/system-explorer/seiten">Seiten</a> »
<?php foreach ($breadcrumb as $i => $b): ?>
<?php if ($i < count($breadcrumb) - 1): ?>
<a href="/system-explorer/<?= $b['depth'] == 0 ? 'dokumente' : 'seiten' ?>/<?= $b['id'] ?>"><?= htmlspecialchars($b['title']) ?></a> »
<?php else: ?>
<?= htmlspecialchars($b['title']) ?>
<?php endif; ?>
<?php endforeach; ?>
</nav>
<h1><?= htmlspecialchars($seite['title']) ?></h1>
<p><code><?= htmlspecialchars($seite['path']) ?></code></p>
<div class="stats-grid">
<div class="stat-card stat-card--info">
<span class="stat-card__value"><?= $seite['depth'] ?></span>
<span class="stat-card__label">Tiefe</span>
</div>
<div class="stat-card stat-card--success">
<span class="stat-card__value"><?= count($chunks) ?></span>
<span class="stat-card__label">Chunks</span>
</div>
<div class="stat-card">
<span class="stat-card__value"><?= count($unterseiten) ?></span>
<span class="stat-card__label">Unterseiten</span>
</div>
</div>
<?php if (!empty($unterseiten)): ?>
<h2>Unterseiten</h2>
<table>
<thead>
<tr>
<th>Titel</th>
<th>Pfad</th>
<th>Tiefe</th>
<th>Aktionen</th>
</tr>
</thead>
<tbody>
<?php foreach ($unterseiten as $u): ?>
<tr>
<td><a href="/system-explorer/seiten/<?= $u['id'] ?>"><?= htmlspecialchars($u['title']) ?></a></td>
<td><code><?= htmlspecialchars($u['path']) ?></code></td>
<td><?= $u['depth'] ?></td>
<td>
<a href="/system-explorer/seiten/<?= $u['id'] ?>" class="btn btn--small btn--primary">Details</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
<?php if (!empty($chunks)): ?>
<h2>Chunks</h2>
<table>
<thead>
<tr>
<th>Index</th>
<th>Kategorie</th>
<th>Tokens</th>
<th>Status</th>
<th>Analysiert</th>
<th>Inhalt</th>
</tr>
</thead>
<tbody>
<?php foreach ($chunks as $c): ?>
<tr>
<td><a href="/system-explorer/chunks/<?= $c['id'] ?>">#<?= $c['chunk_index'] ?></a></td>
<td>
<?php if ($c['taxonomy_category']): ?>
<span class="badge"><?= htmlspecialchars($c['taxonomy_category']) ?></span>
<?php endif; ?>
</td>
<td><?= $c['token_count'] ?></td>
<td>
<?php if ($c['qdrant_id']): ?>
<span class="badge badge--success">synced</span>
<?php elseif ($c['analysis_status'] === 'completed'): ?>
<span class="badge badge--info">analyzed</span>
<?php else: ?>
<span class="badge"><?= $c['analysis_status'] ?></span>
<?php endif; ?>
</td>
<td><?= $c['analyzed_at'] ? date('d.m.Y H:i', strtotime($c['analyzed_at'])) : '-' ?></td>
<td><?= htmlspecialchars(substr(strip_tags($c['content']), 0, 100)) ?>...</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
<p class="links-bar">
<a href="/system-explorer/seiten">Alle Seiten</a> |
<a href="/docs/<?= htmlspecialchars($seite['path']) ?>">In Docs anzeigen</a>
<?php if ($seite['parent_id']): ?>
| <a href="/system-explorer/<?= $seite['depth'] == 1 ? 'dokumente' : 'seiten' ?>/<?= $seite['parent_id'] ?>">Zurück zu <?= htmlspecialchars($seite['parent_title']) ?></a>
<?php endif; ?>
</p>
<?php $content = ob_get_clean(); ?>
<?php require VIEW_PATH . '/layout.php'; ?>