@@ -22,6 +22,7 @@ import { keyframes } from '@mui/material/styles'
2222import { useMigrationFormActions } from '../context/MigrationFormContext'
2323import { useVmwareCredentialsQuery } from 'src/hooks/api/useVmwareCredentialsQuery'
2424import { useOpenstackCredentialsQuery } from 'src/hooks/api/useOpenstackCredentialsQuery'
25+ import { useVddkStatusQuery } from 'src/hooks/api/useVddkStatusQuery'
2526import type { CustomToolbarProps , MigrationsTableProps } from '../types'
2627import { TooltipContent , ClickableTableCell } from 'src/components'
2728import { useMigrationPlanDestinationsQuery } from '../api/useMigrationPlanDestinationsQuery'
@@ -132,6 +133,8 @@ export default function MigrationsTable({
132133 refetchOnMount : true
133134 } )
134135
136+ const { data : vddkStatus } = useVddkStatusQuery ( { staleTime : 0 , refetchOnMount : true } )
137+
135138 const hasVmwareCredentials = useMemo ( ( ) => ( vmwareCreds || [ ] ) . length > 0 , [ vmwareCreds ] )
136139 const hasPcdCredentials = useMemo ( ( ) => {
137140 const openstack = Array . isArray ( openstackCreds ) ? openstackCreds : [ ]
@@ -141,9 +144,12 @@ export default function MigrationsTable({
141144 ) . length > 0
142145 )
143146 } , [ openstackCreds ] )
147+ const vddkUploaded = vddkStatus ?. uploaded === true
144148
145- const startMigrationDisabled = ! hasVmwareCredentials || ! hasPcdCredentials
146- const startMigrationDisabledReason = 'Add VMware and PCD credentials before starting a migration.'
149+ const startMigrationDisabled = ! hasVmwareCredentials || ! hasPcdCredentials || ! vddkUploaded
150+ const startMigrationDisabledReason = ! vddkUploaded
151+ ? 'Upload VDDK library in Settings before starting a migration.'
152+ : 'Add VMware and PCD credentials before starting a migration.'
147153 const [ selectedRows , setSelectedRows ] = useState < GridRowSelectionModel > ( [ ] )
148154 const [ isBulkCutoverLoading , setIsBulkCutoverLoading ] = useState ( false )
149155 const [ bulkCutoverDialogOpen , setBulkCutoverDialogOpen ] = useState ( false )
0 commit comments