2016-11-07 20:24:38 +00:00
|
|
|
import React, {PropTypes} from 'react';
|
2016-11-16 17:18:39 +00:00
|
|
|
import {Dropdown, DropdownButton, DropdownItem, DropdownDivider} from '../base/dropdown';
|
2016-11-07 20:24:38 +00:00
|
|
|
|
2016-11-16 17:18:39 +00:00
|
|
|
const SettingsImportExport = ({
|
|
|
|
handleImport,
|
|
|
|
handleExportAll,
|
|
|
|
handleExportWorkspace
|
|
|
|
}) => (
|
|
|
|
<div className="pad">
|
|
|
|
<h1>Data Import and Export</h1>
|
2016-11-07 20:24:38 +00:00
|
|
|
<p>
|
2016-11-19 07:11:10 +00:00
|
|
|
Import format will be automatically detected (<strong>Insomnia, Postman, HAR, cURL</strong>)
|
2016-11-07 20:24:38 +00:00
|
|
|
</p>
|
2016-11-19 03:21:15 +00:00
|
|
|
<Dropdown outline={true}>
|
|
|
|
<DropdownButton className="btn btn--super-compact btn--outlined">
|
|
|
|
Export Data <i className="fa fa-caret-down"></i>
|
|
|
|
</DropdownButton>
|
|
|
|
<DropdownDivider name="Choose Export Type"/>
|
|
|
|
<DropdownItem onClick={e => handleExportWorkspace()}>
|
|
|
|
<i className="fa fa-home"></i>
|
|
|
|
Current Workspace
|
|
|
|
</DropdownItem>
|
|
|
|
<DropdownItem onClick={e => handleExportAll()}>
|
|
|
|
<i className="fa fa-empty"></i>
|
|
|
|
All Workspaces
|
|
|
|
</DropdownItem>
|
|
|
|
</Dropdown>
|
|
|
|
|
|
|
|
<button className="btn btn--super-compact btn--outlined" onClick={e => handleImport()}>
|
|
|
|
Import Data
|
|
|
|
</button>
|
2016-11-19 07:11:10 +00:00
|
|
|
<p className="italic faint pad-top">
|
|
|
|
* Tip: You can also paste Curl commands into the URL bar
|
|
|
|
</p>
|
2016-11-07 20:24:38 +00:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
|
|
|
|
SettingsImportExport.propTypes = {
|
2016-11-16 17:18:39 +00:00
|
|
|
handleImport: PropTypes.func.isRequired,
|
|
|
|
handleExportAll: PropTypes.func.isRequired,
|
|
|
|
handleExportWorkspace: PropTypes.func.isRequired,
|
2016-11-07 20:24:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export default SettingsImportExport;
|