From b7b6e58cfe3a6951ee556b9fc215cfa541de6b09 Mon Sep 17 00:00:00 2001 From: Alex Khomenko Date: Tue, 25 Feb 2025 13:14:39 +0200 Subject: [PATCH] POC/Provisioning: Remove sync confirm modal (#101281) --- public/app/features/provisioning/RecentJobs.tsx | 2 +- .../app/features/provisioning/SyncRepository.tsx | 15 +++------------ 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/public/app/features/provisioning/RecentJobs.tsx b/public/app/features/provisioning/RecentJobs.tsx index 83c28acbf0b..b86844d3ada 100644 --- a/public/app/features/provisioning/RecentJobs.tsx +++ b/public/app/features/provisioning/RecentJobs.tsx @@ -149,7 +149,7 @@ function ExpandedRow({ row }: ExpandedRowProps) { Job Specification - + )} {hasErrors && ( diff --git a/public/app/features/provisioning/SyncRepository.tsx b/public/app/features/provisioning/SyncRepository.tsx index ba835f6eb1d..db8501fcd72 100644 --- a/public/app/features/provisioning/SyncRepository.tsx +++ b/public/app/features/provisioning/SyncRepository.tsx @@ -31,7 +31,7 @@ export function SyncRepository({ repository }: Props) { payload: ['Error importing resources', syncQuery.error], }); } - }, [syncQuery.error, syncQuery.isError, syncQuery.isSuccess, navigate]); + }, [syncQuery.error, syncQuery.isError, syncQuery.isSuccess]); const onClick = () => { if (!name) { @@ -50,20 +50,11 @@ export function SyncRepository({ repository }: Props) { variant={'secondary'} tooltip={isHealthy ? undefined : 'Unable to sync an unhealthy repository'} disabled={syncQuery.isLoading || !name || !isHealthy} - onClick={() => setIsModalOpen(true)} + onClick={onClick} > Sync - {repository.spec?.sync.enabled ? ( - setIsModalOpen(false)} - /> - ) : ( + {!repository.spec?.sync.enabled && (