{
"event": "PreToolUse",
"tool_name": "Write",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/View\/crawler\/index.php",
"content": "<?php\n\ndeclare(strict_types=1);\n\n\/\/ @responsibility: View-Template fuer Crawler-Liste\n\n\/** @var array<\\Domain\\Crawler\\CrawlSummary> $crawls *\/\n\/** @var string $title *\/\n\/** @var string $csrfToken *\/\n$layout = __DIR__ . '\/..\/layout.php';\nob_start();\n?>\n<div class=\"crawler-page\">\n <header class=\"crawler-page__header\">\n <h1><?= htmlspecialchars($title) ?><\/h1>\n <form hx-post=\"\/crawler\/trigger\"\n hx-headers='{\"X-CSRF-TOKEN\": \"<?= htmlspecialchars($csrfToken) ?>\"}'\n hx-target=\"#htmx-messages\"\n hx-swap=\"beforeend\"\n class=\"crawler-trigger\">\n <input type=\"url\" name=\"base_url\" placeholder=\"https:\/\/example.com\/\" required>\n <select name=\"mode\">\n <option value=\"fast\">fast<\/option>\n <option value=\"full\">full<\/option>\n <option value=\"hybrid\">hybrid<\/option>\n <\/select>\n <button type=\"submit\">Crawl starten<\/button>\n <\/form>\n <\/header>\n <div id=\"htmx-messages\"><\/div>\n\n <?php if ($crawls === []): ?>\n <p>Noch keine Crawls vorhanden.<\/p>\n <?php else: ?>\n <table class=\"crawler-table\">\n <thead>\n <tr>\n <th>ID<\/th><th>Base-URL<\/th><th>Modus<\/th><th>Status<\/th>\n <th>Gestartet<\/th><th>Beendet<\/th><th>URLs<\/th><th>Fehler<\/th><th><\/th>\n <\/tr>\n <\/thead>\n <tbody>\n <?php foreach ($crawls as $c): ?>\n <tr>\n <td><?= $c->id ?><\/td>\n <td><?= htmlspecialchars($c->baseUrl) ?><\/td>\n <td><?= htmlspecialchars($c->mode) ?><\/td>\n <td><?= htmlspecialchars($c->status) ?><\/td>\n <td><?= htmlspecialchars($c->startedAt) ?><\/td>\n <td><?= htmlspecialchars($c->finishedAt ?? '—') ?><\/td>\n <td><?= $c->totalUrls ?><\/td>\n <td><?= $c->totalErrors ?><\/td>\n <td>\n <a href=\"\/crawler\/<?= $c->id ?>\">Details<\/a> |\n <a href=\"\/crawler\/<?= $c->id ?>\/errors\">Fehler<\/a>\n <\/td>\n <\/tr>\n <?php endforeach; ?>\n <\/tbody>\n <\/table>\n <?php endif; ?>\n<\/div>\n<?php\n$content = ob_get_clean();\nrequire $layout;\n"
}
}
{
"tool_response": {
"type": "create",
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/View\/crawler\/index.php",
"content": "<?php\n\ndeclare(strict_types=1);\n\n\/\/ @responsibility: View-Template fuer Crawler-Liste\n\n\/** @var array<\\Domain\\Crawler\\CrawlSummary> $crawls *\/\n\/** @var string $title *\/\n\/** @var string $csrfToken *\/\n$layout = __DIR__ . '\/..\/layout.php';\nob_start();\n?>\n<div class=\"crawler-page\">\n <header class=\"crawler-page__header\">\n <h1><?= htmlspecialchars($title) ?><\/h1>\n <form hx-post=\"\/crawler\/trigger\"\n hx-headers='{\"X-CSRF-TOKEN\": \"<?= htmlspecialchars($csrfToken) ?>\"}'\n hx-target=\"#htmx-messages\"\n hx-swap=\"beforeend\"\n class=\"crawler-trigger\">\n <input type=\"url\" name=\"base_url\" placeholder=\"https:\/\/example.com\/\" required>\n <select name=\"mode\">\n <option value=\"fast\">fast<\/option>\n <option value=\"full\">full<\/option>\n <option value=\"hybrid\">hybrid<\/option>\n <\/select>\n <button type=\"submit\">Crawl starten<\/button>\n <\/form>\n <\/header>\n <div id=\"htmx-messages\"><\/div>\n\n <?php if ($crawls === []): ?>\n <p>Noch keine Crawls vorhanden.<\/p>\n <?php else: ?>\n <table class=\"crawler-table\">\n <thead>\n <tr>\n <th>ID<\/th><th>Base-URL<\/th><th>Modus<\/th><th>Status<\/th>\n <th>Gestartet<\/th><th>Beendet<\/th><th>URLs<\/th><th>Fehler<\/th><th><\/th>\n <\/tr>\n <\/thead>\n <tbody>\n <?php foreach ($crawls as $c): ?>\n <tr>\n <td><?= $c->id ?><\/td>\n <td><?= htmlspecialchars($c->baseUrl) ?><\/td>\n <td><?= htmlspecialchars($c->mode) ?><\/td>\n <td><?= htmlspecialchars($c->status) ?><\/td>\n <td><?= htmlspecialchars($c->startedAt) ?><\/td>\n <td><?= htmlspecialchars($c->finishedAt ?? '—') ?><\/td>\n <td><?= $c->totalUrls ?><\/td>\n <td><?= $c->totalErrors ?><\/td>\n <td>\n <a href=\"\/crawler\/<?= $c->id ?>\">Details<\/a> |\n <a href=\"\/crawler\/<?= $c->id ?>\/errors\">Fehler<\/a>\n <\/td>\n <\/tr>\n <?php endforeach; ?>\n <\/tbody>\n <\/table>\n <?php endif; ?>\n<\/div>\n<?php\n$content = ob_get_clean();\nrequire $layout;\n",
"structuredPatch": [],
"originalFile": null,
"userModified": false
}
}