From 439fefeda8b9f07a921f7db8514dce34f4f02994 Mon Sep 17 00:00:00 2001 From: Alex Khomenko Date: Fri, 5 Sep 2025 17:32:26 +0300 Subject: [PATCH] Provisioning: Delete repo config when navigating away (#110655) --- .../provisioning/Wizard/ProvisioningWizard.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/public/app/features/provisioning/Wizard/ProvisioningWizard.tsx b/public/app/features/provisioning/Wizard/ProvisioningWizard.tsx index 000d7a845ed..2c125fbdbe8 100644 --- a/public/app/features/provisioning/Wizard/ProvisioningWizard.tsx +++ b/public/app/features/provisioning/Wizard/ProvisioningWizard.tsx @@ -170,6 +170,14 @@ export function ProvisioningWizard({ type }: { type: RepoType }) { } }; + const onDiscard = async () => { + if (repoName) { + await handleRepositoryDeletion(repoName); + } + + await handlePrevious(); + }; + const handlePrevious = async () => { // For cancel actions, show confirmation modal if (shouldUseCancelBehavior) { @@ -333,7 +341,7 @@ export function ProvisioningWizard({ type }: { type: RepoType }) {