summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-01-09 21:24:47 +0100
committerJules Laplace <julescarbon@gmail.com>2020-01-09 21:24:47 +0100
commit2b837a59ac17a0178e7ea2644d69c083682622f9 (patch)
treed15a2fa9932e2caf100d2541bb921a1d5ca0bf77 /app
parent7b031ee255679351249c8fb722645a030dc6e98a (diff)
receive updates from app
Diffstat (limited to 'app')
-rw-r--r--app/client/live/live.reducer.js19
-rw-r--r--app/client/modules/biggan/biggan.actions.js13
2 files changed, 28 insertions, 4 deletions
diff --git a/app/client/live/live.reducer.js b/app/client/live/live.reducer.js
index 8112d31..d352d25 100644
--- a/app/client/live/live.reducer.js
+++ b/app/client/live/live.reducer.js
@@ -23,7 +23,7 @@ const liveInitialState = {
}
const liveReducer = (state = liveInitialState, action) => {
- console.log(action)
+ // console.log(action)
let results;
switch(action.type) {
case types.socket.load_params:
@@ -110,6 +110,23 @@ const liveReducer = (state = liveInitialState, action) => {
case types.system.stdout:
if (action.data.processor === 'gpu') {
+ // receive parameter updates from the app
+ if (action.data.data.indexOf('set_opt') !== -1) {
+ const new_opt = action.data.data.trim().split('\n').reduce((a,b) => {
+ if (b.indexOf('set_opt') === 0) {
+ const terms = b.split(' ')
+ a[terms[1]] = terms[2]
+ }
+ return a
+ }, {})
+ return {
+ ...state,
+ opt: {
+ ...state.opt,
+ [line[1]]: line[2],
+ }
+ }
+ }
return {
...state,
last_message: action.data.data,
diff --git a/app/client/modules/biggan/biggan.actions.js b/app/client/modules/biggan/biggan.actions.js
index 10d36ff..cc4211d 100644
--- a/app/client/modules/biggan/biggan.actions.js
+++ b/app/client/modules/biggan/biggan.actions.js
@@ -155,8 +155,16 @@ export const load_directories = (id) => (dispatch) => {
export const load_results = (id) => (dispatch) => {
const module = bigganModule.name
util.allProgress([
- actions.folder.index({ module, name: 'results' }),
- actions.file.index({ module, generated: 1, limit: 250 }),
+ actions.folder.index({
+ module,
+ name: 'results'
+ }),
+ actions.file.index({
+ module,
+ datatype: 'video',
+ generated: 1,
+ limit: 250,
+ }),
// actions.socket.list_directory({ module, dir: 'renders' }),
// actions.socket.list_sequences({ module, dir: 'results' }),
], (percent, i, n) => {
@@ -181,7 +189,6 @@ export const load_results = (id) => (dispatch) => {
export const load_encodings = () => dispatch => {
const module = bigganModule.name
- console.log(actions)
util.allProgress([
actions.folder.index({ module }),
actions.file.index({