summaryrefslogtreecommitdiff
path: root/app/client/common
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-06-08 02:55:28 +0200
committerJules Laplace <julescarbon@gmail.com>2018-06-08 02:55:28 +0200
commit9994478a0f6895b4d62747d31c82f4936ac156f9 (patch)
treed759a5eb89bea3dd3a273aa1a9abe9b2f871cc97 /app/client/common
parent4ea714781e99ca8358bd74a8f3482dd46340654a (diff)
gotta go with the dataset
Diffstat (limited to 'app/client/common')
-rw-r--r--app/client/common/currentTask.component.js11
-rw-r--r--app/client/common/fileList.component.js1
2 files changed, 10 insertions, 2 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 &&