|
@@ -1,132 +1,36 @@
|
|
|
import React, { Component } from 'react'
|
|
|
-import { withStyles } from 'material-ui/styles'
|
|
|
-import Drawer from 'material-ui/Drawer'
|
|
|
-import AppBar from 'material-ui/AppBar'
|
|
|
-import Toolbar from 'material-ui/Toolbar'
|
|
|
-import Typography from 'material-ui/Typography'
|
|
|
-import ListSubheader from 'material-ui/List/ListSubheader'
|
|
|
-import List, { ListItem, ListItemIcon, ListItemText } from 'material-ui/List'
|
|
|
-import FactoryIcon from './icons/FactoryIcon'
|
|
|
-import TaskIcon from './icons/TaskIcon'
|
|
|
-import DockerIcon from './icons/DockerIcon'
|
|
|
-import UserIcon from './icons/UserIcon'
|
|
|
-import PermissionIcon from './icons/PermissionIcon'
|
|
|
-import AboutIcon from './icons/AboutIcon'
|
|
|
-import ContainersTable from './tables/ContainersTable'
|
|
|
-import Avatar from 'material-ui/Avatar'
|
|
|
-import Button from 'material-ui/Button'
|
|
|
-import Menu, { MenuItem } from 'material-ui/Menu'
|
|
|
+import { MuiThemeProvider, createMuiTheme } from 'material-ui/styles'
|
|
|
+import Reboot from 'material-ui/Reboot'
|
|
|
+import Base from './Base'
|
|
|
|
|
|
-const drawerWidth = 265
|
|
|
-
|
|
|
-const styles = theme => ({
|
|
|
- root: {
|
|
|
- flexGrow: 1,
|
|
|
- zIndex: 1,
|
|
|
- overflow: 'hidden',
|
|
|
- position: 'relative',
|
|
|
- display: 'flex'
|
|
|
- },
|
|
|
- appBar: {
|
|
|
- zIndex: theme.zIndex.drawer + 1,
|
|
|
- },
|
|
|
- toolbar: theme.mixins.toolbar,
|
|
|
- titleBar: {
|
|
|
- flexGrow: 1
|
|
|
- },
|
|
|
- userBar: {
|
|
|
- display: 'flex',
|
|
|
- },
|
|
|
- avatar: {
|
|
|
- color: '#fff',
|
|
|
- backgroundColor: '#fff'
|
|
|
- },
|
|
|
- drawerPaper: {
|
|
|
- position: 'relative',
|
|
|
- width: drawerWidth
|
|
|
- },
|
|
|
- content: {
|
|
|
- flexGrow: 1,
|
|
|
- backgroundColor: theme.palette.background.default,
|
|
|
- padding: theme.spacing.unit * 3,
|
|
|
- minWidth: 0
|
|
|
- }
|
|
|
-});
|
|
|
-
|
|
|
class App extends Component {
|
|
|
+ componentDidCatch(error, info) {
|
|
|
+ console.log(error)
|
|
|
+ console.log(info)
|
|
|
+ }
|
|
|
+
|
|
|
render() {
|
|
|
- const { classes } = this.props
|
|
|
+ const theme = createMuiTheme({
|
|
|
+ html: {
|
|
|
+ fontSize: '62.5%'
|
|
|
+ },
|
|
|
+ palette: {
|
|
|
+ primary: {
|
|
|
+ main: '#0288d1'
|
|
|
+ },
|
|
|
+ },
|
|
|
+ typography: {
|
|
|
+ fontSize: 12
|
|
|
+ }
|
|
|
+ })
|
|
|
|
|
|
return (
|
|
|
- <div className={classes.root}>
|
|
|
- <AppBar position="absolute" className={classes.appBar}>
|
|
|
- <Toolbar>
|
|
|
- <Typography className={classes.titleBar} variant="title" color="inherit" noWrap>
|
|
|
- Eiru Automation
|
|
|
- </Typography>
|
|
|
- <div className={classes.userBar}>
|
|
|
- <Avatar className={classes.avatar}>
|
|
|
- <UserIcon />
|
|
|
- </Avatar>
|
|
|
- <Button color="inherit">Anónimo</Button>
|
|
|
- <Menu>
|
|
|
- <MenuItem>Mi Perfil</MenuItem>
|
|
|
- <MenuItem>Salir</MenuItem>
|
|
|
- </Menu>
|
|
|
- </div>
|
|
|
- </Toolbar>
|
|
|
- </AppBar>
|
|
|
- <Drawer variant="permanent" classes={{paper: classes.drawerPaper}}>
|
|
|
- <div className={classes.toolbar} />
|
|
|
- <List component="nav">
|
|
|
- <ListSubheader>Sistemas</ListSubheader>
|
|
|
- <ListItem button>
|
|
|
- <ListItemIcon>
|
|
|
- <DockerIcon />
|
|
|
- </ListItemIcon>
|
|
|
- <ListItemText primary="Contenedores" />
|
|
|
- </ListItem>
|
|
|
- <ListItem button>
|
|
|
- <ListItemIcon>
|
|
|
- <TaskIcon />
|
|
|
- </ListItemIcon>
|
|
|
- <ListItemText primary="Mis tareas" />
|
|
|
- </ListItem>
|
|
|
- <ListItem button>
|
|
|
- <ListItemIcon>
|
|
|
- <FactoryIcon />
|
|
|
- </ListItemIcon>
|
|
|
- <ListItemText primary="Tareas automatizadas" />
|
|
|
- </ListItem>
|
|
|
- <ListSubheader>Administración</ListSubheader>
|
|
|
- <ListItem button>
|
|
|
- <ListItemIcon>
|
|
|
- <UserIcon />
|
|
|
- </ListItemIcon>
|
|
|
- <ListItemText primary="Usuarios" />
|
|
|
- </ListItem>
|
|
|
- <ListItem button>
|
|
|
- <ListItemIcon>
|
|
|
- <PermissionIcon />
|
|
|
- </ListItemIcon>
|
|
|
- <ListItemText primary="Permisos" />
|
|
|
- </ListItem>
|
|
|
- <ListSubheader>Ayuda</ListSubheader>
|
|
|
- <ListItem button>
|
|
|
- <ListItemIcon>
|
|
|
- <AboutIcon />
|
|
|
- </ListItemIcon>
|
|
|
- <ListItemText primary="Acerca" />
|
|
|
- </ListItem>
|
|
|
- </List>
|
|
|
- </Drawer>
|
|
|
- <main className={classes.content}>
|
|
|
- <div className={classes.toolbar}></div>
|
|
|
- <ContainersTable />
|
|
|
- </main>
|
|
|
- </div>
|
|
|
+ <MuiThemeProvider theme={theme}>
|
|
|
+ <Reboot />
|
|
|
+ <Base />
|
|
|
+ </MuiThemeProvider>
|
|
|
)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-export default withStyles(styles)(App);
|
|
|
+export default App;
|