summaryrefslogtreecommitdiff
path: root/app/client/dashboard/dashboard.component.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-05-25 19:54:38 +0200
committerJules Laplace <julescarbon@gmail.com>2018-05-25 19:54:38 +0200
commit5a4de48a6d63cb383832f6ef85b21699a511b755 (patch)
tree4c4fd18d26f8b5c95a6788d138ed62869357c975 /app/client/dashboard/dashboard.component.js
parent1a99af129427275c22e8276e75fa4b8da6602129 (diff)
stubbing in a lot of stuff!
Diffstat (limited to 'app/client/dashboard/dashboard.component.js')
-rw-r--r--app/client/dashboard/dashboard.component.js71
1 files changed, 71 insertions, 0 deletions
diff --git a/app/client/dashboard/dashboard.component.js b/app/client/dashboard/dashboard.component.js
new file mode 100644
index 0000000..6db42ae
--- /dev/null
+++ b/app/client/dashboard/dashboard.component.js
@@ -0,0 +1,71 @@
+import { h, Component } from 'preact'
+import { bindActionCreators } from 'redux'
+import { connect } from 'react-redux'
+
+import Player from '../common/player.component'
+import Group from '../common/group.component'
+import Slider from '../common/slider.component'
+import Select from '../common/select.component'
+import Button from '../common/button.component'
+
+import DashboardHeader from './dashboardheader.component'
+import TaskList from './tasklist.component'
+import FileList from './filelist.component'
+import Gallery from './gallery.component'
+
+import * as liveActions from './actions'
+
+class Dashboard extends Component {
+ constructor(props){
+ super()
+ }
+ componentWillUpdate(nextProps) {
+ // if (nextProps.opt.checkpoint_name && nextProps.opt.checkpoint_name !== this.props.opt.checkpoint_name) {
+ // this.props.actions.list_epochs(nextProps.opt.checkpoint_name)
+ // }
+ }
+ render(){
+ const { tasks, files, images, site } = this.props
+ return (
+ <div className='dashboard'>
+ <DashboardHeader />
+ <div className='params'>
+ <div className='column'>
+ <Group title='Completed Tasks'>
+ <TaskList tasks={tasks} />
+ </Group>
+ <Group title='Upcoming Tasks'>
+ <TaskList tasks={tasks} />
+ </Group>
+ </div>
+ <div className='column'>
+ <Group title='Your Datasets'>
+ <FileList files={files} />
+ </Group>
+ <Group title='Results'>
+ <FileList files={files} />
+ </Group>
+ <Group title='Audio Player'>
+ <FileList files={files} />
+ </Group>
+ </div>
+ </div>
+ <div>
+ <Gallery images={images} />
+ </div>
+ </div>
+ )
+ }
+}
+const mapStateToProps = state => ({
+ site: state.system.site,
+ images: state.system.images,
+ tasks: state.system.tasks,
+ files: state.system.files
+})
+
+const mapDispatchToProps = (dispatch, ownProps) => ({
+ actions: bindActionCreators(liveActions, dispatch)
+})
+
+export default connect(mapStateToProps, mapDispatchToProps)(Dashboard)