fix(HMS-3704): hiding blueprint out of sync alert
This commit is contained in:
parent
e97291759c
commit
97b7aa6bfd
4 changed files with 99 additions and 21 deletions
|
|
@ -89,6 +89,7 @@ const ImagesTable = ({ selectedBlueprint }: ImageTableProps) => {
|
|||
data: blueprintsComposes,
|
||||
isSuccess: isBlueprintsSuccess,
|
||||
isLoading: isLoadingBlueprintsCompose,
|
||||
isFetching: isFetchingBlueprintsCompose,
|
||||
isError: isBlueprintsError,
|
||||
} = useGetBlueprintComposesQuery(
|
||||
{
|
||||
|
|
@ -126,6 +127,8 @@ const ImagesTable = ({ selectedBlueprint }: ImageTableProps) => {
|
|||
: isLoadingComposes;
|
||||
|
||||
const isBlueprintOutSync =
|
||||
selectedBlueprint &&
|
||||
!isFetchingBlueprintsCompose &&
|
||||
blueprintsComposes?.data[0]?.blueprint_version !== selectedBlueprintVersion;
|
||||
|
||||
if (isLoading) {
|
||||
|
|
@ -199,7 +202,7 @@ const ImagesTable = ({ selectedBlueprint }: ImageTableProps) => {
|
|||
<Th />
|
||||
</Tr>
|
||||
</Thead>
|
||||
{itemCount === 0 && (
|
||||
{itemCount === 0 ? (
|
||||
<Tbody>
|
||||
<Tr>
|
||||
<Td colSpan={12}>
|
||||
|
|
@ -207,19 +210,21 @@ const ImagesTable = ({ selectedBlueprint }: ImageTableProps) => {
|
|||
</Td>
|
||||
</Tr>
|
||||
</Tbody>
|
||||
)}
|
||||
{experimentalFlag && isBlueprintOutSync && (
|
||||
<Tbody>
|
||||
<Tr>
|
||||
<Td colSpan={12}>
|
||||
<Alert
|
||||
isInline
|
||||
title="You haven't built new images for this version of your blueprint yet"
|
||||
ouiaId="blueprint-out-of-sync-alert"
|
||||
/>
|
||||
</Td>
|
||||
</Tr>
|
||||
</Tbody>
|
||||
) : (
|
||||
experimentalFlag &&
|
||||
isBlueprintOutSync && (
|
||||
<Tbody>
|
||||
<Tr>
|
||||
<Td colSpan={12}>
|
||||
<Alert
|
||||
isInline
|
||||
title="You haven't built new images for this version of your blueprint yet"
|
||||
ouiaId="blueprint-out-of-sync-alert"
|
||||
/>
|
||||
</Td>
|
||||
</Tr>
|
||||
</Tbody>
|
||||
)
|
||||
)}
|
||||
|
||||
{composes?.map((compose, rowIndex) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue