Backup #1624

ID1624
Dateipfad/var/www/dev.campus.systemische-tools.de/src/View/semantic-explorer/semantik.php
Version5
Typ modified
Größe3.9 KB
Hashf299173b6541e6036e46929d47c5a0d7ec7427110b6ce2741286890b05c570a6
Datum2025-12-27 09:44:20
Geändert vonclaude-code-hook
GrundClaude Code Pre-Hook Backup vor Edit-Operation
Datei existiert Ja

Dateiinhalt

<?php ob_start(); ?>

<nav class="breadcrumb">
    <a href="/">Home</a> &raquo; <a href="/explorer">Explorer</a> &raquo; <a href="/semantic-explorer">Semantic Explorer</a> &raquo; Semantik
</nav>

<h1>Semantik</h1>
<p>Begriffe und ihre Bedeutungen aus den verarbeiteten Dokumenten.</p>

<div class="stats-grid">
    <div class="stat-card">
        <span class="stat-card__value"><?= $stats['total'] ?? 0 ?></span>
        <span class="stat-card__label">Begriffe</span>
    </div>
    <div class="stat-card">
        <span class="stat-card__value"><?= $stats['types'] ?? 0 ?></span>
        <span class="stat-card__label">Typen</span>
    </div>
    <div class="stat-card">
        <span class="stat-card__value"><?= $stats['linked_chunks'] ?? 0 ?></span>
        <span class="stat-card__label">Chunks</span>
    </div>
    <div class="stat-card">
        <span class="stat-card__value"><?= $stats['linked_docs'] ?? 0 ?></span>
        <span class="stat-card__label">Dokumente</span>
    </div>
</div>

<div class="filters">
    <input type="search" id="semantics-search" class="form-input" placeholder="Begriff suchen..." value="<?= htmlspecialchars($currentSearch ?? '') ?>">
    <select id="filter-type" class="form-select">
        <option value="">Alle Typen</option>
        <?php foreach ($entityTypes ?? [] as $t): ?>
        <option value="<?= htmlspecialchars($t['type']) ?>" <?= ($currentType ?? '') === $t['type'] ? 'selected' : '' ?>>
            <?= htmlspecialchars($t['type']) ?> (<?= $t['count'] ?>)
        </option>
        <?php endforeach; ?>
    </select>
</div>

<?php if (!empty($semantics)): ?>
<table id="semantics-table" data-sortable>
    <thead>
        <tr>
            <th data-sort="name">Begriff</th>
            <th data-sort="type">Art</th>
            <th data-sort="description">Bedeutung</th>
            <th>Sprache</th>
            <th data-sort="chunk_count">Chunks</th>
            <th data-sort="document_count">Dokumente</th>
            <th>Status</th>
        </tr>
    </thead>
    <tbody>
        <?php foreach ($semantics as $s): ?>
        <tr>
            <td>
                <a href="/semantic-explorer/entitaeten/<?= $s['id'] ?>"><?= htmlspecialchars($s['name']) ?></a>
            </td>
            <td><?= htmlspecialchars($s['type']) ?></td>
            <td><?= htmlspecialchars($s['description'] ?? '-') ?></td>
            <td>de</td>
            <td><?= $s['chunk_count'] ?></td>
            <td><?= $s['document_count'] ?></td>
            <td><?= ($s['status'] ?? '') === 'normalized' ? 'normalisiert' : htmlspecialchars($s['status'] ?? 'roh') ?></td>
        </tr>
        <?php endforeach; ?>
    </tbody>
</table>

<?php if (($totalPages ?? 1) > 1): ?>
<div class="pagination">
    <?php for ($i = 1; $i <= min($totalPages, 10); $i++): ?>
    <a href="?page=<?= $i ?>&search=<?= urlencode($currentSearch ?? '') ?>&type=<?= urlencode($currentType ?? '') ?>"
       class="<?= $i === ($currentPage ?? 1) ? 'active' : '' ?>"><?= $i ?></a>
    <?php endfor; ?>
</div>
<?php endif; ?>

<?php else: ?>
<p class="empty-state">Keine Begriffe gefunden. Verarbeiten Sie Dokumente mit der Pipeline.</p>
<?php endif; ?>

<p class="links-bar">
    <a href="/semantic-explorer">Zurueck zum Explorer</a> |
    <a href="/semantic-explorer/entitaeten">Entitaeten</a>
</p>

<script type="module">
import { init } from '/js/components/data-table.js';

const dataTable = init({
    clock: { now_epoch_ms_utc: () => Date.now() },
    logger: console,
    ui: {
        showMessage: (msg) => { console.log(msg.type + ': ' + msg.text); },
        disableFeature: (key) => { console.warn('Feature disabled: ' + key); },
        offerRetry: () => Promise.resolve(false)
    },
    runId: crypto.randomUUID()
});

dataTable.create('semantics-table', {
    searchInput: 'semantics-search',
    pageSize: 20,
    filters: {
        'filter-type': 1
    }
});
</script>

<?php $content = ob_get_clean(); ?>
<?php require VIEW_PATH . '/layout.php'; ?>

Vollständig herunterladen

Aktionen

Herunterladen

Andere Versionen dieser Datei

ID Version Typ Größe Datum
1632 6 modified 3.9 KB 2025-12-27 09:45
1624 5 modified 3.9 KB 2025-12-27 09:44
1532 4 modified 5.2 KB 2025-12-26 07:18
1525 3 modified 4.4 KB 2025-12-26 06:52
677 2 modified 4.0 KB 2025-12-23 07:01
16 1 modified 4.3 KB 2025-12-20 16:43

← Zurück zur Übersicht