JS File-saver dependency patch
This commit is contained in:
parent
4518b93260
commit
6992902991
|
@ -75,7 +75,6 @@
|
||||||
"fetch": "^1.1.0",
|
"fetch": "^1.1.0",
|
||||||
"file-saver": "^2.0.2",
|
"file-saver": "^2.0.2",
|
||||||
"filepond": "^4.2.0",
|
"filepond": "^4.2.0",
|
||||||
"js-file-download": "^0.4.4",
|
|
||||||
"json-loader": "^0.5.7",
|
"json-loader": "^0.5.7",
|
||||||
"jwt-decode": "^2.2.0",
|
"jwt-decode": "^2.2.0",
|
||||||
"moment": "^2.22.2",
|
"moment": "^2.22.2",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Form from 'react-jsonschema-form';
|
import Form from 'react-jsonschema-form';
|
||||||
import {Col, Modal, Nav, NavItem} from 'react-bootstrap';
|
import {Col, Modal, Nav, NavItem} from 'react-bootstrap';
|
||||||
import fileDownload from 'js-file-download';
|
import FileSaver from "file-saver";
|
||||||
import AuthComponent from '../AuthComponent';
|
import AuthComponent from '../AuthComponent';
|
||||||
import { FilePond } from 'react-filepond';
|
import { FilePond } from 'react-filepond';
|
||||||
import 'filepond/dist/filepond.min.css';
|
import 'filepond/dist/filepond.min.css';
|
||||||
|
@ -309,7 +309,10 @@ class ConfigurePageComponent extends AuthComponent {
|
||||||
|
|
||||||
exportConfig = () => {
|
exportConfig = () => {
|
||||||
this.updateConfigSection();
|
this.updateConfigSection();
|
||||||
fileDownload(JSON.stringify(this.state.configuration, null, 2), 'monkey.conf');
|
const JSONString = JSON.stringify(this.state.configuration, null, 2);
|
||||||
|
const blob = new Blob([JSONString], {type: "text/plain;charset=utf-8"});
|
||||||
|
|
||||||
|
FileSaver.saveAs(blob, 'monkey.conf');
|
||||||
};
|
};
|
||||||
|
|
||||||
sendConfig() {
|
sendConfig() {
|
||||||
|
|
Loading…
Reference in New Issue