diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-09-04 13:53:30 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-09-04 13:53:30 +0200 |
| commit | 25815ab4916dc8c9e3256cbfe53bea0535930f30 (patch) | |
| tree | 4d87860e82ede57780497c6016e54bf1af68ca91 /app/client/dashboard/dashboard.component.js | |
| parent | 56619248e5032b644ec7a8e215bd59aecad86c73 (diff) | |
fix loading bars
Diffstat (limited to 'app/client/dashboard/dashboard.component.js')
| -rw-r--r-- | app/client/dashboard/dashboard.component.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/app/client/dashboard/dashboard.component.js b/app/client/dashboard/dashboard.component.js index 3c9b2de..0c15f99 100644 --- a/app/client/dashboard/dashboard.component.js +++ b/app/client/dashboard/dashboard.component.js @@ -11,7 +11,7 @@ import Button from '../common/button.component' import DashboardHeader from './dashboardheader.component' import TaskList from './tasklist.component' -import { FolderList, FileList } from '../common' +import { Loading, FolderList, FileList } from '../common' import Gallery from '../common/gallery.component' import * as dashboardActions from './dashboard.actions' @@ -22,7 +22,7 @@ import actions from '../actions' class Dashboard extends Component { constructor(props){ super() - console.log(props) + // console.log(props) props.actions.load() } componentWillUpdate(nextProps) { @@ -30,9 +30,11 @@ class Dashboard extends Component { // this.props.actions.list_epochs(nextProps.opt.checkpoint_name) } render(){ - const { site, foldersByModule, renders, queue, images } = this.props + const { loading, progress, site, foldersByModule, renders, queue, images } = this.props + if (loading) { + return <Loading progress={progress} /> + } const { tasks } = queue - console.log(foldersByModule) const folders = foldersByModule && Object.keys(modules).sort().map(key => { let path = key === 'samplernn' ? '/samplernn/datasets/' : '/' + key + '/sequences/' let folder_list = (foldersByModule[key] || []).map(folder => { @@ -99,6 +101,8 @@ class Dashboard extends Component { } } const mapStateToProps = state => ({ + loading: state.dashboard.loading, + progress: state.dashboard.progress, site: state.system.site, foldersByModule: state.dashboard.data.foldersByModule, renders: state.dashboard.data.renders, |
