Phase 1 — Python (klausur-service): 5 monoliths → 36 files - dsfa_corpus_ingestion.py (1,828 LOC → 5 files) - cv_ocr_engines.py (2,102 LOC → 7 files) - cv_layout.py (3,653 LOC → 10 files) - vocab_worksheet_api.py (2,783 LOC → 8 files) - grid_build_core.py (1,958 LOC → 6 files) Phase 2 — Go (edu-search-service, school-service): 8 monoliths → 19 files - staff_crawler.go (1,402 → 4), policy/store.go (1,168 → 3) - policy_handlers.go (700 → 2), repository.go (684 → 2) - search.go (592 → 2), ai_extraction_handlers.go (554 → 2) - seed_data.go (591 → 2), grade_service.go (646 → 2) Phase 3 — TypeScript (admin-lehrer): 45 monoliths → 220+ files - sdk/types.ts (2,108 → 16 domain files) - ai/rag/page.tsx (2,686 → 14 files) - 22 page.tsx files split into _components/ + _hooks/ - 11 component files split into sub-components - 10 SDK data catalogs added to loc-exceptions - Deleted dead backup index_original.ts (4,899 LOC) All original public APIs preserved via re-export facades. Zero new errors: Python imports verified, Go builds clean, TypeScript tsc --noEmit shows only pre-existing errors. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
165 lines
5.5 KiB
TypeScript
165 lines
5.5 KiB
TypeScript
'use client'
|
|
|
|
/**
|
|
* Security Dashboard - DevSecOps
|
|
*
|
|
* Security scan results, vulnerability tracking, and compliance status
|
|
* Migrated from old admin (/admin/security)
|
|
*/
|
|
|
|
import { PagePurpose } from '@/components/common/PagePurpose'
|
|
import { DevOpsPipelineSidebarResponsive } from '@/components/infrastructure/DevOpsPipelineSidebar'
|
|
import { useSecurityDashboard } from './useSecurityDashboard'
|
|
import { SecurityHeader } from './_components/SecurityHeader'
|
|
import { OverviewTab } from './_components/OverviewTab'
|
|
import { FindingsTab } from './_components/FindingsTab'
|
|
import { ToolsTab } from './_components/ToolsTab'
|
|
import { HistoryTab } from './_components/HistoryTab'
|
|
import { MonitoringTab } from './_components/MonitoringTab'
|
|
import { DocumentationSection } from './_components/DocumentationSection'
|
|
import type { TabId } from './types'
|
|
|
|
const TAB_LABELS: Record<TabId, string> = {
|
|
overview: 'Uebersicht',
|
|
findings: 'Findings',
|
|
tools: 'Tools',
|
|
history: 'Historie',
|
|
monitoring: 'Monitoring',
|
|
}
|
|
|
|
export default function SecurityDashboardPage() {
|
|
const {
|
|
tools,
|
|
findings,
|
|
filteredFindings,
|
|
summary,
|
|
history,
|
|
loading,
|
|
scanning,
|
|
error,
|
|
activeTab,
|
|
setActiveTab,
|
|
monitoringMetrics,
|
|
activeAlerts,
|
|
severityFilter,
|
|
setSeverityFilter,
|
|
toolFilter,
|
|
setToolFilter,
|
|
showFullDocs,
|
|
setShowFullDocs,
|
|
scanMessage,
|
|
lastScanTime,
|
|
overallStatus,
|
|
runScan,
|
|
} = useSecurityDashboard()
|
|
|
|
return (
|
|
<div>
|
|
<PagePurpose
|
|
title="Security Dashboard"
|
|
purpose="DevSecOps Dashboard mit Echtzeit-Scan-Ergebnissen. Ueberwachen Sie Secrets, Schwachstellen und Abhaengigkeiten. Fuehren Sie Security-Scans manuell aus oder integrieren Sie sie in Ihre CI/CD-Pipeline."
|
|
audience={['DevOps', 'Security', 'Entwickler']}
|
|
gdprArticles={['Art. 32 (Sicherheit der Verarbeitung)']}
|
|
architecture={{
|
|
services: ['Gitleaks', 'Semgrep', 'Bandit', 'Trivy', 'Grype', 'Syft'],
|
|
databases: ['JSON Reports'],
|
|
}}
|
|
relatedPages={[
|
|
{ name: 'SBOM', href: '/infrastructure/sbom', description: 'Software Bill of Materials' },
|
|
{ name: 'Middleware', href: '/infrastructure/middleware', description: 'API Gateway & Rate Limiting' },
|
|
{ name: 'Controls', href: '/sdk/controls', description: 'Security Controls' },
|
|
]}
|
|
collapsible={true}
|
|
defaultCollapsed={true}
|
|
/>
|
|
|
|
<DevOpsPipelineSidebarResponsive currentTool="security" />
|
|
|
|
<SecurityHeader
|
|
overallStatus={overallStatus}
|
|
summary={summary}
|
|
scanning={scanning}
|
|
onRunScan={runScan}
|
|
/>
|
|
|
|
{/* Tabs */}
|
|
<div className="bg-white rounded-xl border border-slate-200 overflow-hidden mb-6">
|
|
<div className="flex border-b border-slate-200">
|
|
{(Object.keys(TAB_LABELS) as TabId[]).map(tab => (
|
|
<button
|
|
key={tab}
|
|
onClick={() => setActiveTab(tab)}
|
|
className={`px-6 py-3 text-sm font-medium transition-colors ${
|
|
activeTab === tab
|
|
? 'bg-orange-50 text-orange-700 border-b-2 border-orange-600'
|
|
: 'text-slate-600 hover:bg-slate-50'
|
|
}`}
|
|
>
|
|
{tab === 'findings' ? `${TAB_LABELS[tab]} (${summary.total})` : TAB_LABELS[tab]}
|
|
</button>
|
|
))}
|
|
</div>
|
|
|
|
<div className="p-6">
|
|
{/* Scan Status Message */}
|
|
{scanMessage && (
|
|
<div className="mb-4 p-4 bg-blue-50 border border-blue-200 rounded-lg text-blue-700 flex items-center gap-3">
|
|
<div className="animate-spin rounded-full h-5 w-5 border-b-2 border-blue-600" />
|
|
<div>
|
|
<span className="font-medium">{scanMessage}</span>
|
|
{lastScanTime && (
|
|
<span className="text-sm text-blue-500 ml-2">(gestartet um {lastScanTime})</span>
|
|
)}
|
|
</div>
|
|
</div>
|
|
)}
|
|
|
|
{error && (
|
|
<div className="mb-4 p-4 bg-red-50 border border-red-200 rounded-lg text-red-700">
|
|
{error}
|
|
</div>
|
|
)}
|
|
|
|
{loading ? (
|
|
<div className="flex justify-center py-12">
|
|
<div className="animate-spin rounded-full h-12 w-12 border-b-2 border-orange-600" />
|
|
</div>
|
|
) : (
|
|
<>
|
|
{activeTab === 'overview' && (
|
|
<OverviewTab
|
|
tools={tools}
|
|
findings={findings}
|
|
scanning={scanning}
|
|
onRunScan={runScan}
|
|
onSwitchTab={setActiveTab}
|
|
/>
|
|
)}
|
|
{activeTab === 'findings' && (
|
|
<FindingsTab
|
|
filteredFindings={filteredFindings}
|
|
severityFilter={severityFilter}
|
|
setSeverityFilter={setSeverityFilter}
|
|
toolFilter={toolFilter}
|
|
setToolFilter={setToolFilter}
|
|
/>
|
|
)}
|
|
{activeTab === 'tools' && (
|
|
<ToolsTab tools={tools} scanning={scanning} onRunScan={runScan} />
|
|
)}
|
|
{activeTab === 'history' && (
|
|
<HistoryTab history={history} />
|
|
)}
|
|
{activeTab === 'monitoring' && (
|
|
<MonitoringTab monitoringMetrics={monitoringMetrics} activeAlerts={activeAlerts} />
|
|
)}
|
|
</>
|
|
)}
|
|
</div>
|
|
</div>
|
|
|
|
<DocumentationSection showFullDocs={showFullDocs} setShowFullDocs={setShowFullDocs} />
|
|
</div>
|
|
)
|
|
}
|