feat(coverage): Korpus-Dokumente gruppiert nach Art + Herausgeber-Familie
CI / dep-audit (push) Has been skipped
CI / test-python-backend (push) Successful in 27s
CI / test-python-document-crawler (push) Has been skipped
CI / sbom-scan (push) Has been skipped
CI / test-python-dsms-gateway (push) Has been skipped
CI / build-sha-integrity (push) Successful in 14s
CI / validate-canonical-controls (push) Successful in 10s
CI / loc-budget (push) Successful in 25s
CI / go-lint (push) Has been skipped
CI / detect-changes (push) Successful in 19s
CI / python-lint (push) Has been skipped
CI / branch-name (push) Has been skipped
CI / guardrail-integrity (push) Has been skipped
CI / secret-scan (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / nodejs-build (push) Successful in 3m8s
CI / test-go (push) Has been skipped
CI / iace-gt-coverage (push) Has been skipped
CI / dep-audit (push) Has been skipped
CI / test-python-backend (push) Successful in 27s
CI / test-python-document-crawler (push) Has been skipped
CI / sbom-scan (push) Has been skipped
CI / test-python-dsms-gateway (push) Has been skipped
CI / build-sha-integrity (push) Successful in 14s
CI / validate-canonical-controls (push) Successful in 10s
CI / loc-budget (push) Successful in 25s
CI / go-lint (push) Has been skipped
CI / detect-changes (push) Successful in 19s
CI / python-lint (push) Has been skipped
CI / branch-name (push) Has been skipped
CI / guardrail-integrity (push) Has been skipped
CI / secret-scan (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / nodejs-build (push) Successful in 3m8s
CI / test-go (push) Has been skipped
CI / iace-gt-coverage (push) Has been skipped
Die "Korpus-Dokumente"-Tabelle wird nach Dokument-Art geordnet (Gesetze & Verordnungen → Behörden-Leitfäden → Standards & Best Practice → Rechtsprechung) mit Zwischenüberschriften, und je Herausgeber-Familie zusammengefasst (alle DSK, alle EDPB, alle OWASP/NIST/ENISA gemeinsam). Deterministischer Kategorisierer (categorizeCorpusDoc) + Grouper (groupCorpusDocs), pure + unit-getestet. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { Fragment } from 'react'
|
||||
import Link from 'next/link'
|
||||
import {
|
||||
type UseCaseRow,
|
||||
@@ -5,6 +6,7 @@ import {
|
||||
licenseTierBadgeClass,
|
||||
commercialBadgeClass,
|
||||
groupUseCases,
|
||||
groupCorpusDocs,
|
||||
} from './_helpers'
|
||||
|
||||
const BACKEND_URL =
|
||||
@@ -163,22 +165,56 @@ export default async function CoveragePage() {
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="divide-y divide-gray-100 bg-white">
|
||||
{(corpus?.documents ?? []).map((d) => (
|
||||
<tr key={d.source_regulation}>
|
||||
<td className="px-4 py-2 text-gray-900">{d.source_regulation}</td>
|
||||
<td className="px-4 py-2">
|
||||
<span
|
||||
className={`rounded px-2 py-0.5 text-xs font-medium ${licenseTierBadgeClass(d.license_rule)}`}
|
||||
title={d.license_tier}
|
||||
{groupCorpusDocs(corpus?.documents ?? []).map((cat) => (
|
||||
<Fragment key={cat.key}>
|
||||
<tr className="bg-gray-100">
|
||||
<td
|
||||
colSpan={4}
|
||||
className="px-4 py-2 text-sm font-semibold text-gray-800"
|
||||
>
|
||||
Tier {d.license_rule ?? '?'}
|
||||
</span>
|
||||
</td>
|
||||
<td className="px-4 py-2 text-right">{d.atom_count.toLocaleString('de-DE')}</td>
|
||||
<td className="px-4 py-2 font-mono text-xs text-gray-600">
|
||||
{d.use_case ?? <span className="text-amber-600">— ungemappt</span>}
|
||||
</td>
|
||||
</tr>
|
||||
{cat.label}{' '}
|
||||
<span className="font-normal text-gray-500">
|
||||
({cat.families.reduce((s, f) => s + f.docs.length, 0)} Quellen ·{' '}
|
||||
{cat.total.toLocaleString('de-DE')} Pflichten)
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
{cat.families.map((fam) => (
|
||||
<Fragment key={cat.key + fam.family}>
|
||||
<tr className="bg-gray-50">
|
||||
<td
|
||||
colSpan={4}
|
||||
className="px-4 py-1 pl-8 text-xs font-medium uppercase tracking-wide text-gray-500"
|
||||
>
|
||||
{fam.family}
|
||||
</td>
|
||||
</tr>
|
||||
{fam.docs.map((d) => (
|
||||
<tr key={d.source_regulation}>
|
||||
<td className="px-4 py-2 pl-8 text-gray-900">
|
||||
{d.source_regulation}
|
||||
</td>
|
||||
<td className="px-4 py-2">
|
||||
<span
|
||||
className={`rounded px-2 py-0.5 text-xs font-medium ${licenseTierBadgeClass(d.license_rule)}`}
|
||||
title={d.license_tier}
|
||||
>
|
||||
Tier {d.license_rule ?? '?'}
|
||||
</span>
|
||||
</td>
|
||||
<td className="px-4 py-2 text-right">
|
||||
{d.atom_count.toLocaleString('de-DE')}
|
||||
</td>
|
||||
<td className="px-4 py-2 font-mono text-xs text-gray-600">
|
||||
{d.use_case ?? (
|
||||
<span className="text-amber-600">— ungemappt</span>
|
||||
)}
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
</Fragment>
|
||||
))}
|
||||
</Fragment>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user