Provisioning: Wait for status check in frontend (#111712)
This commit is contained in:
@@ -46,6 +46,7 @@ export const SynchronizeStep = memo(function SynchronizeStep({
|
||||
} = repositoryStatusQuery?.data?.status?.health || {};
|
||||
|
||||
const hasError = repositoryStatusQuery.isError;
|
||||
const isLoading = repositoryStatusQuery.isLoading || repositoryStatusQuery.isFetching;
|
||||
const isButtonDisabled = hasError || (checked !== undefined && isRepositoryHealthy === false);
|
||||
|
||||
const startSynchronization = async () => {
|
||||
@@ -56,7 +57,7 @@ export const SynchronizeStep = memo(function SynchronizeStep({
|
||||
}
|
||||
};
|
||||
|
||||
if (repositoryStatusQuery.isFetching) {
|
||||
if (isLoading) {
|
||||
return <Spinner />;
|
||||
}
|
||||
if (job) {
|
||||
@@ -151,7 +152,7 @@ export const SynchronizeStep = memo(function SynchronizeStep({
|
||||
)}
|
||||
|
||||
<Field noMargin>
|
||||
{hasError || isRepositoryHealthy === false ? (
|
||||
{hasError || (checked !== undefined && isRepositoryHealthy === false) ? (
|
||||
<Button variant="destructive" onClick={() => onCancel?.(repoName)} disabled={isCancelling}>
|
||||
{isCancelling ? (
|
||||
<Trans i18nKey="provisioning.wizard.button-cancelling">Cancelling...</Trans>
|
||||
|
||||
Reference in New Issue
Block a user