From 9994478a0f6895b4d62747d31c82f4936ac156f9 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 8 Jun 2018 02:55:28 +0200 Subject: gotta go with the dataset --- app/client/common/currentTask.component.js | 11 +++++++++-- app/client/common/fileList.component.js | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'app/client/common') 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
if (p.status === 'IDLE') { return
{processor_name} idle
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 => { ) } + console.log(files) return (
{title && -- cgit v1.2.3-70-g09d2