summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-06-26 17:20:54 +0200
committerJules Laplace <julescarbon@gmail.com>2018-06-26 17:20:54 +0200
commit113857a1a091add62c5479bece88d3c243a97098 (patch)
treec9d55cc2fa5f60465aefce3f1098bad1a157fb37 /app
parent216f240c8ac0a33d920aa467600a777a974d2db9 (diff)
deploy bundle
Diffstat (limited to 'app')
-rw-r--r--app/client/common/currentTask.component.js8
-rw-r--r--app/client/modules/morph/views/morph.app.js6
2 files changed, 11 insertions, 3 deletions
diff --git a/app/client/common/currentTask.component.js b/app/client/common/currentTask.component.js
index 7960e5c..9bb9c0d 100644
--- a/app/client/common/currentTask.component.js
+++ b/app/client/common/currentTask.component.js
@@ -23,7 +23,13 @@ function CurrentTask ({ cpu, gpu, processor }) {
const { activity, epoch, epochs, dataset, module } = task
return (
<div>
- #{pid}: <b>{module} {activity}</b> <i>{dataset}</i> {epochs} epoch{util.courtesy_s(epochs)} (currently #{epoch})
+ #{pid}: <b>{module} {activity}</b> <i>{dataset}</i>
+ {epochs
+ ? <span>{epochs} epoch{util.courtesy_s(epochs)}</span>
+ : ""}
+ {epoch
+ ? <span>(currently #{epoch})</span>
+ : ""}
<br/><br/>
<div class='quiet'>{last_message}</div>
</div>
diff --git a/app/client/modules/morph/views/morph.app.js b/app/client/modules/morph/views/morph.app.js
index 1385e98..fe28659 100644
--- a/app/client/modules/morph/views/morph.app.js
+++ b/app/client/modules/morph/views/morph.app.js
@@ -13,6 +13,7 @@ import Loading from '../../../common/loading.component'
import {
Select, Slider, Checkbox, Group,
Button, Param, FileList, FileRow,
+ CurrentTask,
} from '../../../common'
let yes_count = 0
@@ -53,7 +54,7 @@ class MorphResults extends Component {
const totalLength = this.state.frames / 25
let lengthWarning
- if ((this.state.steps / this.state.dilate) > 64) {
+ if ((this.state.steps / this.state.dilate) > 64 && this.state.mode === 'mix') {
lengthWarning = (
<span><br/>warning, this will take a while</span>
)
@@ -103,7 +104,7 @@ class MorphResults extends Component {
title={"Mode"}
value={this.state.mode}
options={['mix', 'average', 'mix_images']}
- onChange={key => this.setState({ mode: key })}
+ onChange={(name, key) => this.setState({ mode: key })}
/>
<Slider
type="list"
@@ -138,6 +139,7 @@ class MorphResults extends Component {
</Param>
{lengthWarning}
<br />
+ <CurrentTask />
</Group>
</div>