{
"event": "PreToolUse",
"tool_name": "Write",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/View\/backup-restore\/index.php",
"content": "<?php ob_start(); ?>\n\n<h1>File Backup<\/h1>\n\n<div class=\"stats-grid\">\n <div class=\"stat-card\">\n <span class=\"stat-card__value\"><?= $stats['total'] ?? 0 ?><\/span>\n <span class=\"stat-card__label\">Backups<\/span>\n <\/div>\n <div class=\"stat-card stat-card--info\">\n <span class=\"stat-card__value\"><?= $stats['files'] ?? 0 ?><\/span>\n <span class=\"stat-card__label\">Dateien<\/span>\n <\/div>\n <div class=\"stat-card stat-card--warning\">\n <span class=\"stat-card__value\"><?= $stats['modified'] ?? 0 ?><\/span>\n <span class=\"stat-card__label\">Geändert<\/span>\n <\/div>\n <div class=\"stat-card stat-card--success\">\n <span class=\"stat-card__value\"><?= $stats['recent'] ?? 0 ?><\/span>\n <span class=\"stat-card__label\">Letzte 24h<\/span>\n <\/div>\n<\/div>\n\n<h2>Backup-Historie<\/h2>\n<div class=\"filters\">\n <input type=\"search\" id=\"backup-search\" class=\"form-input\" placeholder=\"Dateipfad durchsuchen...\">\n <select id=\"filter-change-type\" class=\"form-select--inline\">\n <option value=\"\">Alle Typen<\/option>\n <option value=\"created\">Erstellt<\/option>\n <option value=\"modified\">Geändert<\/option>\n <\/select>\n<\/div>\n\n<table id=\"backup-table\" data-sortable>\n <thead>\n <tr>\n <th data-sort=\"id\">ID<\/th>\n <th data-sort=\"file_path\">Dateipfad<\/th>\n <th data-sort=\"version\">Version<\/th>\n <th data-sort=\"change_type\">Typ<\/th>\n <th data-sort=\"file_size\">Größe<\/th>\n <th data-sort=\"changed_at\">Datum<\/th>\n <\/tr>\n <\/thead>\n <tbody>\n <?php if (!empty($backups)): ?>\n <?php foreach ($backups as $backup): ?>\n <tr>\n <td><a href=\"\/backup-restore\/<?= $backup['id'] ?>\"><?= $backup['id'] ?><\/a><\/td>\n <td title=\"<?= htmlspecialchars($backup['file_path']) ?>\">\n <a href=\"\/backup-restore\/<?= $backup['id'] ?>\"><?= htmlspecialchars($this->shortenPath($backup['file_path'])) ?><\/a>\n <\/td>\n <td><?= $backup['version'] ?><\/td>\n <td><span class=\"badge badge--<?= $backup['change_type'] ?>\"><?= $backup['change_type'] ?><\/span><\/td>\n <td><?= $this->formatBytes($backup['file_size']) ?><\/td>\n <td><?= substr($backup['changed_at'], 0, 16) ?><\/td>\n <\/tr>\n <?php endforeach; ?>\n <?php else: ?>\n <tr><td colspan=\"6\" class=\"empty-state empty-state--small\">Keine Backups vorhanden<\/td><\/tr>\n <?php endif; ?>\n <\/tbody>\n<\/table>\n\n<p class=\"links-bar\">\n <a href=\"\/docs\/modul\/file-backup-hook\">Dokumentation<\/a>\n<\/p>\n\n<script type=\"module\">\nimport { init } from '\/js\/components\/data-table.js';\n\nconst dataTable = init({\n clock: { now_epoch_ms_utc: () => Date.now() },\n logger: console,\n ui: {\n showMessage: (msg) => { console.log(msg.type + ': ' + msg.text); },\n disableFeature: (key) => { console.warn('Feature disabled: ' + key); },\n offerRetry: () => Promise.resolve(false)\n },\n runId: crypto.randomUUID()\n});\n\ndataTable.create('backup-table', {\n searchInput: 'backup-search',\n pageSize: 20,\n filters: {\n 'filter-change-type': 3\n }\n});\n<\/script>\n\n<?php $content = ob_get_clean(); ?>\n<?php require VIEW_PATH . '\/layout.php'; ?>\n"
}
}
{
"tool_response": {
"type": "create",
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/View\/backup-restore\/index.php",
"content": "<?php ob_start(); ?>\n\n<h1>File Backup<\/h1>\n\n<div class=\"stats-grid\">\n <div class=\"stat-card\">\n <span class=\"stat-card__value\"><?= $stats['total'] ?? 0 ?><\/span>\n <span class=\"stat-card__label\">Backups<\/span>\n <\/div>\n <div class=\"stat-card stat-card--info\">\n <span class=\"stat-card__value\"><?= $stats['files'] ?? 0 ?><\/span>\n <span class=\"stat-card__label\">Dateien<\/span>\n <\/div>\n <div class=\"stat-card stat-card--warning\">\n <span class=\"stat-card__value\"><?= $stats['modified'] ?? 0 ?><\/span>\n <span class=\"stat-card__label\">Geändert<\/span>\n <\/div>\n <div class=\"stat-card stat-card--success\">\n <span class=\"stat-card__value\"><?= $stats['recent'] ?? 0 ?><\/span>\n <span class=\"stat-card__label\">Letzte 24h<\/span>\n <\/div>\n<\/div>\n\n<h2>Backup-Historie<\/h2>\n<div class=\"filters\">\n <input type=\"search\" id=\"backup-search\" class=\"form-input\" placeholder=\"Dateipfad durchsuchen...\">\n <select id=\"filter-change-type\" class=\"form-select--inline\">\n <option value=\"\">Alle Typen<\/option>\n <option value=\"created\">Erstellt<\/option>\n <option value=\"modified\">Geändert<\/option>\n <\/select>\n<\/div>\n\n<table id=\"backup-table\" data-sortable>\n <thead>\n <tr>\n <th data-sort=\"id\">ID<\/th>\n <th data-sort=\"file_path\">Dateipfad<\/th>\n <th data-sort=\"version\">Version<\/th>\n <th data-sort=\"change_type\">Typ<\/th>\n <th data-sort=\"file_size\">Größe<\/th>\n <th data-sort=\"changed_at\">Datum<\/th>\n <\/tr>\n <\/thead>\n <tbody>\n <?php if (!empty($backups)): ?>\n <?php foreach ($backups as $backup): ?>\n <tr>\n <td><a href=\"\/backup-restore\/<?= $backup['id'] ?>\"><?= $backup['id'] ?><\/a><\/td>\n <td title=\"<?= htmlspecialchars($backup['file_path']) ?>\">\n <a href=\"\/backup-restore\/<?= $backup['id'] ?>\"><?= htmlspecialchars($this->shortenPath($backup['file_path'])) ?><\/a>\n <\/td>\n <td><?= $backup['version'] ?><\/td>\n <td><span class=\"badge badge--<?= $backup['change_type'] ?>\"><?= $backup['change_type'] ?><\/span><\/td>\n <td><?= $this->formatBytes($backup['file_size']) ?><\/td>\n <td><?= substr($backup['changed_at'], 0, 16) ?><\/td>\n <\/tr>\n <?php endforeach; ?>\n <?php else: ?>\n <tr><td colspan=\"6\" class=\"empty-state empty-state--small\">Keine Backups vorhanden<\/td><\/tr>\n <?php endif; ?>\n <\/tbody>\n<\/table>\n\n<p class=\"links-bar\">\n <a href=\"\/docs\/modul\/file-backup-hook\">Dokumentation<\/a>\n<\/p>\n\n<script type=\"module\">\nimport { init } from '\/js\/components\/data-table.js';\n\nconst dataTable = init({\n clock: { now_epoch_ms_utc: () => Date.now() },\n logger: console,\n ui: {\n showMessage: (msg) => { console.log(msg.type + ': ' + msg.text); },\n disableFeature: (key) => { console.warn('Feature disabled: ' + key); },\n offerRetry: () => Promise.resolve(false)\n },\n runId: crypto.randomUUID()\n});\n\ndataTable.create('backup-table', {\n searchInput: 'backup-search',\n pageSize: 20,\n filters: {\n 'filter-change-type': 3\n }\n});\n<\/script>\n\n<?php $content = ob_get_clean(); ?>\n<?php require VIEW_PATH . '\/layout.php'; ?>\n",
"structuredPatch": [],
"originalFile": null
}
}