Wizard: hide some review items for cockpit frontend
Hide some of the steps in the review step that aren't applicable to the cockpit frontend.
This commit is contained in:
parent
122c481c09
commit
11e352440f
3 changed files with 101 additions and 84 deletions
|
|
@ -121,6 +121,7 @@ test.describe.serial('test', () => {
|
|||
await frame.getByRole('button', { name: 'Review and finish' }).click();
|
||||
await frame.getByRole('button', { name: 'About packages' }).click();
|
||||
frame.getByRole('gridcell', { name: 'osbuild-composer' });
|
||||
await frame.getByRole('button', { name: 'Close', exact: true }).click();
|
||||
await frame
|
||||
.getByRole('button', { name: 'Save changes to blueprint' })
|
||||
.click();
|
||||
|
|
@ -128,6 +129,7 @@ test.describe.serial('test', () => {
|
|||
await frame.getByRole('button', { name: 'Edit blueprint' }).click();
|
||||
await frame.getByRole('button', { name: 'About packages' }).click();
|
||||
frame.getByRole('gridcell', { name: 'osbuild-composer' });
|
||||
await frame.getByRole('button', { name: 'Close', exact: true }).click();
|
||||
await frame.getByRole('button', { name: 'Cancel', exact: true }).click();
|
||||
frame.getByRole('heading', { name: 'All images' });
|
||||
});
|
||||
|
|
|
|||
|
|
@ -499,21 +499,23 @@ const Review = () => {
|
|||
<ServicesList />
|
||||
</ExpandableSection>
|
||||
)}
|
||||
<ExpandableSection
|
||||
toggleContent={composeExpandable(
|
||||
'First boot',
|
||||
'revisit-first-boot',
|
||||
'wizard-first-boot',
|
||||
)}
|
||||
onToggle={(_event, isExpandableFirstBoot) =>
|
||||
onToggleFirstBoot(isExpandableFirstBoot)
|
||||
}
|
||||
isExpanded={isExpandableFirstBoot}
|
||||
isIndented
|
||||
data-testid='firstboot-expandable'
|
||||
>
|
||||
<FirstBootList />
|
||||
</ExpandableSection>
|
||||
{!process.env.IS_ON_PREMISE && (
|
||||
<ExpandableSection
|
||||
toggleContent={composeExpandable(
|
||||
'First boot',
|
||||
'revisit-first-boot',
|
||||
'wizard-first-boot',
|
||||
)}
|
||||
onToggle={(_event, isExpandableFirstBoot) =>
|
||||
onToggleFirstBoot(isExpandableFirstBoot)
|
||||
}
|
||||
isExpanded={isExpandableFirstBoot}
|
||||
isIndented
|
||||
data-testid='firstboot-expandable'
|
||||
>
|
||||
<FirstBootList />
|
||||
</ExpandableSection>
|
||||
)}
|
||||
{(blueprintName || blueprintDescription) && (
|
||||
<ExpandableSection
|
||||
toggleContent={composeExpandable(
|
||||
|
|
|
|||
|
|
@ -506,78 +506,91 @@ export const ContentList = () => {
|
|||
<>
|
||||
<Content>
|
||||
<Content component={ContentVariants.dl} className='review-step-dl'>
|
||||
<>
|
||||
<Content
|
||||
component={ContentVariants.dt}
|
||||
className='pf-v6-u-min-width'
|
||||
>
|
||||
Repeatable build
|
||||
</Content>
|
||||
<Content component={ContentVariants.dd}>
|
||||
<Popover
|
||||
position='bottom'
|
||||
headerContent={
|
||||
useLatest
|
||||
? 'Use the latest repository content'
|
||||
: template
|
||||
? 'Use content from the content template'
|
||||
: `Repositories as of ${yyyyMMddFormat(
|
||||
new Date(snapshotDate),
|
||||
)}`
|
||||
}
|
||||
hasAutoWidth
|
||||
minWidth='60rem'
|
||||
bodyContent={
|
||||
<SnapshotTable snapshotForDate={data?.data || []} />
|
||||
}
|
||||
{!process.env.IS_ON_PREMISE && (
|
||||
<>
|
||||
<Content
|
||||
component={ContentVariants.dt}
|
||||
className='pf-v6-u-min-width'
|
||||
>
|
||||
<Button
|
||||
variant='link'
|
||||
isInline
|
||||
aria-label='Snapshot method'
|
||||
className='popover-button pf-v6-u-p-0'
|
||||
isDisabled={noRepositoriesSelected}
|
||||
Repeatable build
|
||||
</Content>
|
||||
<Content component={ContentVariants.dd}>
|
||||
<Popover
|
||||
position='bottom'
|
||||
headerContent={
|
||||
useLatest
|
||||
? 'Use the latest repository content'
|
||||
: template
|
||||
? 'Use content from the content template'
|
||||
: `Repositories as of ${yyyyMMddFormat(
|
||||
new Date(snapshotDate),
|
||||
)}`
|
||||
}
|
||||
hasAutoWidth
|
||||
minWidth='60rem'
|
||||
bodyContent={
|
||||
<SnapshotTable snapshotForDate={data?.data || []} />
|
||||
}
|
||||
>
|
||||
{snapshottingText}
|
||||
</Button>
|
||||
</Popover>
|
||||
{!useLatest && !isLoading && isSuccess && hasSnapshotDateAfter ? (
|
||||
<Alert
|
||||
variant='warning'
|
||||
isInline
|
||||
isPlain
|
||||
title='A snapshot for this date is not available for some repositories.'
|
||||
/>
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
</Content>
|
||||
</>
|
||||
<Content component={ContentVariants.dt} className='pf-v6-u-min-width'>
|
||||
Custom repositories
|
||||
</Content>
|
||||
<Content component={ContentVariants.dd}>
|
||||
{customRepositories.length + recommendedRepositories.length > 0 ? (
|
||||
<Popover
|
||||
position='bottom'
|
||||
headerContent='Custom repositories'
|
||||
hasAutoWidth
|
||||
minWidth='30rem'
|
||||
bodyContent={<RepositoriesTable />}
|
||||
<Button
|
||||
variant='link'
|
||||
isInline
|
||||
aria-label='Snapshot method'
|
||||
className='popover-button pf-v6-u-p-0'
|
||||
isDisabled={noRepositoriesSelected}
|
||||
>
|
||||
{snapshottingText}
|
||||
</Button>
|
||||
</Popover>
|
||||
{!useLatest &&
|
||||
!isLoading &&
|
||||
isSuccess &&
|
||||
hasSnapshotDateAfter ? (
|
||||
<Alert
|
||||
variant='warning'
|
||||
isInline
|
||||
isPlain
|
||||
title='A snapshot for this date is not available for some repositories.'
|
||||
/>
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
</Content>
|
||||
</>
|
||||
)}
|
||||
{!process.env.IS_ON_PREMISE && (
|
||||
<>
|
||||
<Content
|
||||
component={ContentVariants.dt}
|
||||
className='pf-v6-u-min-width'
|
||||
>
|
||||
<Button
|
||||
variant='link'
|
||||
aria-label='About custom repositories'
|
||||
className='popover-button pf-v6-u-p-0'
|
||||
>
|
||||
{customRepositories.length + recommendedRepositories.length ||
|
||||
0}
|
||||
</Button>
|
||||
</Popover>
|
||||
) : (
|
||||
0
|
||||
)}
|
||||
</Content>
|
||||
Custom repositories
|
||||
</Content>
|
||||
<Content component={ContentVariants.dd}>
|
||||
{customRepositories.length + recommendedRepositories.length >
|
||||
0 ? (
|
||||
<Popover
|
||||
position='bottom'
|
||||
headerContent='Custom repositories'
|
||||
hasAutoWidth
|
||||
minWidth='30rem'
|
||||
bodyContent={<RepositoriesTable />}
|
||||
>
|
||||
<Button
|
||||
variant='link'
|
||||
aria-label='About custom repositories'
|
||||
className='popover-button pf-v6-u-p-0'
|
||||
>
|
||||
{customRepositories.length +
|
||||
recommendedRepositories.length || 0}
|
||||
</Button>
|
||||
</Popover>
|
||||
) : (
|
||||
0
|
||||
)}
|
||||
</Content>
|
||||
</>
|
||||
)}
|
||||
<Content component={ContentVariants.dt} className='pf-v6-u-min-width'>
|
||||
Additional packages
|
||||
</Content>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue