E2C: Fix rebuild snapshot not showing while pending upload (#91077)
* E2C: Fix rebuild snapshot not showing while pending upload * fix unable to make snapshot after disconnect/reconnect * fix wrap on migration summary
This commit is contained in:
@@ -63,7 +63,7 @@ export function MigrationSummary(props: MigrationSummaryProps) {
|
||||
alignItems="center"
|
||||
justifyContent="space-between"
|
||||
>
|
||||
<Stack gap={4} wrap="wrap">
|
||||
<Stack gap={4} wrap>
|
||||
<MigrationInfo title={t('migrate-to-cloud.summary.snapshot-date', 'Snapshot timestamp')}>
|
||||
{snapshot?.created ? (
|
||||
formatDate(snapshot.created, DATE_FORMAT)
|
||||
@@ -101,32 +101,34 @@ export function MigrationSummary(props: MigrationSummaryProps) {
|
||||
</MigrationInfo>
|
||||
</Stack>
|
||||
|
||||
{showBuildSnapshot && (
|
||||
<Button disabled={isBusy} onClick={onBuildSnapshot} icon={buildSnapshotIsLoading ? 'spinner' : undefined}>
|
||||
<Trans i18nKey="migrate-to-cloud.summary.start-migration">Build snapshot</Trans>
|
||||
</Button>
|
||||
)}
|
||||
<Stack gap={2} wrap justifyContent="flex-end">
|
||||
{showBuildSnapshot && (
|
||||
<Button disabled={isBusy} onClick={onBuildSnapshot} icon={buildSnapshotIsLoading ? 'spinner' : undefined}>
|
||||
<Trans i18nKey="migrate-to-cloud.summary.start-migration">Build snapshot</Trans>
|
||||
</Button>
|
||||
)}
|
||||
|
||||
{showRebuildSnapshot && (
|
||||
<Button
|
||||
disabled={isBusy}
|
||||
onClick={onBuildSnapshot}
|
||||
icon={buildSnapshotIsLoading ? 'spinner' : undefined}
|
||||
variant="secondary"
|
||||
>
|
||||
<Trans i18nKey="migrate-to-cloud.summary.rebuild-snapshot">Rebuild snapshot</Trans>
|
||||
</Button>
|
||||
)}
|
||||
{showRebuildSnapshot && (
|
||||
<Button
|
||||
disabled={isBusy}
|
||||
onClick={onBuildSnapshot}
|
||||
icon={buildSnapshotIsLoading ? 'spinner' : undefined}
|
||||
variant="secondary"
|
||||
>
|
||||
<Trans i18nKey="migrate-to-cloud.summary.rebuild-snapshot">Rebuild snapshot</Trans>
|
||||
</Button>
|
||||
)}
|
||||
|
||||
{showUploadSnapshot && (
|
||||
<Button
|
||||
disabled={isBusy || uploadSnapshotIsLoading}
|
||||
onClick={onUploadSnapshot}
|
||||
icon={uploadSnapshotIsLoading ? 'spinner' : undefined}
|
||||
>
|
||||
<Trans i18nKey="migrate-to-cloud.summary.upload-migration">Upload snapshot</Trans>
|
||||
</Button>
|
||||
)}
|
||||
{showUploadSnapshot && (
|
||||
<Button
|
||||
disabled={isBusy || uploadSnapshotIsLoading}
|
||||
onClick={onUploadSnapshot}
|
||||
icon={uploadSnapshotIsLoading ? 'spinner' : undefined}
|
||||
>
|
||||
<Trans i18nKey="migrate-to-cloud.summary.upload-migration">Upload snapshot</Trans>
|
||||
</Button>
|
||||
)}
|
||||
</Stack>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ const SHOULD_POLL_STATUSES: Array<SnapshotDto['status']> = [
|
||||
'PROCESSING',
|
||||
];
|
||||
|
||||
const SNAPSHOT_REBUILD_STATUSES: Array<SnapshotDto['status']> = ['PENDING_PROCESSING', 'FINISHED', 'ERROR', 'UNKNOWN'];
|
||||
const SNAPSHOT_REBUILD_STATUSES: Array<SnapshotDto['status']> = ['PENDING_UPLOAD', 'FINISHED', 'ERROR', 'UNKNOWN'];
|
||||
const SNAPSHOT_BUILDING_STATUSES: Array<SnapshotDto['status']> = ['INITIALIZING', 'CREATING'];
|
||||
const SNAPSHOT_UPLOADING_STATUSES: Array<SnapshotDto['status']> = ['UPLOADING', 'PENDING_PROCESSING', 'PROCESSING'];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user