aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/actions.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/src/js/actions.js')
-rw-r--r--web/src/js/actions.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/web/src/js/actions.js b/web/src/js/actions.js
index 6ded4c44..c77cdf73 100644
--- a/web/src/js/actions.js
+++ b/web/src/js/actions.js
@@ -1,6 +1,6 @@
import $ from "jquery";
-import _ from "lodash";
import {AppDispatcher} from "./dispatcher.js";
+import {fetchApi} from "./utils.js";
export var ActionTypes = {
// Connection
@@ -117,6 +117,16 @@ export var FlowActions = {
},
clear: function(){
$.post("/clear");
+ },
+ download: () => window.location = "/flows/dump",
+
+ upload: (file) => {
+ let data = new FormData();
+ data.append('file', file);
+ fetchApi("/flows/dump", {
+ method: 'post',
+ body: data
+ })
}
};