summaryrefslogtreecommitdiff
path: root/app/client
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-05-29 00:15:13 +0200
committerJules Laplace <julescarbon@gmail.com>2018-05-29 00:15:13 +0200
commita77ddf4bf8ad8aeb91e2109a7c4a92149928b57b (patch)
treebed9a31e1febb3824d4d273bd4821ab28449f82a /app/client
parentbdab187f3d385a6b96c24135679af468d1e7892b (diff)
adding migrations!!
Diffstat (limited to 'app/client')
-rw-r--r--app/client/modules/samplernn/samplernn.actions.js9
-rw-r--r--app/client/types.js27
2 files changed, 35 insertions, 1 deletions
diff --git a/app/client/modules/samplernn/samplernn.actions.js b/app/client/modules/samplernn/samplernn.actions.js
new file mode 100644
index 0000000..95fef8e
--- /dev/null
+++ b/app/client/modules/samplernn/samplernn.actions.js
@@ -0,0 +1,9 @@
+import socket from '../../socket'
+import types from '../../types'
+
+export const uploadFiles = (files) => {
+ return { type: types.samplernn.upload_files }
+}
+export const fetchURL = (url) => {
+ return { type: types.samplernn.fetch_url }
+}
diff --git a/app/client/types.js b/app/client/types.js
index 6f4a0b2..25e5fb2 100644
--- a/app/client/types.js
+++ b/app/client/types.js
@@ -56,5 +56,30 @@ export default {
save_frame: 'SAVE_FRAME',
saving_video: 'SAVING_VIDEO',
save_video: 'SAVE_VIDEO',
- }
+ },
+ folder: crud('folder', ['']),
+ file: crud('file', []),
+ task: crud('task', []),
+ samplernn: {
+ // dataset uploading
+ upload_files: 'UPLOAD_FILES',
+ file_progress: 'FILE_PROGRESS',
+ file_uploaded: 'FILE_UPLOADED',
+ fetch_url: 'FETCH_URL',
+ fetch_progress: 'FETCH_PROGRESS',
+ // queue and train
+ // update checkpoint settings
+ // reset checkpoint settings
+ // queue new checkpoint
+ //
+ },
+}
+
+const standard_actions = ['index','show','create','update','destroy','sort']
+function crud(type, actions=[]){
+ return actions
+ .concat(standard_actions)
+ .reduce((lookup, action) => {
+ (lookup[action] = [type, action].join('_').toUpperCase()) && lookup
+ }, {})
} \ No newline at end of file