diff options
| author | Jules <jules@asdf.us> | 2018-06-20 12:29:36 -0400 |
|---|---|---|
| committer | Jules <jules@asdf.us> | 2018-06-20 12:29:36 -0400 |
| commit | 89c3c2546af95122099e5e3e7cc0c40448066508 (patch) | |
| tree | 226bcc92ebbfab003339ffbd346a90421d9c6fe0 /app/client/modules/pix2pixhd/views/pix2pixhd.results.js | |
| parent | 95de035728c209a6d0acee9b14a86837e44d26e4 (diff) | |
| parent | 78abe1dc85c7b251cc871ffd4630a4a6c5eb2bd4 (diff) | |
oop
Diffstat (limited to 'app/client/modules/pix2pixhd/views/pix2pixhd.results.js')
| -rw-r--r-- | app/client/modules/pix2pixhd/views/pix2pixhd.results.js | 62 |
1 files changed, 38 insertions, 24 deletions
diff --git a/app/client/modules/pix2pixhd/views/pix2pixhd.results.js b/app/client/modules/pix2pixhd/views/pix2pixhd.results.js index dcbbfad..aa4d6af 100644 --- a/app/client/modules/pix2pixhd/views/pix2pixhd.results.js +++ b/app/client/modules/pix2pixhd/views/pix2pixhd.results.js @@ -13,33 +13,13 @@ import { FileList, FileRow } from '../../../common/fileList.component' class Pix2pixHDResults extends Component { constructor(props){ super() - // if (!props.pix2pixhd.data) props.actions.load_directories() + if (!props.pix2pixhd.results) props.actions.load_results() } render(){ - if (this.props.pix2pixhd.loading) return <Loading progress={this.props.pix2pixhd.progress} /> - // const { folderLookup, fileLookup, datasetLookup } = this.props.samplernn.data + if (! this.props.pix2pixhd.results) return <Loading progress={this.props.pix2pixhd.progress} /> - // console.log(bestRenders.map(r => r.epoch)) - // const path = folder.name === 'unsorted' - // ? "/samplernn/import/" - // : "/samplernn/datasets/" + folder.id + "/" - // return ( - // <div className='col bestRenders'> - // <h3><Link to={path}>{folder.name}</Link></h3> - // <FileList - // linkFiles - // files={bestRenders} - // orderBy='date desc' - // fields={'name date epoch size'} - // onClick={(file, e) => { - // e.preventDefault() - // e.stopPropagation() - // console.log('picked a file', file) - // this.handlePick(file) - // }} - // /> - // </div> - // ) + const { resultsFolder, results, renders, files } = this.props.pix2pixhd.results + console.log(resultsFolder, results) return ( <div className='app pix2pixhd'> @@ -47,6 +27,40 @@ class Pix2pixHDResults extends Component { <h1>Pix2PixHD Results</h1> </div> <div class='rows params renders'> + + <FileList + linkFiles + files={files} + orderBy='date desc' + fields={'name date size'} + /> + + <h3>renders</h3> + <FileList + files={renders} + orderBy='date desc' + fields={'name date size'} + onClick={(file, e) => { + e.preventDefault() + e.stopPropagation() + console.log('picked a result', file) + this.handlePick(file) + }} + /> + + <h3>results</h3> + <FileList + files={results} + orderBy='date desc' + fields={'name date count'} + onClick={(file, e) => { + e.preventDefault() + e.stopPropagation() + console.log('picked a result', file) + this.handlePick(file) + }} + /> + </div> </div> ) |
