Skip to content

Commit

Permalink
Fixes #38225 - Prevent empty tbody inside booted containers (#11318)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavanshekar authored Feb 26, 2025
1 parent 83498c4 commit d8dc262
Showing 1 changed file with 29 additions and 27 deletions.
56 changes: 29 additions & 27 deletions webpack/scenes/BootedContainerImages/BootedContainerImagesPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,40 +134,42 @@ const BootedContainerImagesPage = () => {
</>
</Tr>
</Thead>
<Tbody>
{status === STATUS.PENDING && results.length === 0 && (
<Tr ouiaId="table-loading">
<Td colSpan={100}>
<EmptyPage
message={{
type: 'loading',
text: __('Loading...'),
}}
/>
</Td>
</Tr>
)}
{!(status === STATUS.PENDING) &&
results.length === 0 &&
!errorMessage && (
<Tr ouiaId="table-empty">
{(results.length === 0 || errorMessage) && (
<Tbody>
{status === STATUS.PENDING && results.length === 0 && (
<Tr ouiaId="table-loading">
<Td colSpan={100}>
<EmptyPage
message={{
type: 'empty',
type: 'loading',
text: __('Loading...'),
}}
/>
</Td>
</Tr>
)}
{errorMessage && (
<Tr ouiaId="table-error">
<Td colSpan={100}>
<EmptyPage message={{ type: 'error', text: errorMessage }} />
</Td>
</Tr>
)}
</Tbody>
)}
{!(status === STATUS.PENDING) &&
results.length === 0 &&
!errorMessage && (
<Tr ouiaId="table-empty">
<Td colSpan={100}>
<EmptyPage
message={{
type: 'empty',
}}
/>
</Td>
</Tr>
)}
{errorMessage && (
<Tr ouiaId="table-error">
<Td colSpan={100}>
<EmptyPage message={{ type: 'error', text: errorMessage }} />
</Td>
</Tr>
)}
</Tbody>
)}
{results?.map((result, rowIndex) => {
const { bootc_booted_image: bootcBootedImage, digests } = result;
const isExpanded = imageIsExpanded(bootcBootedImage);
Expand Down

0 comments on commit d8dc262

Please sign in to comment.