[8.16] [SecuritySolution] Clean up loading state when the timeline import modal closes (#197018) (#197051)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[SecuritySolution] Clean up loading state when the timeline import
modal closes (#197018)](https://github.com/elastic/kibana/pull/197018)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Jan
Monschke","email":"jan.monschke@elastic.co"},"sourceCommit":{"committedDate":"2024-10-21T12:39:05Z","message":"[SecuritySolution]
Clean up loading state when the timeline import modal closes
(#197018)\n\n## Summary\r\n\r\nFixes:
https://github.com/elastic/kibana/issues/196877\r\n\r\nThe above issue
describes an issue where the timeline import modal can\r\nget into a
broken state after a timeline failed to import. The fix was\r\nto
synchronize the loading state of the
modal.","sha":"9577aa980dd1565fba05e34292fb5c0bba692889","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["backport","release_note:skip","v9.0.0","Team:Threat
Hunting:Investigations","v8.16.0"],"title":"[SecuritySolution] Clean up
loading state when the timeline import modal
closes","number":197018,"url":"https://github.com/elastic/kibana/pull/197018","mergeCommit":{"message":"[SecuritySolution]
Clean up loading state when the timeline import modal closes
(#197018)\n\n## Summary\r\n\r\nFixes:
https://github.com/elastic/kibana/issues/196877\r\n\r\nThe above issue
describes an issue where the timeline import modal can\r\nget into a
broken state after a timeline failed to import. The fix was\r\nto
synchronize the loading state of the
modal.","sha":"9577aa980dd1565fba05e34292fb5c0bba692889"}},"sourceBranch":"main","suggestedTargetBranches":["8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197018","number":197018,"mergeCommit":{"message":"[SecuritySolution]
Clean up loading state when the timeline import modal closes
(#197018)\n\n## Summary\r\n\r\nFixes:
https://github.com/elastic/kibana/issues/196877\r\n\r\nThe above issue
describes an issue where the timeline import modal can\r\nget into a
broken state after a timeline failed to import. The fix was\r\nto
synchronize the loading state of the
modal.","sha":"9577aa980dd1565fba05e34292fb5c0bba692889"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Jan Monschke <jan.monschke@elastic.co>
This commit is contained in:
Kibana Machine 2024-10-22 01:47:14 +11:00 committed by GitHub
parent 514ae3f33e
commit 45b1980ee3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -91,6 +91,7 @@ export const ImportDataModalComponent = ({
setOverwriteExceptions(false);
setOverwriteActionConnectors(false);
setActionConnectorsWarnings([]);
setIsImporting(false);
}, [closeModal, setOverwrite, setOverwriteExceptions]);
const onImportComplete = useCallback(