Skip to content

Fix report copy/export flows and add ASN RPKI batch availability messaging - #24

Merged
DeepZone merged 1 commit into
mainfrom
codex/fix-copy/export-issues-and-asn-batch-explanation
May 20, 2026
Merged

Fix report copy/export flows and add ASN RPKI batch availability messaging#24
DeepZone merged 1 commit into
mainfrom
codex/fix-copy/export-issues-and-asn-batch-explanation

Conversation

@DeepZone

Copy link
Copy Markdown
Owner

Motivation

  • Fixe fehlerhafte Copy-/Export-Flows im Frontend (Copy Markdown / Copy Summary) und liefere klare UI-Informationen, warum ein ASN-RPKI-Batch nicht gestartet werden kann.
  • Die UI soll nie leere oder irreführende Exportaktionen anbieten und der Backend-API soll nötige Metadaten zur Batch-Verfügbarkeit bereitstellen.

Description

  • Backend: Ergänzt details.rpki_batch mit available, reason_code, message, prefix_count, can_retry in AsnChecker.check(...) und AsnChecker.check_rpki_batch(...) und entstandene Summary/Explanation/Recommendation-Logik für den Fall checked_prefixes == 0 (backend/app/services/asn_checker.py).
  • Demo: Demo-Daten um AS4491 ergänzt, damit der Fall "keine announced prefixes" reproduzierbar ist (backend/app/services/ripe_stat_client.py).
  • Frontend: Robustere Text-API-Requests mit response.text() Fehlerausgabe verbessert (frontend/src/api.ts).
  • Frontend: Export/Copy-UX überarbeitet: defensive report_id-Ermittlung, deaktivierte Export-Buttons mit Hinweis, zentrale copyTextToClipboard mit navigator.clipboard + textarea/execCommand-Fallback, Download via Blob, Empty-State und Anzeige von rpki_batch.message (frontend/src/components/ReportView.tsx, frontend/src/components/AsnCheckForm.tsx).
  • Frontend types: details.rpki_batch Typ hinzugefügt (frontend/src/types.ts).
  • Tests: Smoke-Tests erweitert für ASN-Batch-Metadaten (available/unavailable), ASN-RPKI-Batch ohne Prefixes und Report-Export 404-Fälle (backend/tests/test_api_smoke.py).
  • Docs: README um Erklärung ergänzt, warum ASN-RPKI-Batch manchmal nicht verfügbar ist (README.md).

Testing

  • Backend: cd backend && pytest -q ausgeführt und alle Tests erfolgreich (61 passed).
  • Frontend: cd frontend && npm run build ausgeführt und Produktions-Build erfolgreich erzeugt.
  • Zusätzliche automatische Smoke-Tests wurden hinzugefügt und laufen in der Backend-Suite; Frontend-Validierung erfolgte per Build (keine UI-Tests).

Codex Task

@DeepZone
DeepZone merged commit ef37412 into main May 20, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant