summaryrefslogtreecommitdiff
path: root/app/client
diff options
context:
space:
mode:
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