From 7bd5e2fa9525d6792ff4e1dac72bb20026d68b1e Mon Sep 17 00:00:00 2001 From: Sanne Raymaekers Date: Wed, 22 Jan 2025 13:19:25 +0100 Subject: [PATCH] ImagesTable: switch to mixed api for getting composes --- src/Components/ImagesTable/ImagesTable.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/Components/ImagesTable/ImagesTable.tsx b/src/Components/ImagesTable/ImagesTable.tsx index 8e9f8ffc..a105155b 100644 --- a/src/Components/ImagesTable/ImagesTable.tsx +++ b/src/Components/ImagesTable/ImagesTable.tsx @@ -49,7 +49,11 @@ import { SEARCH_INPUT, STATUS_POLLING_INTERVAL, } from '../../constants'; -import { useGetBlueprintsQuery } from '../../store/backendApi'; +import { + useGetComposesQuery, + useGetBlueprintsQuery, + useGetBlueprintComposesQuery, +} from '../../store/backendApi'; import { selectBlueprintSearchInput, selectBlueprintVersionFilter, @@ -66,8 +70,6 @@ import { ComposeStatus, GetBlueprintComposesApiArg, GetBlueprintsApiArg, - useGetBlueprintComposesQuery, - useGetComposesQuery, useGetComposeStatusQuery, } from '../../store/imageBuilderApi'; import { resolveRelPath } from '../../Utilities/path'; @@ -298,7 +300,8 @@ const ImagesTableRow = ({ compose, rowIndex }: ImagesTableRowPropTypes) => { } }, [setPollingInterval, composeStatus]); - const type = compose.request.image_requests[0].upload_request.type; + const type = + compose.request?.image_requests[0]?.upload_request?.type || 'local'; switch (type) { case 'aws': @@ -317,6 +320,8 @@ const ImagesTableRow = ({ compose, rowIndex }: ImagesTableRowPropTypes) => { return ; case 'aws.s3': return ; + case 'local': + return ; } };