-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from HIP-infrastructure/feat/id.thehip.app
Feat/id.thehip.app
- Loading branch information
Showing
35 changed files
with
582 additions
and
379 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
import * as React from 'react' | ||
import { | ||
Box, | ||
Card, | ||
CardContent, | ||
CardMedia, | ||
CircularProgress, | ||
Typography, | ||
} from '@mui/material' | ||
import { BIDSDataset, Container } from '../../../api/types' | ||
import { API_GATEWAY } from '../../../api/gatewayClientAPI' | ||
|
||
const DataCard = ({ | ||
bidsDatasets, | ||
sessions, | ||
}: { | ||
bidsDatasets?: BIDSDataset[] | ||
sessions?: Container[] | ||
}) => { | ||
return ( | ||
<> | ||
{!bidsDatasets && ( | ||
<CircularProgress | ||
size={32} | ||
color='secondary' | ||
sx={{ position: 'absolute', top: 10, left: 10 }} | ||
/> | ||
)} | ||
|
||
<Card | ||
sx={{ | ||
width: 320, | ||
height: 440, | ||
}} | ||
key={`data-group`} | ||
> | ||
<CardMedia | ||
component='img' | ||
height='160' | ||
title={ | ||
'Image generated by DreamStudio, Text-to-Image Generative Art, https://beta.dreamstudio.ai/dream' | ||
} | ||
src={`${API_GATEWAY}/public/media/1375898092_synapses__data___database__information__network__neural_path__futuristic_and_medical__realistic__8k__pic_of_the_day.png`} | ||
/> | ||
|
||
<CardContent> | ||
<Typography variant='h5'>Data</Typography> | ||
|
||
<Typography | ||
sx={{ mt: 2 }} | ||
gutterBottom | ||
variant='body2' | ||
color='text.secondary' | ||
> | ||
Private space for your center data. | ||
</Typography> | ||
<> | ||
<Typography sx={{ mt: 2 }} variant='body2'> | ||
{sessions?.length} Opened desktop | ||
</Typography> | ||
<Box sx={{ display: 'flex', alignItems: 'center' }}> | ||
<Box sx={{ mr: 0.5 }}> | ||
<Typography variant='subtitle2'> | ||
{!bidsDatasets && <CircularProgress size={12} />} | ||
{bidsDatasets?.reduce( | ||
(a, b) => a + (b?.ParticipantsCount || 0), | ||
0 | ||
)}{' '} | ||
subjects in {''} | ||
{bidsDatasets?.length} BIDS datasets | ||
</Typography> | ||
</Box> | ||
</Box> | ||
</> | ||
</CardContent> | ||
</Card> | ||
</> | ||
) | ||
} | ||
|
||
export default DataCard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.