From 3504248ae4db51380413c45699e4453efb314561 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sat, 16 Jun 2018 14:03:04 +0200 Subject: load folders into dashboard... --- app/client/dashboard/dashboard.component.js | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'app/client/dashboard/dashboard.component.js') diff --git a/app/client/dashboard/dashboard.component.js b/app/client/dashboard/dashboard.component.js index b248062..58808a3 100644 --- a/app/client/dashboard/dashboard.component.js +++ b/app/client/dashboard/dashboard.component.js @@ -10,29 +10,38 @@ import Button from '../common/button.component' import DashboardHeader from './dashboardheader.component' import TaskList from './tasklist.component' -import { FileList } from '../common/fileList.component' +import { FileList } from '../common' import Gallery from '../common/gallery.component' import * as dashboardActions from './dashboard.actions' +import modules from '../modules' import actions from '../actions' class Dashboard extends Component { constructor(props){ super() - actions.task.index() + console.log(props) + props.actions.load() } 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 { site, queue, images } = this.props + const { site, foldersByModule, queue, images } = this.props const { tasks } = queue + const folders = foldersByModule && Object.keys(modules).sort().map(key => { + console.log(key) + console.log(foldersByModule[key]) + return ( +
+
+ ) + }) return (
-
+
{!!queue.queue.length && @@ -45,6 +54,9 @@ class Dashboard extends Component { }
+
+ {folders} +
) @@ -52,6 +64,7 @@ class Dashboard extends Component { } const mapStateToProps = state => ({ site: state.system.site, + foldersByModule: state.dashboard.data.foldersByModule, images: state.dashboard.images, files: state.dashboard.files, queue: state.queue, -- cgit v1.2.3-70-g09d2