Skip to content

Commit

Permalink
Allow empty luks struct
Browse files Browse the repository at this point in the history
Signed-off-by: yaacov <[email protected]>
  • Loading branch information
yaacov committed Jul 7, 2024
1 parent 56440f0 commit b72a4b6
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const SetLUKSEncryptionPasswordsDetailsItem: React.FC<PlanDetailsItemProp
}) => {
const { t } = useForkliftTranslation();
const { showModal } = useModal();
const luks = resource?.spec?.vms?.[0].luks;
const luksSecretName = resource?.spec?.vms?.[0].luks?.name;

const defaultHelpContent = t(
'Specify a list of passphrases for the Linux Unified Key Setup (LUKS)-encrypted devices for the VMs that you want to migrate.',
Expand All @@ -26,11 +26,11 @@ export const SetLUKSEncryptionPasswordsDetailsItem: React.FC<PlanDetailsItemProp
<DetailsItem
title={t('Disk decryption passphrases')}
content={
luks ? (
luksSecretName ? (
<span>
<ResourceLink
groupVersionKind={{ kind: 'Secret', version: 'v1' }}
name={luks?.name}
name={luksSecretName}
namespace={resource.metadata.namespace}
/>
</span>
Expand Down

0 comments on commit b72a4b6

Please sign in to comment.