-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Pipelines page layout #203
Merged
Merged
Changes from 6 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
acc4140
Implement Pipelines page layout
jandsonrj 4039f8f
Complete pipelines page layout.
jandsonrj b21e150
change in the screen layout of Pipeline Cards
jandsonrj 8e9c69c
Adjust the background color of the card, making it slightly different…
jandsonrj 90b9fa6
screen with pipeline cards
jandsonrj f0c8443
remove circularprogress 'loading'
jandsonrj 327f1fb
adjustment to the files requested by Glauber during the Pull Request …
jandsonrj ca5dbd1
removing disused files
jandsonrj 7ab2180
removing disused files and codes
jandsonrj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import React from 'react' | ||
import { Grid, Typography } from '@mui/material' | ||
import useStyles from '../styles/pages/banner' | ||
const Banner = () => { | ||
const classes = useStyles() | ||
|
||
return ( | ||
<Grid className={classes.banner}> | ||
<Grid | ||
container | ||
direction="row" | ||
justifyContent="space-between" | ||
alignItems="flex-start" | ||
className={classes.container} | ||
> | ||
<Grid item xs={12} className={classes.titleWrapper}> | ||
<Typography variant="h1" className={classes.title}> | ||
PZ Server Pipelines | ||
</Typography> | ||
<Typography variant="body1" display="block"> | ||
<p> | ||
Pipelines to create customized science-driven PZ-related data | ||
products. | ||
</p> | ||
</Typography> | ||
</Grid> | ||
</Grid> | ||
</Grid> | ||
) | ||
} | ||
|
||
export default Banner |
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,44 @@ | ||
import * as React from 'react' | ||
import Box from '@mui/material/Box' | ||
import Card from '@mui/material/Card' | ||
import CardContent from '@mui/material/CardContent' | ||
import CardMedia from '@mui/material/CardMedia' | ||
import Typography from '@mui/material/Typography' | ||
import Link from '../components/Link' | ||
import { useTheme } from '@mui/system' | ||
|
||
function SpeczCatalogs() { | ||
const theme = useTheme() | ||
|
||
return ( | ||
<Link href="/specz_catalogs"> | ||
<Card | ||
sx={{ | ||
display: 'flex', | ||
backgroundColor: | ||
theme.palette.mode === 'light' ? theme.palette.grey[100] : '', | ||
boxShadow: 4 | ||
}} | ||
> | ||
<CardMedia | ||
component="img" | ||
sx={{ width: 350 }} | ||
image="../interfaces/milkyway.jpg" | ||
alt="Spec-z Catalogs" | ||
/> | ||
<Box> | ||
<CardContent m={2} sx={{ maxWidth: 500 }}> | ||
<Typography variant="h5">Combine Spec-z Catalogs</Typography> | ||
<Typography variant="body1" color="text.secondary"> | ||
Creates a single spec-z sample from the multiple spatial | ||
cross-matching (all-to-all) of a list of pre-registered individual | ||
Spec-z Catalogs. | ||
</Typography> | ||
</CardContent> | ||
</Box> | ||
</Card> | ||
</Link> | ||
) | ||
} | ||
|
||
export default SpeczCatalogs |
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,85 @@ | ||
import { DataGrid } from '@mui/x-data-grid' | ||
import moment from 'moment' | ||
import PropTypes from 'prop-types' | ||
|
||
const columns = [ | ||
{ | ||
field: 'display_name', | ||
headerName: 'Name', | ||
sortable: true, | ||
flex: 1 | ||
}, | ||
{ | ||
field: 'uploaded_by', | ||
headerName: 'Uploaded By', | ||
flex: 1, | ||
sortable: false | ||
}, | ||
{ | ||
field: 'created_at', | ||
headerName: 'Created at', | ||
sortable: true, | ||
width: 200, | ||
valueFormatter: params => { | ||
if (!params.value) { | ||
return '' | ||
} | ||
return moment(params.value).format('YYYY-MM-DD') | ||
} | ||
} | ||
] | ||
|
||
function DataTable({ rows }) { | ||
return ( | ||
<div style={{ height: 300, width: '100%' }}> | ||
<DataGrid | ||
rows={rows} | ||
columns={columns} | ||
// getRowId={row => row.id} | ||
pageSizeOptions={[5, 10]} | ||
checkboxSelection | ||
/> | ||
</div> | ||
) | ||
} | ||
|
||
DataTable.propTypes = { | ||
rows: PropTypes.arrayOf(PropTypes.object).isRequired | ||
} | ||
|
||
const rows = [ | ||
{ | ||
id: 1, | ||
display_name: 'Jandson 1', | ||
uploaded_by: 'User1', | ||
created_at: '2023-01-01' | ||
}, | ||
{ | ||
id: 2, | ||
display_name: 'Jandson 2', | ||
uploaded_by: 'User2', | ||
created_at: '2023-02-15' | ||
}, | ||
{ | ||
id: 3, | ||
display_name: 'Jandson 3', | ||
uploaded_by: 'User3', | ||
created_at: '2023-03-22' | ||
}, | ||
{ | ||
id: 4, | ||
display_name: 'Jandson V', | ||
uploaded_by: 'User1', | ||
created_at: '2023-04-10' | ||
}, | ||
{ | ||
id: 5, | ||
display_name: 'Jandson Try', | ||
uploaded_by: 'User2', | ||
created_at: '2023-05-05' | ||
} | ||
] | ||
|
||
export default function App() { | ||
return <DataTable rows={rows} /> | ||
} |
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,44 @@ | ||
import * as React from 'react' | ||
import Box from '@mui/material/Box' | ||
import Card from '@mui/material/Card' | ||
import CardContent from '@mui/material/CardContent' | ||
import CardMedia from '@mui/material/CardMedia' | ||
import Typography from '@mui/material/Typography' | ||
import Link from '../components/Link' | ||
import { useTheme } from '@mui/system' | ||
|
||
function TrainingSetMaker() { | ||
const theme = useTheme() | ||
|
||
return ( | ||
<Link href="/training_set_maker"> | ||
<Card | ||
sx={{ | ||
display: 'flex', | ||
flexDirection: 'row-reverse', | ||
backgroundColor: | ||
theme.palette.mode === 'light' ? theme.palette.grey[100] : '', | ||
boxShadow: 4 | ||
}} | ||
> | ||
<CardMedia | ||
component="img" | ||
sx={{ width: 350 }} | ||
image="../interfaces/lsst_summit.jpg" | ||
alt="Training Set Maker" | ||
/> | ||
<Box> | ||
<CardContent m={2} sx={{ maxWidth: 500 }}> | ||
<Typography variant="h5">Training Set Maker</Typography> | ||
<Typography variant="body1" color="text.secondary"> | ||
Creates a training set from the spatial cross-matching of a given | ||
Spec-z Catalog and the LSST Objects Catalogs. | ||
</Typography> | ||
</CardContent> | ||
</Box> | ||
</Card> | ||
</Link> | ||
) | ||
} | ||
|
||
export default TrainingSetMaker |
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,84 @@ | ||
import { DataGrid } from '@mui/x-data-grid' | ||
import moment from 'moment' | ||
import PropTypes from 'prop-types' | ||
|
||
const columns = [ | ||
{ | ||
field: 'display_name', | ||
headerName: 'Name', | ||
sortable: true, | ||
flex: 1 | ||
}, | ||
{ | ||
field: 'uploaded_by', | ||
headerName: 'Uploaded By', | ||
flex: 1, | ||
sortable: false | ||
}, | ||
{ | ||
field: 'created_at', | ||
headerName: 'Created at', | ||
sortable: true, | ||
width: 200, | ||
valueFormatter: params => { | ||
if (!params.value) { | ||
return '' | ||
} | ||
return moment(params.value).format('YYYY-MM-DD') | ||
} | ||
} | ||
] | ||
|
||
function DataTable({ rows }) { | ||
return ( | ||
<div style={{ height: 300, width: '100%' }}> | ||
<DataGrid | ||
rows={rows} | ||
columns={columns} | ||
// getRowId={row => row.id} | ||
pageSizeOptions={[5, 10]} | ||
/> | ||
</div> | ||
) | ||
} | ||
|
||
DataTable.propTypes = { | ||
rows: PropTypes.arrayOf(PropTypes.object).isRequired | ||
} | ||
|
||
const rows = [ | ||
{ | ||
id: 1, | ||
display_name: 'Jandson 1', | ||
uploaded_by: 'User1', | ||
created_at: '2023-01-01' | ||
}, | ||
{ | ||
id: 2, | ||
display_name: 'Jandson 2', | ||
uploaded_by: 'User2', | ||
created_at: '2023-02-15' | ||
}, | ||
{ | ||
id: 3, | ||
display_name: 'Jandson 3', | ||
uploaded_by: 'User3', | ||
created_at: '2023-03-22' | ||
}, | ||
{ | ||
id: 4, | ||
display_name: 'Jandson V', | ||
uploaded_by: 'User1', | ||
created_at: '2023-04-10' | ||
}, | ||
{ | ||
id: 5, | ||
display_name: 'Jandson Try', | ||
uploaded_by: 'User2', | ||
created_at: '2023-05-05' | ||
} | ||
] | ||
|
||
export default function App() { | ||
return <DataTable rows={rows} /> | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,29 @@ | ||
import { Typography } from '@mui/material' | ||
import * as React from 'react' | ||
import useStyles from '../styles/pages/pz_pipelines' | ||
|
||
export default function PZPipelines() { | ||
const classes = useStyles() | ||
import React from 'react' | ||
import { Grid, Typography } from '@mui/material' | ||
import SpeczCatalogs from '../components/SpeczCatalogs' | ||
import TrainingSetMaker from '../components/TrainingSetMaker' | ||
|
||
function PZPipelines() { | ||
return ( | ||
<div className={classes.container}> | ||
<Typography variant="h5" className={classes.message}> | ||
Coming Soon... | ||
<Grid container direction="column" alignItems="center"> | ||
<Typography | ||
variant="h4" | ||
align="center" | ||
color="textPrimary" | ||
mb={10} | ||
mt={-12} | ||
> | ||
Photo-z Server Pipelines | ||
</Typography> | ||
</div> | ||
|
||
<Grid item mb={5}> | ||
<SpeczCatalogs /> | ||
</Grid> | ||
<Grid item> | ||
<TrainingSetMaker /> | ||
</Grid> | ||
</Grid> | ||
) | ||
} | ||
|
||
export default PZPipelines |
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,12 @@ | ||
import React from 'react' | ||
import { Typography } from '@mui/material' | ||
|
||
function SpeczCatalogs() { | ||
return ( | ||
<div style={{ textAlign: 'center' }}> | ||
<Typography variant="h4">Coming soon...</Typography> | ||
</div> | ||
) | ||
} | ||
|
||
export default SpeczCatalogs |
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,12 @@ | ||
import React from 'react' | ||
import { Typography } from '@mui/material' | ||
|
||
function TrainingSetMaker() { | ||
return ( | ||
<div style={{ textAlign: 'center' }}> | ||
<Typography variant="h4">Coming soon...</Typography> | ||
</div> | ||
) | ||
} | ||
|
||
export default TrainingSetMaker |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Como estamos usando material ui, ao inves de criar uma div com style pode usar o Box com sx no final é a mesma coisa, mas vc vai estar usando a sintaxe do material ui
caso precisemos alterar alguma coisa no futuro todos os componentes vão estar uniformes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I made the suggested changes.
I put 'div' because it is a temporary screen, as I am already developing the main screen. Thank you for the tips.