Skip to content
Snippets Groups Projects
Commit 0c74104d authored by Adam Chovan's avatar Adam Chovan
Browse files

fix download

parent eeb20ebf
No related branches found
No related tags found
No related merge requests found
Pipeline #442809 passed
...@@ -14,16 +14,7 @@ export default function About() { ...@@ -14,16 +14,7 @@ export default function About() {
whiteSpace: 'pre-wrap', whiteSpace: 'pre-wrap',
}}> }}>
This app provides ready-to-use, corrected Sentinel-1 GRD products for the Czech Republic. Users can download processed products right away or search and request specific Sentinel-1 GRD products if they're not already available. Corrections are done with SNAP for accurate results. This app provides ready-to-use, corrected Sentinel-1 GRD products for the Czech Republic. Users can download processed products right away or search and request specific Sentinel-1 GRD products if they're not already available. Corrections are done with SNAP for accurate results.
This app was developed with the Institute of Computer Science at Masaryk University and the Czech University of Life Sciences, supported by the CollGS initiative.
The app features two main sections:
Download Products: Where users can instantly download any available processed product.
Request Products: Users can search for specific products to add to the processing queue, which are then processed within a few hours.
Searches pull data from WEBSITE_URL_HERE, part of the Sentinel-1 CollGS initiative. This app was developed with the Institute of Computer Science at Masaryk University and the Czech University of Life Sciences, supported by the CollGS initiative.
{/* This website provides download links to the Sentinel-1 satellite data in an analysis-ready (Radiometrically Terrain-Correct) format. The data was pre-processed with SNAP.
This website was developed in cooperation with the Institute of Computer Science, Masaryk University and Czech University of Life Sciences and supported by the CollGS initiative.
Contact: slaninakova@ics.muni.cz */}
</Typography> </Typography>
<div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center' }}> <div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<img src={muniLogo} alt="Logo of Masaryk University" style={{ width: '160px', height: '50px', marginRight: '20px' }} /> <img src={muniLogo} alt="Logo of Masaryk University" style={{ width: '160px', height: '50px', marginRight: '20px' }} />
......
...@@ -38,7 +38,7 @@ const ActionButton = ({ identifier, status }) => { ...@@ -38,7 +38,7 @@ const ActionButton = ({ identifier, status }) => {
useEffect(() => { useEffect(() => {
switch (status) { switch (status) {
case ProductStatus.NOT_PROCESSED: case ProductStatus.NOT_PROCESSED:
setLabel("Request Product"); setLabel("Request");
setDialogText("Are you sure you want to request this product?"); setDialogText("Are you sure you want to request this product?");
setIsDisabled(false); setIsDisabled(false);
setAction(() => async () => { setAction(() => async () => {
...@@ -96,10 +96,33 @@ const ActionButton = ({ identifier, status }) => { ...@@ -96,10 +96,33 @@ const ActionButton = ({ identifier, status }) => {
return ( return (
<React.Fragment> <React.Fragment>
{showAlert && <FadeAlert message={alertMessage} color={alertColor} />} {showAlert && <FadeAlert message={alertMessage} color={alertColor} />}
<a href={`https://stg.rtc.afolab.cz/api/product/${identifier}`}><Button>Download</Button></a>
{/* <Button disabled={isDisabled} onClick={showModal ? () => setOpen(true) : () => action()} variant="solid" size="md" color="primary" aria-label={label} sx={{ ml: 'auto', alignSelf: 'center', fontWeight: 600, height: 4 }}> {status === ProductStatus.FINISHED ? (
<a href={`/api/product/${identifier}`}>
<Button
disabled={isDisabled}
onClick={showModal ? () => setOpen(true) : () => action()}
variant="solid"
size="lg"
color="primary"
aria-label={label}
sx={{ ml: 'auto', alignSelf: 'center', fontWeight: 600, height: '4' }}>
{label}
</Button>
</a>
) : (
<Button
disabled={isDisabled}
onClick={showModal ? () => setOpen(true) : () => action()}
variant="solid"
size="lg"
color="primary"
aria-label={label}
sx={{ ml: 'auto', alignSelf: 'center', fontWeight: 600, height: '4' }}>
{label} {label}
</Button> */} </Button>
)}
<Modal open={open} onClose={() => setOpen(false)}> <Modal open={open} onClose={() => setOpen(false)}>
<ModalDialog variant="outlined" role="alertdialog"> <ModalDialog variant="outlined" role="alertdialog">
<DialogTitle> <DialogTitle>
......
...@@ -78,7 +78,9 @@ const MapGrid = ({ products }) => { ...@@ -78,7 +78,9 @@ const MapGrid = ({ products }) => {
{data.status} {data.status}
</Typography> </Typography>
</Alert> </Alert>
<ActionButton identifier={data.identifier} status={data.status}/> <div style={{ display: 'flex', justifyContent: 'flex-end', flex: 1 }}>
<ActionButton identifier={data.identifier} status={data.status} />
</div>
</CardContent> </CardContent>
</Card> </Card>
))} ))}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment