fix fetch resource

This commit is contained in:
PhilReact 2024-12-20 19:34:35 +02:00
parent 9fd224cccf
commit 995f29a8f1
4 changed files with 13 additions and 3 deletions

View File

@ -138,6 +138,16 @@ export const useFetchResources = () => {
}, },
})); }));
} }
if(res?.status === 'DOWNLOADED'){
const url = `${getBaseApiReact()}/arbitrary/resource/status/${service}/${name}/${identifier}?build=true`;
const resCall = await fetch(url, {
method: "GET",
headers: {
"Content-Type": "application/json",
},
});
res = await resCall.json();
}
} }
callFunction() callFunction()
intervalId.current = setInterval(async () => { intervalId.current = setInterval(async () => {

View File

@ -969,7 +969,8 @@ const clearEditorContent = () => {
<AppViewerContainer customHeight="560px" app={{ <AppViewerContainer customHeight="560px" app={{
tabId: '5558588', tabId: '5558588',
name: 'Q-Manager', name: 'Q-Manager',
service: 'APP' service: 'APP',
path: `?groupId=${selectedGroup}`
}} isSelected /> }} isSelected />
</Box> </Box>
</Box> </Box>

View File

@ -263,7 +263,7 @@ export const AttachmentCard = ({
}}> }}>
<FileAttachmentContainer > <FileAttachmentContainer >
<Typography>{resourceDetails?.status?.status}</Typography> <Typography>{resourceDetails?.status?.status === 'DOWNLOADED' ? 'BUILDING' : resourceDetails?.status?.status}</Typography>
{!resourceDetails && ( {!resourceDetails && (
<> <>
<DownloadIcon /> <DownloadIcon />

View File

@ -440,7 +440,6 @@ export const VideoPlayer: React.FC<VideoPlayerProps> = ({
} }
} }
console.log('resourceStatus', resourceStatus)
return ( return (
<VideoContainer <VideoContainer