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.actions.js | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) (limited to 'app/client/socket/socket.actions.js') diff --git a/app/client/socket/socket.actions.js b/app/client/socket/socket.actions.js index e15dda2..78b0517 100644 --- a/app/client/socket/socket.actions.js +++ b/app/client/socket/socket.actions.js @@ -1,24 +1,13 @@ import uuidv1 from 'uuid/v1' import { socket } from './socket.connection' -export function run_system_command(opt) { - return syscall_async('run_system_command', opt) -} -export function disk_usage(opt) { - return syscall_async('run_system_command', { cmd: 'du', ...opt }) -} -export function list_directory(opt) { - return syscall_async('list_directory', opt).then(res => res.files) -} -export function list_sequences(opt) { - return syscall_async('list_sequences', opt).then(res => res.sequences) -} -export function run_script(opt) { - return syscall_async('run_script', opt) -} -export function upload_file(opt) { - return syscall_async('upload_file', opt) -} +export const run_system_command = opt => syscall_async('run_system_command', opt) +export const disk_usage = opt => syscall_async('run_system_command', { cmd: 'du', ...opt }) +export const list_directory = opt => syscall_async('list_directory', opt).then(res => res.files) +export const list_sequences = opt => syscall_async('list_sequences', opt).then(res => res.sequences) +export const run_script = opt => syscall_async('run_script', opt) +export const upload_file = opt => syscall_async('upload_file', opt) + export const syscall_async = (tag, payload, ttl=10000) => { ttl = payload.ttl || ttl return new Promise( (resolve, reject) => { -- cgit v1.2.3-70-g09d2