-
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 #11 from hicsail/hazim/web-ui/experimentPage
Hazim/web UI/experiment page
- Loading branch information
Showing
12 changed files
with
400 additions
and
133 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,72 @@ | ||
import { | ||
Box, | ||
TextField, | ||
FormGroup, | ||
FormControlLabel, | ||
Checkbox, | ||
Divider, | ||
Card, | ||
CardContent, | ||
Accordion, | ||
AccordionSummary, | ||
AccordionDetails, | ||
List, | ||
ListItemText, | ||
Typography, | ||
Button | ||
} from "@mui/material"; | ||
import { FC, useState, ChangeEvent } from "react"; | ||
import { SummaryCard } from "../types/ExperimentTypes"; | ||
import ExpandMoreIcon from "@mui/icons-material/ExpandMore"; | ||
export interface SidebarcardProps { | ||
item: SummaryCard | ||
key: number; | ||
} | ||
|
||
interface SidebarcardProps { | ||
label: string; | ||
const textPairing: { [key: string]: string } = { | ||
"mediaVolume": "Media Volume(ml)", | ||
"mediaConcentration": "Media Concentration(mmol/cm3)", | ||
"demographicNoise": "Demographic Noise", | ||
"demographicNoiseAmplitude": "Demographic Noise Amplitude", | ||
"uptakeVMax": "Uptake Vmax", | ||
"uptakeKm": "Uptake Km", | ||
"deathRate": "Death Rate", | ||
"biomassLinearDiffusivity": "Biomass Linear Diffusivity", | ||
"biomassNonlinearDiffusivity": "Biomass Non-Linear Diffusivity", | ||
"simulatedTime": "Simulated Time", | ||
"timeSteps": "Time Steps", | ||
"nutrientDiffusivity": "Nutrient Diffusivity", | ||
"logFrequency": "Log Frequency" | ||
} | ||
|
||
export const SidebarCard = () => { | ||
|
||
export const SidebarCard: FC<SidebarcardProps> = (props) => { | ||
return ( | ||
<Box sx={{ width: "95%", marginLeft: 1 }}> | ||
<Card variant="outlined"> | ||
<CardContent> | ||
<Typography variant="h6"></Typography> | ||
</CardContent> | ||
</Card> | ||
<Box sx={{ width: "95%", marginLeft: 1, paddingBottom:'0.5vh' }} key={props.key}> | ||
|
||
<Accordion> | ||
<AccordionSummary | ||
expandIcon={<ExpandMoreIcon />} | ||
aria-controls="panel1-content" | ||
id="panel1-header" | ||
> | ||
<Typography variant="h6">{props.item.label}</Typography> | ||
|
||
</AccordionSummary> | ||
<AccordionDetails> | ||
<List> | ||
<ListItemText> | ||
{ | ||
Object.keys(props.item.info.params).map(key => { | ||
let ret; | ||
if(typeof(props.item.info.params[key]) === 'boolean'){ | ||
ret = <Typography textAlign={'left'} textOverflow={'wrap'}>{textPairing[key]}: {String(props.item.info.params[key])}</Typography> | ||
}else{ | ||
ret = <Typography textAlign={'left'} textOverflow={'wrap'}>{textPairing[key]}: {props.item.info.params[key]}</Typography> | ||
} | ||
return( | ||
ret | ||
) | ||
}) | ||
} | ||
</ListItemText> | ||
</List> | ||
</AccordionDetails> | ||
</Accordion> | ||
|
||
</Box> | ||
); | ||
}; |
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.