diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-06-08 02:55:28 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-06-08 02:55:28 +0200 |
| commit | 9994478a0f6895b4d62747d31c82f4936ac156f9 (patch) | |
| tree | d759a5eb89bea3dd3a273aa1a9abe9b2f871cc97 /app | |
| parent | 4ea714781e99ca8358bd74a8f3482dd46340654a (diff) | |
gotta go with the dataset
Diffstat (limited to 'app')
| -rw-r--r-- | app/client/common/currentTask.component.js | 11 | ||||
| -rw-r--r-- | app/client/common/fileList.component.js | 1 | ||||
| -rw-r--r-- | app/client/dataset/dataset.loader.js | 4 | ||||
| -rw-r--r-- | app/client/modules/pix2pix/views/pix2pix.show.js | 11 |
4 files changed, 21 insertions, 6 deletions
diff --git a/app/client/common/currentTask.component.js b/app/client/common/currentTask.component.js index 7dcaf83..7960e5c 100644 --- a/app/client/common/currentTask.component.js +++ b/app/client/common/currentTask.component.js @@ -6,8 +6,15 @@ import util from '../util' // import { Loading, CurrentTask, FileList, FileRow } from '../../../common' function CurrentTask ({ cpu, gpu, processor }) { - const processor_name = processor === 'cpu' ? 'cpu' : 'gpu' - const p = processor === 'cpu' ? cpu : gpu + let processor_name + if (processor) { + processor_name = processor === 'cpu' ? 'cpu' : 'gpu' + } else if (gpu.status !== 'IDLE') { + processor_name = 'gpu' + } else if (cpu.status !== 'IDLE') { + processor_name = 'cpu' + } + const p = processor_name === 'cpu' ? cpu : gpu if (!p) return <div></div> if (p.status === 'IDLE') { return <div>{processor_name} idle</div> diff --git a/app/client/common/fileList.component.js b/app/client/common/fileList.component.js index 5daa165..7e23044 100644 --- a/app/client/common/fileList.component.js +++ b/app/client/common/fileList.component.js @@ -41,6 +41,7 @@ export const FileList = props => { </div> ) } + console.log(files) return ( <div className={'rows ' + className}> {title && diff --git a/app/client/dataset/dataset.loader.js b/app/client/dataset/dataset.loader.js index 3887e69..ad42e46 100644 --- a/app/client/dataset/dataset.loader.js +++ b/app/client/dataset/dataset.loader.js @@ -83,7 +83,7 @@ export const load = module => { } const name = (file.name || 'unsorted').split('.')[0] const folder = folderLookup[file.folder_id] || unsortedFolder(module) - const dataset = getDataset(module, datasetLookup, name, folder, file.date || file.created_at) + const dataset = getDataset(module, datasetLookup, file.dataset || name, folder, file.date || file.created_at) if (file.url.match(file.name)) file.persisted = true dataset.input.push(file.id) folder.files.push(file.id) @@ -95,7 +95,7 @@ export const load = module => { fileLookup[file.id] = file const pair = file.name.split('.')[0].split('-') const folder = folderLookup[file.folder_id] || unsortedFolder(module) - const dataset = getDataset(module, datasetLookup, pair[0], folder, file.date || file.created_at) + const dataset = getDataset(module, datasetLookup, file.dataset || pair[0], folder, file.date || file.created_at) dataset.output.push(file.id) folder.files.push(file.id) file.epoch = file.epoch || pair[1] diff --git a/app/client/modules/pix2pix/views/pix2pix.show.js b/app/client/modules/pix2pix/views/pix2pix.show.js index 2713559..4e6e1c3 100644 --- a/app/client/modules/pix2pix/views/pix2pix.show.js +++ b/app/client/modules/pix2pix/views/pix2pix.show.js @@ -6,11 +6,10 @@ import util from '../../../util' import * as pix2pixActions from '../pix2pix.actions' import * as pix2pixTasks from '../pix2pix.tasks' -import Loading from '../../../common/loading.component' +import { Loading, CurrentTask, FileList, FileRow } from '../../../common' import DatasetForm from '../../../dataset/dataset.form' import NewDatasetForm from '../../../dataset/dataset.new' import UploadStatus from '../../../dataset/upload.status' -import { FileList, FileRow } from '../../../common/fileList.component' import DatasetComponent from '../../../dataset/dataset.component' @@ -48,6 +47,7 @@ class Pix2pixShow extends Component { <UploadStatus /> </div> </div> + <div className='row'> {folder && folder.name && folder.name !== 'unsorted' && <DatasetForm title='Add Files' @@ -56,6 +56,13 @@ class Pix2pixShow extends Component { canUpload canAddURL /> } + <div> + <UploadStatus /> + <CurrentTask /> + </div> + </div> + + <DatasetComponent loading={pix2pix.loading} progress={pix2pix.progress} |
