Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
export/import domain capabilities (#1376)
* Write serializers for exported models * Add slug related fields to non-referential sluggable keys * Add import/export serializer classes for Threat and ReferenceControl models * Write unit tests for Vulnerability model * Serialize models with their import/export serializer at dump time * Add docstrings * Remove filtering labels from export serializers * Fix import order * feat: add import endpoint and serializer validation * feat: add topological sort for creation order * Get objects to include in domain export * Expose rudimentary domain export endpoint * Serialize referential foreign keys using URN * Serialize risk matrices and frameworks for export * feat: order objects import with parent fields * Hash primary keys on dump * Serialize loaded libraries for export * feat: move import to folders endpoint * fix: self reference in dependency graph * feat: start objecs creation * feat: refactor object validation/creation * feat: handle complete scenario creation * Write serializers for exported models * Add slug related fields to non-referential sluggable keys * Add import/export serializer classes for Threat and ReferenceControl models * Write unit tests for Vulnerability model * Serialize dump * Serialize models with their import/export serializer at dump time * Add docstrings * Remove filtering labels from export serializers * Remove outdated comment * Fix import order * Get objects to include in domain export * Expose rudimentary domain export endpoint * Serialize referential foreign keys using URN * Serialize risk matrices and frameworks for export * Hash primary keys on dump * Serialize loaded libraries for export * Update vulnerability import export unit tests * Serialize evidence attachment size for export * remove folders from domain export * Serialize evidence attachment hash for export * Compress domain dump file * chore: Remove unused imports * feat: add ebios rm objects import * Use HttpResponse for domain export dump file * feat: remove attachment hash and size before evidence creation * feat: process gzip * feat: prepare frontend folder import * Port domain export to the frontend * Remove redundant serializer field * Pass enctype to folder import form as props * Validate that folder import file is a file * Manage domain dump upload * chore: format codebase * feat: improve methods complexity * chore: format * chore: format with good version * fix: change import button data-testid * style: improve colors and labels * feat: add slugified domain name in export file name * chore: format file input component in FolderForm * locale: add fr translations * chore: use match cases instead of elifs * feat: handle name check error on frontend * feat: validate backup version on import * feat: adding transaction to avoid object creation if failure * Export attachments with evidence * Write zipfile in memory and add some logging * feat: improve error handling * chore: ruff format * Attachment upload PoC * Fix domain import in enterprise frontend * WIP * fix attachment management * ruff * fix broken html/zip export of audit * ruff --------- Co-authored-by: Nassim Tabchiche <n.tabchiche2@gmail.com> Co-authored-by: Mohamed-Hacene <mohamedhacene.b@gmail.com>
- Loading branch information