feat: enhance configuration item import functionality and folder hierarchy management - #5165
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (6)
WalkthroughConfiguration exports now preserve folder hierarchies, imports create or resolve those folders, and the UI refreshes after successful imports. Recursive folder deletion also awaits item removal before deleting folders. ChangesConfiguration folder hierarchy
Import UI completion flow
Recursive folder deletion
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This pull request introduces support for storing and importing the folder hierarchy of configuration items, ensuring that items retain their folder structure when exported and imported between environments. It also improves the import UI by allowing the caller to refresh the configuration tree after a successful import. The main changes are grouped below.
Backend: Folder Hierarchy Support for Configuration Items
FolderPathproperty toDistributedConfigurableItemBaseto represent the item's folder hierarchy in export/import operations. This property is set during export and used during import to place items in the correct folders. [1] [2]EnsureFolderAsyncinConfigurationItemImportBaseto resolve or create the target folder structure during import, ensuring folders are matched by name and parent within the module.FolderRepo) inConfigurationItemImportBaseto support folder creation without changing constructors.awaitinDeleteFolderRecursiveAsyncto ensure items are deleted before processing subfolders.Frontend: Import UI Improvements
ConfigurationItemsImportFooterand related modal logic to accept an optionalonImportedcallback, allowing the caller to refresh the configuration tree after a successful import. The fallback remains to simply close the modal if no callback is provided. [1] [2] [3] [4]These changes ensure that configuration item folders are preserved across export/import and improve the user experience for configuration item import operations.
Related to issue: #5005
Summary by CodeRabbit
New Features
Bug Fixes