From eda6b509f909a6ab5d9ab368bf8287fc8e64ba13 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 7 Jun 2018 03:08:33 +0200 Subject: train dataroot --- app/client/socket/socket.live.js | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'app/client/socket') diff --git a/app/client/socket/socket.live.js b/app/client/socket/socket.live.js index a166c5e..ab5878e 100644 --- a/app/client/socket/socket.live.js +++ b/app/client/socket/socket.live.js @@ -5,7 +5,7 @@ import * as player from '../live/player' import { socket } from './socket.connection' socket.on('res', (data) => { - console.log('socket:', data.cmd) + // console.log('socket:', data.cmd) switch (data.cmd) { case 'get_last_frame': if (data.res !== 'working') { @@ -26,35 +26,36 @@ socket.on('res', (data) => { checkpoints: data.res, }) break - case 'list_sequences': - dispatch({ - type: types.socket.list_sequences, - sequences: data.res, - }) - break case 'list_epochs': dispatch({ type: types.socket.list_epochs, epochs: data.res, }) break + case 'list_sequences': + dispatch({ + type: types.socket.list_sequences, + sequences: data.res, + }) + break default: break } - console.log(data) + // console.log(data) }) socket.on('frame', player.onFrame) -export function list_checkpoints() { +export function list_checkpoints(module) { socket.emit('cmd', { cmd: 'list_checkpoints', + payload: module, }) } -export function list_epochs(checkpoint_name) { +export function list_epochs(module, checkpoint_name) { socket.emit('cmd', { cmd: 'list_epochs', - payload: checkpoint_name, + payload: module + '/' + checkpoint_name, }) } export function list_sequences(module) { -- cgit v1.2.3-70-g09d2