Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
Signed-off-by: Ce Gao <gaoce@caicloud.io>
  • Loading branch information
gaocegege committed Sep 27, 2019
1 parent b3f005e commit 45b3da8
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ const HPParameters = (props) => {
goTemplate: {
templateSpec: {
configMapName: "trial-template",
configMapNamespace: data.metadata.namespace,
configMapNamespace: props.trialNamespace,
templatePath: props.trial,
}
}
Expand Down
71 changes: 46 additions & 25 deletions pkg/ui/v1alpha3/frontend/src/components/HP/Create/Params/Trial.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import InputLabel from '@material-ui/core/InputLabel';
import MenuItem from '@material-ui/core/MenuItem';
import FormControl from '@material-ui/core/FormControl';
import Select from '@material-ui/core/Select';
import TextField from '@material-ui/core/TextField';

import { connect } from 'react-redux';
import { changeTrial } from '../../../../actions/hpCreateActions';
Expand Down Expand Up @@ -54,38 +55,58 @@ class TrialSpecParam extends React.Component {

const { classes } = this.props
return (
<div className={classes.parameter}>
<Grid container alignItems={"center"}>
<Grid item xs={12} sm={3}>
<Typography variant={"subheading"}>
<Tooltip title={"Trial spec template"}>
<HelpOutlineIcon className={classes.help} color={"primary"}/>
</Tooltip>
{"TrialSpec"}
</Typography>
<div>
<div className={classes.parameter}>
<Grid container alignItems={"center"}>
<Grid item xs={12} sm={3}>
<Typography variant={"subheading"}>
<Tooltip title={"Trial namespace"}>
<HelpOutlineIcon className={classes.help} color={"primary"} />
</Tooltip>
{"Namespace"}
</Typography>
</Grid>
<Grid item xs={12} sm={8}>
<TextField
className={"Trial Namespace"}
value={this.props.trialNamespace}
/>
</Grid>
</Grid>
<Grid item xs={12} sm={8}>
<FormControl variant="outlined" className={classes.formControl}>
<InputLabel>
Trial Spec
</div>
<div className={classes.parameter}>
<Grid container alignItems={"center"}>
<Grid item xs={12} sm={3}>
<Typography variant={"subheading"}>
<Tooltip title={"Trial spec template"}>
<HelpOutlineIcon className={classes.help} color={"primary"} />
</Tooltip>
{"TrialSpec"}
</Typography>
</Grid>
<Grid item xs={12} sm={8}>
<FormControl variant="outlined" className={classes.formControl}>
<InputLabel>
Trial Spec
</InputLabel>
<Select
value={this.props.trial}
onChange={this.onTrialChange}
input={
<OutlinedInput name={"TrialSpec"} labelWidth={100}/>
}
className={classes.select}
<Select
value={this.props.trial}
onChange={this.onTrialChange}
input={
<OutlinedInput name={"TrialSpec"} labelWidth={100} />
}
className={classes.select}
>
{names.map((spec, i) => {
return (
<MenuItem value={spec} key={i}>{spec}</MenuItem>
)
<MenuItem value={spec} key={i}>{spec}</MenuItem>
)
})}
</Select>
</FormControl>
</Select>
</FormControl>
</Grid>
</Grid>
</Grid>
</div>
</div>
)
}
Expand Down

0 comments on commit 45b3da8

Please sign in to comment.