From 70b4cc5adcef18d498b539579ecfa626aa5e6c18 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 30 Aug 2018 22:59:28 +0200 Subject: group sequences/checkpoints by folder --- app/client/socket/socket.live.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'app/client/socket/socket.live.js') diff --git a/app/client/socket/socket.live.js b/app/client/socket/socket.live.js index fc53eb3..a1a7a3f 100644 --- a/app/client/socket/socket.live.js +++ b/app/client/socket/socket.live.js @@ -27,6 +27,12 @@ socket.on('res', (data) => { checkpoints: data.res, }) break + case 'list_all_checkpoints': + dispatch({ + type: types.socket.list_all_checkpoints, + checkpoints: data.res, + }) + break case 'list_epochs': dispatch({ type: types.socket.list_epochs, @@ -53,10 +59,16 @@ export function list_checkpoints(module) { payload: module, }) } +export function list_all_checkpoints(module) { + socket.emit('cmd', { + cmd: 'list_all_checkpoints', + payload: module, + }) +} export function list_epochs(module, checkpoint_name) { socket.emit('cmd', { cmd: 'list_epochs', - payload: module + '/' + checkpoint_name, + payload: (module === 'pix2pix' || module === 'pix2wav') ? module + '/' + checkpoint_name : checkpoint_name, }) } export function list_sequences(module) { -- cgit v1.2.3-70-g09d2