[split-required] Split 500-850 LOC files (batch 2)

backend-lehrer (10 files):
- game/database.py (785 → 5), correction_api.py (683 → 4)
- classroom_engine/antizipation.py (676 → 5)
- llm_gateway schools/edu_search already done in prior batch

klausur-service (12 files):
- orientation_crop_api.py (694 → 5), pdf_export.py (677 → 4)
- zeugnis_crawler.py (676 → 5), grid_editor_api.py (671 → 5)
- eh_templates.py (658 → 5), mail/api.py (651 → 5)
- qdrant_service.py (638 → 5), training_api.py (625 → 4)

website (6 pages):
- middleware (696 → 8), mail (733 → 6), consent (628 → 8)
- compliance/risks (622 → 5), export (502 → 5), brandbook (629 → 7)

studio-v2 (3 components):
- B2BMigrationWizard (848 → 3), CleanupPanel (765 → 2)
- dashboard-experimental (739 → 2)

admin-lehrer (4 files):
- uebersetzungen (769 → 4), manager (670 → 2)
- ChunkBrowserQA (675 → 6), dsfa/page (674 → 5)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-04-25 08:24:01 +02:00
parent 34da9f4cda
commit b4613e26f3
118 changed files with 15258 additions and 14680 deletions

View File

@@ -0,0 +1,69 @@
'use client'
import type { MiddlewareHookReturn } from './types'
interface LoggingTabProps {
hook: MiddlewareHookReturn
}
export default function LoggingTab({ hook }: LoggingTabProps) {
return (
<div className="space-y-6">
<div className="bg-white rounded-lg shadow p-6">
<h3 className="text-lg font-medium mb-4">PII Redaction Settings</h3>
{(() => {
const config = hook.getConfig('pii_redactor')
if (!config) return <p>Loading...</p>
const patterns = config.config.patterns || ['email', 'ip_v4', 'ip_v6', 'phone_de']
const allPatterns = ['email', 'ip_v4', 'ip_v6', 'phone_de', 'phone_intl', 'iban', 'uuid', 'name_prefix', 'student_id']
return (
<div className="space-y-4">
<p className="text-sm text-gray-500">
Select which PII patterns to redact from logs (DSGVO compliance)
</p>
<div className="grid grid-cols-2 md:grid-cols-3 gap-2">
{allPatterns.map((pattern) => (
<label key={pattern} className="flex items-center space-x-2">
<input
type="checkbox"
checked={patterns.includes(pattern)}
onChange={(e) => {
const newPatterns = e.target.checked
? [...patterns, pattern]
: patterns.filter((p: string) => p !== pattern)
hook.updateConfig('pii_redactor', { ...config.config, patterns: newPatterns })
}}
className="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"
/>
<span className="text-sm">{pattern.replace('_', ' ')}</span>
</label>
))}
</div>
</div>
)
})()}
</div>
<div className="bg-white rounded-lg shadow p-6">
<h3 className="text-lg font-medium mb-4">Request-ID Configuration</h3>
{(() => {
const config = hook.getConfig('request_id')
if (!config) return <p>Loading...</p>
return (
<div>
<label className="block text-sm font-medium text-gray-700">Header Name</label>
<input
type="text"
value={config.config.header_name || 'X-Request-ID'}
onChange={(e) => {
hook.updateConfig('request_id', { ...config.config, header_name: e.target.value })
}}
className="mt-1 block w-full max-w-xs rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500"
/>
</div>
)
})()}
</div>
</div>
)
}