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 /public/bundle.js | |
| parent | 4ea714781e99ca8358bd74a8f3482dd46340654a (diff) | |
gotta go with the dataset
Diffstat (limited to 'public/bundle.js')
| -rw-r--r-- | public/bundle.js | 46 |
1 files changed, 30 insertions, 16 deletions
diff --git a/public/bundle.js b/public/bundle.js index 616dfff..dd012f5 100644 --- a/public/bundle.js +++ b/public/bundle.js @@ -2251,8 +2251,15 @@ function CurrentTask(_ref) { gpu = _ref.gpu, processor = _ref.processor; - var processor_name = processor === 'cpu' ? 'cpu' : 'gpu'; - var p = processor === 'cpu' ? cpu : gpu; + var processor_name = void 0; + if (processor) { + processor_name = processor === 'cpu' ? 'cpu' : 'gpu'; + } else if (gpu.status !== 'IDLE') { + processor_name = 'gpu'; + } else if (cpu.status !== 'IDLE') { + processor_name = 'cpu'; + } + var p = processor_name === 'cpu' ? cpu : gpu; if (!p) return (0, _preact.h)('div', null); if (p.status === 'IDLE') { return (0, _preact.h)( @@ -2406,6 +2413,7 @@ var FileList = exports.FileList = function FileList(props) { ) ); } + console.log(files); return (0, _preact.h)( 'div', { className: 'rows ' + className }, @@ -4992,7 +5000,7 @@ var load = exports.load = function load(module) { } var name = (file.name || 'unsorted').split('.')[0]; var folder = folderLookup[file.folder_id] || unsortedFolder(module); - var dataset = getDataset(module, datasetLookup, name, folder, file.date || file.created_at); + var 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); @@ -5004,7 +5012,7 @@ var load = exports.load = function load(module) { fileLookup[file.id] = file; var pair = file.name.split('.')[0].split('-'); var folder = folderLookup[file.folder_id] || unsortedFolder(module); - var dataset = getDataset(module, datasetLookup, pair[0], folder, file.date || file.created_at); + var 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]; @@ -7532,9 +7540,7 @@ var _pix2pix2 = __webpack_require__(/*! ../pix2pix.tasks */ "./app/client/module var pix2pixTasks = _interopRequireWildcard(_pix2pix2); -var _loading = __webpack_require__(/*! ../../../common/loading.component */ "./app/client/common/loading.component.js"); - -var _loading2 = _interopRequireDefault(_loading); +var _common = __webpack_require__(/*! ../../../common */ "./app/client/common/index.js"); var _dataset = __webpack_require__(/*! ../../../dataset/dataset.form */ "./app/client/dataset/dataset.form.js"); @@ -7548,8 +7554,6 @@ var _upload = __webpack_require__(/*! ../../../dataset/upload.status */ "./app/c var _upload2 = _interopRequireDefault(_upload); -var _fileList = __webpack_require__(/*! ../../../common/fileList.component */ "./app/client/common/fileList.component.js"); - var _dataset5 = __webpack_require__(/*! ../../../dataset/dataset.component */ "./app/client/dataset/dataset.component.js"); var _dataset6 = _interopRequireDefault(_dataset5); @@ -7625,17 +7629,27 @@ var Pix2pixShow = function (_Component) { (0, _preact.h)( 'h1', null, - folder ? folder.name : (0, _preact.h)(_loading2.default, null) + folder ? folder.name : (0, _preact.h)(_common.Loading, null) ), (0, _preact.h)(_upload2.default, null) ) ), - folder && folder.name && folder.name !== 'unsorted' && (0, _preact.h)(_dataset2.default, { - title: 'Add Files', - module: _pix2pix4.default, - folder: folder, - canUpload: true, canAddURL: true - }), + (0, _preact.h)( + 'div', + { className: 'row' }, + folder && folder.name && folder.name !== 'unsorted' && (0, _preact.h)(_dataset2.default, { + title: 'Add Files', + module: _pix2pix4.default, + folder: folder, + canUpload: true, canAddURL: true + }), + (0, _preact.h)( + 'div', + null, + (0, _preact.h)(_upload2.default, null), + (0, _preact.h)(_common.CurrentTask, null) + ) + ), (0, _preact.h)(_dataset6.default, { loading: pix2pix.loading, progress: pix2pix.progress, |
