-
Notifications
You must be signed in to change notification settings - Fork 448
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove antd package Change TabPanel for creating Experiment Move TabPanel to Common components * Remove antd from package.json * Modify Katib Link and Main Page * Change Trial and Jobs monitor * Fix links, margin in Trial view * Increase margin for Trial
- Loading branch information
1 parent
688636e
commit 4da82cf
Showing
16 changed files
with
163 additions
and
117 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
81 changes: 81 additions & 0 deletions
81
pkg/ui/v1alpha3/frontend/src/components/Common/Create/TabPanel.jsx
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 React from 'react'; | ||
|
||
import { withStyles } from '@material-ui/core/styles'; | ||
import makeStyles from '@material-ui/styles/makeStyles'; | ||
import Tabs from '@material-ui/core/Tabs'; | ||
import Tab from '@material-ui/core/Tab'; | ||
|
||
import HPYAML from '../../HP/Create/YAML'; | ||
import HPParameters from '../../HP/Create/HPParameters'; | ||
import NASYAML from '../../NAS/Create/YAML'; | ||
import NASParameters from '../../NAS/Create/NASParameters'; | ||
|
||
import * as constants from '../../../constants/constants'; | ||
|
||
const useStyles = makeStyles({ | ||
root: { | ||
marginTop: 40, | ||
}, | ||
}); | ||
|
||
const MyTabs = withStyles({ | ||
root: { | ||
borderBottom: '1px solid #e8e8e8', | ||
marginBottom: 15, | ||
}, | ||
indicator: { | ||
backgroundColor: '#1890ff', | ||
}, | ||
})(Tabs); | ||
|
||
const MyTab = withStyles(theme => ({ | ||
root: { | ||
textTransform: 'none', | ||
marginRight: 40, | ||
minWidth: 40, | ||
fontWeight: theme.typography.fontWeightRegular, | ||
fontSize: 14, | ||
opacity: 1, | ||
'&:hover': { | ||
color: '#40a9ff', | ||
}, | ||
'&$selected': { | ||
color: '#1890ff', | ||
fontWeight: theme.typography.fontWeightMedium, | ||
}, | ||
'&:focus': { | ||
color: '#1890ff', | ||
}, | ||
}, | ||
selected: {}, | ||
}))(props => <Tab disableRipple {...props} />); | ||
|
||
const TabsPanel = props => { | ||
const [tabIndex, setTabIndex] = React.useState(0); | ||
|
||
const onTabChange = (event, newIndex) => { | ||
setTabIndex(newIndex); | ||
}; | ||
const classes = useStyles(); | ||
return ( | ||
<div className={classes.root}> | ||
<MyTabs value={tabIndex} onChange={onTabChange}> | ||
<MyTab label="YAML File" /> | ||
<MyTab label="Parameters" /> | ||
</MyTabs> | ||
{props.match.path === constants.LINK_HP_CREATE ? ( | ||
tabIndex === 0 ? ( | ||
<HPYAML /> | ||
) : ( | ||
<HPParameters /> | ||
) | ||
) : tabIndex === 0 ? ( | ||
<NASYAML /> | ||
) : ( | ||
<NASParameters /> | ||
)} | ||
</div> | ||
); | ||
}; | ||
|
||
export default TabsPanel; |
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
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
35 changes: 0 additions & 35 deletions
35
pkg/ui/v1alpha3/frontend/src/components/NAS/Create/NAS.jsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.