;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/app/img/tap-redshift.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
18 |
--------------------------------------------------------------------------------
/app/backend/targets.js:
--------------------------------------------------------------------------------
1 | /*
2 | * knots
3 | * Copyright 2018 data.world, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the
7 | * License.
8 | *
9 | * You may obtain a copy of the License at
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | *
18 | * This product includes software developed at
19 | * data.world, Inc.(http://data.world/).
20 | */
21 |
22 | const { targets } = require('./constants');
23 |
24 | const getTargets = () =>
25 | new Promise((resolve, reject) => {
26 | if (targets) {
27 | resolve(targets);
28 | } else {
29 | reject(new Error('No targets available'));
30 | }
31 | });
32 |
33 | module.exports = { getTargets };
34 |
--------------------------------------------------------------------------------
/app/actions/progress.js:
--------------------------------------------------------------------------------
1 | /*
2 | * knots
3 | * Copyright 2018 data.world, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the
7 | * License.
8 | *
9 | * You may obtain a copy of the License at
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | *
18 | * This product includes software developed at
19 | * data.world, Inc.(http://data.world/).
20 | */
21 |
22 | export function updateProgress() {
23 | return (dispatch: (action: actionType) => void) => {
24 | dispatch({
25 | type: 'SCHEMA_LOADING'
26 | });
27 | };
28 | }
29 |
30 | export function update() {
31 | return (dispatch: (action: actionType) => void) => {
32 | dispatch({
33 | type: 'SCHEMA_LOADING'
34 | });
35 | };
36 | }
37 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 |
5 | # Runtime data
6 | pids
7 | *.pid
8 | *.seed
9 |
10 | # Directory for instrumented libs generated by jscoverage/JSCover
11 | lib-cov
12 |
13 | # Coverage directory used by tools like istanbul
14 | coverage
15 |
16 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
17 | .grunt
18 |
19 | # node-waf configuration
20 | .lock-wscript
21 |
22 | # Compiled binary addons (http://nodejs.org/api/addons.html)
23 | build/Release
24 | .eslintcache
25 |
26 | # Dependency directory
27 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
28 | node_modules
29 | app/node_modules
30 |
31 | # OSX
32 | .DS_Store
33 |
34 | # flow-typed
35 | flow-typed/npm/*
36 | !flow-typed/npm/module_vx.x.x.js
37 |
38 | # App packaged
39 | release
40 | app/main.prod.js
41 | app/main.prod.js.map
42 | app/renderer.prod.js
43 | app/renderer.prod.js.map
44 | app/style.css
45 | app/style.css.map
46 | dist
47 | dll
48 | main.js
49 | main.js.map
50 |
51 | *.iml
52 | .env
53 | npm-debug.log.*
54 |
55 | # IDE files
56 | *.iml
57 | .idea
58 |
59 | # Knot temp files
60 | tmp
61 | /knots
62 |
--------------------------------------------------------------------------------
/app/img/tap-s3-csv.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/webpack.config.base.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Base webpack config used across other specific configs
3 | */
4 |
5 | import path from 'path';
6 | import webpack from 'webpack';
7 | import { dependencies as externals } from './app/package.json';
8 |
9 | export default {
10 | externals: Object.keys(externals || {}),
11 |
12 | module: {
13 | rules: [
14 | {
15 | test: /\.jsx?$/,
16 | exclude: /node_modules/,
17 | use: {
18 | loader: 'babel-loader',
19 | options: {
20 | cacheDirectory: true
21 | }
22 | }
23 | }
24 | ]
25 | },
26 |
27 | output: {
28 | path: path.join(__dirname, 'app'),
29 | // https://github.com/webpack/webpack/issues/1114
30 | libraryTarget: 'commonjs2'
31 | },
32 |
33 | /**
34 | * Determine the array of extensions that should be used to resolve modules.
35 | */
36 | resolve: {
37 | extensions: ['.js', '.jsx', '.json'],
38 | modules: [path.join(__dirname, 'app'), 'node_modules']
39 | },
40 |
41 | plugins: [
42 | new webpack.EnvironmentPlugin({
43 | NODE_ENV: 'production'
44 | }),
45 |
46 | new webpack.NamedModulesPlugin()
47 | ]
48 | };
49 |
--------------------------------------------------------------------------------
/app/components/Taps/TapConfiguration/S3/S3.css:
--------------------------------------------------------------------------------
1 | /*
2 | * knots
3 | * Copyright 2018 data.world, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the
7 | * License.
8 | *
9 | * You may obtain a copy of the License at
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | *
18 | * This product includes software developed at
19 | * data.world, Inc.(http://data.world/).
20 | */
21 |
22 | .tag-badge {
23 | margin-right: 2px;
24 | }
25 |
26 | .tag-badge a::before {
27 | content: ' ×';
28 | }
29 |
30 | .tag-remove {
31 | cursor: pointer;
32 | font-weight: bold;
33 | }
34 |
35 | .transparent-input {
36 | background: transparent;
37 | border: 0;
38 | width: 50%;
39 | margin: 0;
40 | padding: 0;
41 | outline: none;
42 | font-size: 0.75rem;
43 | }
44 |
--------------------------------------------------------------------------------
/app/backend/routes/index.js:
--------------------------------------------------------------------------------
1 | /*
2 | * knots
3 | * Copyright 2018 data.world, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the
7 | * License.
8 | *
9 | * You may obtain a copy of the License at
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | *
18 | * This product includes software developed at
19 | * data.world, Inc.(http://data.world/).
20 | */
21 |
22 | const dockerRoutes = require('./docker');
23 | const knotsRoutes = require('./knots');
24 | const tapsRoutes = require('./taps');
25 | const targetsRoutes = require('./targets');
26 |
27 | const router = (app) => {
28 | app.use('/docker', dockerRoutes);
29 | app.use('/knots', knotsRoutes);
30 | app.use('/taps', tapsRoutes);
31 | app.use('/targets', targetsRoutes);
32 | };
33 |
34 | module.exports = router;
35 |
--------------------------------------------------------------------------------
/app/actions/user.js:
--------------------------------------------------------------------------------
1 | /*
2 | * knots
3 | * Copyright 2018 data.world, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the
7 | * License.
8 | *
9 | * You may obtain a copy of the License at
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | *
18 | * This product includes software developed at
19 | * data.world, Inc.(http://data.world/).
20 | */
21 |
22 | // @flow
23 |
24 | export const UPDATE_TARGET_FIELD = 'UPDATE_TARGET_FIELD';
25 |
26 | type actionType = {
27 | +type: string
28 | };
29 |
30 | export function updateTargetField(
31 | target: string,
32 | field: string,
33 | value: string
34 | ) {
35 | return (dispatch: (action: actionType) => void) => {
36 | dispatch({
37 | type: UPDATE_TARGET_FIELD,
38 | target,
39 | field,
40 | value
41 | });
42 | };
43 | }
44 |
--------------------------------------------------------------------------------
/app/containers/HomePage.js:
--------------------------------------------------------------------------------
1 | /*
2 | * knots
3 | * Copyright 2018 data.world, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the
7 | * License.
8 | *
9 | * You may obtain a copy of the License at
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | *
18 | * This product includes software developed at
19 | * data.world, Inc.(http://data.world/).
20 | */
21 |
22 | import { bindActionCreators } from 'redux';
23 | import { connect } from 'react-redux';
24 |
25 | import * as KnotsActions from '../actions/knots';
26 | import Home from '../components/Home';
27 |
28 | function mapStateToProps(state) {
29 | return {
30 | knotsStore: state.knots
31 | };
32 | }
33 |
34 | function mapDispatchToProps(dispatch) {
35 | return bindActionCreators(KnotsActions, dispatch);
36 | }
37 |
38 | export default connect(mapStateToProps, mapDispatchToProps)(Home);
39 |
--------------------------------------------------------------------------------
/app/containers/Knots.js:
--------------------------------------------------------------------------------
1 | /*
2 | * knots
3 | * Copyright 2018 data.world, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the
7 | * License.
8 | *
9 | * You may obtain a copy of the License at
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | *
18 | * This product includes software developed at
19 | * data.world, Inc.(http://data.world/).
20 | */
21 |
22 | import { bindActionCreators } from 'redux';
23 | import { connect } from 'react-redux';
24 |
25 | import * as KnotActions from '../actions/knots';
26 | import Knots from '../components/Home/Knots';
27 |
28 | function mapStateToProps(state) {
29 | return {
30 | knotsStore: state.knots
31 | };
32 | }
33 |
34 | function mapDispatchToProps(dispatch) {
35 | return bindActionCreators(KnotActions, dispatch);
36 | }
37 |
38 | export default connect(mapStateToProps, mapDispatchToProps)(Knots);
39 |
--------------------------------------------------------------------------------
/app/containers/Adwords.js:
--------------------------------------------------------------------------------
1 | /*
2 | * knots
3 | * Copyright 2018 data.world, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the
7 | * License.
8 | *
9 | * You may obtain a copy of the License at
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | *
18 | * This product includes software developed at
19 | * data.world, Inc.(http://data.world/).
20 | */
21 |
22 | import { bindActionCreators } from 'redux';
23 | import { connect } from 'react-redux';
24 |
25 | import * as TapsActions from '../actions/taps';
26 | import Adwords from '../components/Taps/TapConfiguration/Adwords';
27 |
28 | function mapStateToProps(state) {
29 | return { tapsStore: state.taps };
30 | }
31 |
32 | function mapDispatchToProps(dispatch) {
33 | return bindActionCreators(TapsActions, dispatch);
34 | }
35 |
36 | export default connect(mapStateToProps, mapDispatchToProps)(Adwords);
37 |
--------------------------------------------------------------------------------
/app/containers/S3.js:
--------------------------------------------------------------------------------
1 | /*
2 | * knots
3 | * Copyright 2018 data.world, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the
7 | * License.
8 | *
9 | * You may obtain a copy of the License at
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | *
18 | * This product includes software developed at
19 | * data.world, Inc.(http://data.world/).
20 | */
21 |
22 | import { bindActionCreators } from 'redux';
23 | import { connect } from 'react-redux';
24 |
25 | import * as TapsActions from '../actions/taps';
26 | import S3 from '../components/Taps/TapConfiguration/S3';
27 |
28 | function mapStateToProps(state) {
29 | return { tap: state.taps['tap-s3-csv'] };
30 | }
31 |
32 | function mapDispatchToProps(dispatch) {
33 | return bindActionCreators(TapsActions, dispatch);
34 | }
35 |
36 | export default connect(
37 | mapStateToProps,
38 | mapDispatchToProps
39 | )(S3);
40 |
--------------------------------------------------------------------------------
/app/containers/Redshift.js:
--------------------------------------------------------------------------------
1 | /*
2 | * knots
3 | * Copyright 2018 data.world, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the
7 | * License.
8 | *
9 | * You may obtain a copy of the License at
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | *
18 | * This product includes software developed at
19 | * data.world, Inc.(http://data.world/).
20 | */
21 |
22 | import { bindActionCreators } from 'redux';
23 | import { connect } from 'react-redux';
24 |
25 | import * as TapActions from '../actions/taps';
26 | import Redshift from '../components/Taps/TapConfiguration/Redshift';
27 |
28 | function mapStateToProps(state) {
29 | return {
30 | tapsStore: state.taps
31 | };
32 | }
33 |
34 | function mapDispatchToProps(dispatch) {
35 | return bindActionCreators(TapActions, dispatch);
36 | }
37 |
38 | export default connect(mapStateToProps, mapDispatchToProps)(Redshift);
39 |
--------------------------------------------------------------------------------
/app/containers/Facebook.js:
--------------------------------------------------------------------------------
1 | /*
2 | * knots
3 | * Copyright 2018 data.world, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the
7 | * License.
8 | *
9 | * You may obtain a copy of the License at
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | *
18 | * This product includes software developed at
19 | * data.world, Inc.(http://data.world/).
20 | */
21 |
22 | import { bindActionCreators } from 'redux';
23 | import { connect } from 'react-redux';
24 |
25 | import * as TapActions from '../actions/taps';
26 | import Facebook from '../components/Taps/TapConfiguration/Facebook';
27 |
28 | function mapStateToProps(state) {
29 | return { tapsStore: state.taps };
30 | }
31 |
32 | function mapDispatchToProps(dispatch) {
33 | return bindActionCreators(TapActions, dispatch);
34 | }
35 |
36 | export default connect(
37 | mapStateToProps,
38 | mapDispatchToProps
39 | )(Facebook);
40 |
--------------------------------------------------------------------------------
/app/containers/Salesforce.js:
--------------------------------------------------------------------------------
1 | /*
2 | * knots
3 | * Copyright 2018 data.world, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the
7 | * License.
8 | *
9 | * You may obtain a copy of the License at
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | *
18 | * This product includes software developed at
19 | * data.world, Inc.(http://data.world/).
20 | */
21 |
22 | import { bindActionCreators } from 'redux';
23 | import { connect } from 'react-redux';
24 |
25 | import * as TapsActions from '../actions/taps';
26 | import Salesforce from '../components/Taps/TapConfiguration/Salesforce';
27 |
28 | function mapStateToProps(state) {
29 | return {
30 | tapsStore: state.taps
31 | };
32 | }
33 |
34 | function mapDispatchToProps(dispatch) {
35 | return bindActionCreators(TapsActions, dispatch);
36 | }
37 |
38 | export default connect(mapStateToProps, mapDispatchToProps)(Salesforce);
39 |
--------------------------------------------------------------------------------
/app/reducers/index.js:
--------------------------------------------------------------------------------
1 | /*
2 | * knots
3 | * Copyright 2018 data.world, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the
7 | * License.
8 | *
9 | * You may obtain a copy of the License at
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | *
18 | * This product includes software developed at
19 | * data.world, Inc.(http://data.world/).
20 | */
21 |
22 | import { combineReducers } from 'redux';
23 | import { routerReducer as router } from 'react-router-redux';
24 | import knots from './knots';
25 | import taps from './taps';
26 | import targets from './targets';
27 | import user from './user';
28 | import progress from './progress';
29 |
30 | const appReducer = combineReducers({
31 | progress,
32 | knots,
33 | taps,
34 | targets,
35 | user,
36 | router
37 | });
38 |
39 | const rootReducer = (state, action) => appReducer(state, action);
40 | export default rootReducer;
41 |
--------------------------------------------------------------------------------
/app/containers/Postgres.js:
--------------------------------------------------------------------------------
1 | /*
2 | * knots
3 | * Copyright 2018 data.world, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the
7 | * License.
8 | *
9 | * You may obtain a copy of the License at
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | *
18 | * This product includes software developed at
19 | * data.world, Inc.(http://data.world/).
20 | */
21 |
22 | import { bindActionCreators } from 'redux';
23 | import { connect } from 'react-redux';
24 |
25 | import * as TapActions from '../actions/taps';
26 | import Postgres from '../components/Taps/TapConfiguration/Postgres';
27 |
28 | function mapStateToProps(state) {
29 | return { tapsStore: state.taps, knotsStore: state.knots };
30 | }
31 |
32 | function mapDispatchToProps(dispatch) {
33 | return bindActionCreators(TapActions, dispatch);
34 | }
35 |
36 | export default connect(
37 | mapStateToProps,
38 | mapDispatchToProps
39 | )(Postgres);
40 |
--------------------------------------------------------------------------------
/app/containers/Stitch.js:
--------------------------------------------------------------------------------
1 | /*
2 | * knots
3 | * Copyright 2018 data.world, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the
7 | * License.
8 | *
9 | * You may obtain a copy of the License at
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | *
18 | * This product includes software developed at
19 | * data.world, Inc.(http://data.world/).
20 | */
21 |
22 | import { bindActionCreators } from 'redux';
23 | import { connect } from 'react-redux';
24 |
25 | import * as UserActions from '../actions/user';
26 | import Stitch from '../components/Targets/TargetConfiguration/Stitch';
27 |
28 | function mapStateToProps(state) {
29 | return {
30 | userStore: state.user,
31 | tapsStore: state.taps
32 | };
33 | }
34 |
35 | function mapDispatchToProps(dispatch) {
36 | return bindActionCreators(UserActions, dispatch);
37 | }
38 |
39 | export default connect(mapStateToProps, mapDispatchToProps)(Stitch);
40 |
--------------------------------------------------------------------------------
/app/containers/DataWorld.js:
--------------------------------------------------------------------------------
1 | /*
2 | * knots
3 | * Copyright 2018 data.world, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the
7 | * License.
8 | *
9 | * You may obtain a copy of the License at
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | *
18 | * This product includes software developed at
19 | * data.world, Inc.(http://data.world/).
20 | */
21 |
22 | import { bindActionCreators } from 'redux';
23 | import { connect } from 'react-redux';
24 |
25 | import * as UserActions from '../actions/user';
26 | import DataWorld from '../components/Targets/TargetConfiguration/DataWorld';
27 |
28 | function mapStateToProps(state) {
29 | return {
30 | userStore: state.user,
31 | tapsStore: state.taps
32 | };
33 | }
34 |
35 | function mapDispatchToProps(dispatch) {
36 | return bindActionCreators(UserActions, dispatch);
37 | }
38 |
39 | export default connect(mapStateToProps, mapDispatchToProps)(DataWorld);
40 |
--------------------------------------------------------------------------------
/app/containers/TapConfiguration.js:
--------------------------------------------------------------------------------
1 | /*
2 | * knots
3 | * Copyright 2018 data.world, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the
7 | * License.
8 | *
9 | * You may obtain a copy of the License at
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | *
18 | * This product includes software developed at
19 | * data.world, Inc.(http://data.world/).
20 | */
21 |
22 | import { bindActionCreators } from 'redux';
23 | import { connect } from 'react-redux';
24 |
25 | import * as tapActions from '../actions/targets';
26 | import TapConfiguration from '../components/Taps/TapConfiguration';
27 |
28 | function mapStateToProps(state) {
29 | return {
30 | userStore: state.user,
31 | tapsStore: state.taps
32 | };
33 | }
34 |
35 | function mapDispatchToProps(dispatch) {
36 | return bindActionCreators(tapActions, dispatch);
37 | }
38 |
39 | export default connect(mapStateToProps, mapDispatchToProps)(TapConfiguration);
40 |
--------------------------------------------------------------------------------
/app/containers/TargetConfiguration.js:
--------------------------------------------------------------------------------
1 | /*
2 | * knots
3 | * Copyright 2018 data.world, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the
7 | * License.
8 | *
9 | * You may obtain a copy of the License at
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | *
18 | * This product includes software developed at
19 | * data.world, Inc.(http://data.world/).
20 | */
21 |
22 | import { bindActionCreators } from 'redux';
23 | import { connect } from 'react-redux';
24 |
25 | import * as targetActions from '../actions/targets';
26 | import Target from '../components/Targets/TargetConfiguration';
27 |
28 | function mapStateToProps(state) {
29 | return {
30 | userStore: state.user,
31 | targetsStore: state.targets
32 | };
33 | }
34 |
35 | function mapDispatchToProps(dispatch) {
36 | return bindActionCreators(targetActions, dispatch);
37 | }
38 |
39 | export default connect(mapStateToProps, mapDispatchToProps)(Target);
40 |
--------------------------------------------------------------------------------
/app/containers/Root.js:
--------------------------------------------------------------------------------
1 | /*
2 | * knots
3 | * Copyright 2018 data.world, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the
7 | * License.
8 | *
9 | * You may obtain a copy of the License at
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | *
18 | * This product includes software developed at
19 | * data.world, Inc.(http://data.world/).
20 | */
21 |
22 | // @flow
23 |
24 | import React, { Component } from 'react';
25 | import { Provider } from 'react-redux';
26 | import { ConnectedRouter } from 'react-router-redux';
27 | import Routes from '../routes';
28 |
29 | type Props = {
30 | store: {},
31 | history: {}
32 | };
33 |
34 | export default class Root extends Component {
35 | render() {
36 | return (
37 |
38 |
39 |
40 |
41 |
42 | );
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/app/store/configureStore.prod.js:
--------------------------------------------------------------------------------
1 | /*
2 | * knots
3 | * Copyright 2018 data.world, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the
7 | * License.
8 | *
9 | * You may obtain a copy of the License at
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | *
18 | * This product includes software developed at
19 | * data.world, Inc.(http://data.world/).
20 | */
21 |
22 | import { createStore, applyMiddleware } from 'redux';
23 | import thunk from 'redux-thunk';
24 | import { createBrowserHistory } from 'history';
25 | import { routerMiddleware } from 'react-router-redux';
26 | import rootReducer from '../reducers';
27 |
28 | const history = createBrowserHistory();
29 | const router = routerMiddleware(history);
30 | const enhancer = applyMiddleware(thunk, router);
31 |
32 | function configureStore(initialState) {
33 | return createStore(rootReducer, initialState, enhancer);
34 | }
35 |
36 | export default { configureStore, history };
37 |
--------------------------------------------------------------------------------
/app/containers/Sync.js:
--------------------------------------------------------------------------------
1 | /*
2 | * knots
3 | * Copyright 2018 data.world, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the
7 | * License.
8 | *
9 | * You may obtain a copy of the License at
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | *
18 | * This product includes software developed at
19 | * data.world, Inc.(http://data.world/).
20 | */
21 |
22 | import { bindActionCreators } from 'redux';
23 | import { connect } from 'react-redux';
24 |
25 | import * as knotActions from '../actions/knots';
26 | import Sync from '../components/Sync';
27 |
28 | function mapStateToProps(state) {
29 | return {
30 | knotsStore: state.knots,
31 | userStore: state.user,
32 | tapStore: state.taps,
33 | targetsStore: state.targets
34 | };
35 | }
36 |
37 | function mapDispatchToProps(dispatch) {
38 | return bindActionCreators(knotActions, dispatch);
39 | }
40 |
41 | export default connect(mapStateToProps, mapDispatchToProps)(Sync);
42 |
--------------------------------------------------------------------------------
/app/containers/MySQL.js:
--------------------------------------------------------------------------------
1 | /*
2 | * knots
3 | * Copyright 2018 data.world, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the
7 | * License.
8 | *
9 | * You may obtain a copy of the License at
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | *
18 | * This product includes software developed at
19 | * data.world, Inc.(http://data.world/).
20 | */
21 |
22 | import { bindActionCreators } from 'redux';
23 | import { connect } from 'react-redux';
24 |
25 | import * as TapActions from '../actions/taps';
26 | import MySQL from '../components/Taps/TapConfiguration/MySQL';
27 |
28 | function mapStateToProps(state) {
29 | return {
30 | userStore: state.user,
31 | tapsStore: state.taps,
32 | knotsStore: state.knots
33 | };
34 | }
35 |
36 | function mapDispatchToProps(dispatch) {
37 | return bindActionCreators(TapActions, dispatch);
38 | }
39 |
40 | export default connect(
41 | mapStateToProps,
42 | mapDispatchToProps
43 | )(MySQL);
44 |
--------------------------------------------------------------------------------
/app/containers/SavedSync.js:
--------------------------------------------------------------------------------
1 | /*
2 | * knots
3 | * Copyright 2018 data.world, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the
7 | * License.
8 | *
9 | * You may obtain a copy of the License at
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | *
18 | * This product includes software developed at
19 | * data.world, Inc.(http://data.world/).
20 | */
21 |
22 | import { bindActionCreators } from 'redux';
23 | import { connect } from 'react-redux';
24 |
25 | import * as knotActions from '../actions/knots';
26 | import SavedSync from '../components/SavedSync';
27 |
28 | function mapStateToProps(state) {
29 | return {
30 | knotsStore: state.knots,
31 | userStore: state.user,
32 | tapStore: state.taps,
33 | targetsStore: state.targets
34 | };
35 | }
36 |
37 | function mapDispatchToProps(dispatch) {
38 | return bindActionCreators(knotActions, dispatch);
39 | }
40 |
41 | export default connect(mapStateToProps, mapDispatchToProps)(SavedSync);
42 |
--------------------------------------------------------------------------------
/app/components/Log/index.js:
--------------------------------------------------------------------------------
1 | /*
2 | * knots
3 | * Copyright 2018 data.world, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the
7 | * License.
8 | *
9 | * You may obtain a copy of the License at
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | *
18 | * This product includes software developed at
19 | * data.world, Inc.(http://data.world/).
20 | */
21 |
22 | import React, { Component } from 'react';
23 | import { scrolled } from 'react-stay-scrolled';
24 | import classNames from 'classnames';
25 |
26 | import styles from './Log.css';
27 |
28 | type Props = {
29 | log: text,
30 | stayScrolled: () => void
31 | };
32 |
33 | class Log extends Component {
34 | componentDidMount() {
35 | const { stayScrolled } = this.props;
36 | stayScrolled();
37 | }
38 |
39 | render() {
40 | const { log } = this.props;
41 |
42 | return
{log}
;
43 | }
44 | }
45 |
46 | export default scrolled(Log);
47 |
--------------------------------------------------------------------------------
/app/containers/Taps.js:
--------------------------------------------------------------------------------
1 | /*
2 | * knots
3 | * Copyright 2018 data.world, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the
7 | * License.
8 | *
9 | * You may obtain a copy of the License at
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | *
18 | * This product includes software developed at
19 | * data.world, Inc.(http://data.world/).
20 | */
21 |
22 | import { bindActionCreators } from 'redux';
23 | import { connect } from 'react-redux';
24 |
25 | import * as TapsActions from '../actions/taps';
26 | import * as KnotsActions from '../actions/knots';
27 | import Taps from '../components/Taps';
28 |
29 | function mapStateToProps(state) {
30 | return {
31 | tapsStore: state.taps,
32 | knotsStore: state.knots
33 | };
34 | }
35 |
36 | function mapDispatchToProps(dispatch) {
37 | return bindActionCreators(
38 | Object.assign({}, TapsActions, KnotsActions),
39 | dispatch
40 | );
41 | }
42 |
43 | export default connect(mapStateToProps, mapDispatchToProps)(Taps);
44 |
--------------------------------------------------------------------------------
/app/containers/Schema.js:
--------------------------------------------------------------------------------
1 | /*
2 | * knots
3 | * Copyright 2018 data.world, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the
7 | * License.
8 | *
9 | * You may obtain a copy of the License at
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | *
18 | * This product includes software developed at
19 | * data.world, Inc.(http://data.world/).
20 | */
21 |
22 | import { bindActionCreators } from 'redux';
23 | import { connect } from 'react-redux';
24 |
25 | import * as TapActions from '../actions/taps';
26 | import * as KnotsActions from '../actions/knots';
27 | import Schema from '../components/Schema';
28 |
29 | function mapStateToProps(state) {
30 | return {
31 | tapsStore: state.taps,
32 | knotsStore: state.knots
33 | };
34 | }
35 |
36 | function mapDispatchToProps(dispatch) {
37 | return bindActionCreators(
38 | Object.assign({}, TapActions, KnotsActions),
39 | dispatch
40 | );
41 | }
42 |
43 | export default connect(mapStateToProps, mapDispatchToProps)(Schema);
44 |
--------------------------------------------------------------------------------
/app/backend/routes/docker.js:
--------------------------------------------------------------------------------
1 | /*
2 | * knots
3 | * Copyright 2018 data.world, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the
7 | * License.
8 | *
9 | * You may obtain a copy of the License at
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | *
18 | * This product includes software developed at
19 | * data.world, Inc.(http://data.world/).
20 | */
21 |
22 | const router = require('express').Router();
23 |
24 | const { dockerInstalled, dockerRunning } = require('../docker');
25 |
26 | router.get('/installed', (req, res) => {
27 | dockerInstalled()
28 | .then((version) => {
29 | res.json({ version });
30 | })
31 | .catch((error) => {
32 | res.status(500).json({ message: error.message });
33 | });
34 | });
35 |
36 | router.get('/running', (req, res) => {
37 | dockerRunning()
38 | .then(() => {
39 | res.json({});
40 | })
41 | .catch((error) => {
42 | res.status(500).json({ message: error.message });
43 | });
44 | });
45 |
46 | module.exports = router;
47 |
--------------------------------------------------------------------------------
/app/containers/KnotProgress.js:
--------------------------------------------------------------------------------
1 | /*
2 | * knots
3 | * Copyright 2018 data.world, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the
7 | * License.
8 | *
9 | * You may obtain a copy of the License at
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | *
18 | * This product includes software developed at
19 | * data.world, Inc.(http://data.world/).
20 | */
21 |
22 | import { bindActionCreators } from 'redux';
23 | import { connect } from 'react-redux';
24 |
25 | import * as ProgressActions from '../actions/progress';
26 | import KnotProgress from '../components/KnotProgress';
27 |
28 | function mapStateToProps(state) {
29 | return {
30 | progressStore: state.progress,
31 | tapsStore: state.taps,
32 | targetsStore: state.targets,
33 | knotsStore: state.knots,
34 | userStore: state.user
35 | };
36 | }
37 |
38 | function mapDispatchToProps(dispatch) {
39 | return bindActionCreators(ProgressActions, dispatch);
40 | }
41 |
42 | export default connect(mapStateToProps, mapDispatchToProps)(KnotProgress);
43 |
--------------------------------------------------------------------------------
/app/containers/Targets.js:
--------------------------------------------------------------------------------
1 | /*
2 | * knots
3 | * Copyright 2018 data.world, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the
7 | * License.
8 | *
9 | * You may obtain a copy of the License at
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | *
18 | * This product includes software developed at
19 | * data.world, Inc.(http://data.world/).
20 | */
21 |
22 | import { bindActionCreators } from 'redux';
23 | import { connect } from 'react-redux';
24 |
25 | import * as TargetsActions from '../actions/targets';
26 | import * as KnotsActions from '../actions/knots';
27 | import Targets from '../components/Targets';
28 |
29 | function mapStateToProps(state) {
30 | return {
31 | targetsStore: state.targets,
32 | userStore: state.user,
33 | knotsStore: state.knots
34 | };
35 | }
36 |
37 | function mapDispatchToProps(dispatch) {
38 | return bindActionCreators(
39 | Object.assign({}, TargetsActions, KnotsActions),
40 | dispatch
41 | );
42 | }
43 |
44 | export default connect(mapStateToProps, mapDispatchToProps)(Targets);
45 |
--------------------------------------------------------------------------------
/app/components/Header/index.js:
--------------------------------------------------------------------------------
1 | /*
2 | * knots
3 | * Copyright 2018 data.world, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the
7 | * License.
8 | *
9 | * You may obtain a copy of the License at
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | *
18 | * This product includes software developed at
19 | * data.world, Inc.(http://data.world/).
20 | */
21 |
22 | // @flow
23 |
24 | import React from 'react';
25 | import { NavLink } from 'react-router-dom';
26 | import { Container, Nav, Navbar, NavbarBrand, NavItem } from 'reactstrap';
27 | import logo from '../../img/knots.svg';
28 |
29 | const Header = () => (
30 |
31 |
32 |
33 |
34 |
35 |
42 |
43 |
44 | );
45 |
46 | export default Header;
47 |
--------------------------------------------------------------------------------
/app/logos.js:
--------------------------------------------------------------------------------
1 | /*
2 | * knots
3 | * Copyright 2018 data.world, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the
7 | * License.
8 | *
9 | * You may obtain a copy of the License at
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | *
18 | * This product includes software developed at
19 | * data.world, Inc.(http://data.world/).
20 | */
21 |
22 | const importAll = (r) => {
23 | const images = {};
24 | const storeItem = (item) => {
25 | images[item.replace('./', '')] = r(item);
26 | };
27 |
28 | r.keys().map(storeItem);
29 | return images;
30 | };
31 |
32 | // require.context does not work with tests
33 | // https://github.com/facebook/create-react-app/issues/517
34 | let images = {};
35 | if (process.env.NODE_ENV === 'test') {
36 | images = {
37 | 'knots.svg': 'knots',
38 | 'tap-postgres.svg': 'postgres',
39 | 'tap-redshift.svg': 'redshift',
40 | 'tap-salesforce.svg': 'salesforce',
41 | 'target-datadotworld.svg': 'datadotworld',
42 | 'target-stitch.svg': 'stitch'
43 | };
44 | } else {
45 | images = importAll(require.context('./img', false, /\.svg$/));
46 | }
47 |
48 | export default (logo) => images[`${logo}.svg`];
49 |
--------------------------------------------------------------------------------
/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "parser": "babel-eslint",
3 | "parserOptions": {
4 | "sourceType": "module",
5 | "allowImportExportEverywhere": true
6 | },
7 | "extends": "airbnb",
8 | "env": {
9 | "browser": true,
10 | "node": true
11 | },
12 | "rules": {
13 | "arrow-parens": ["off"],
14 | "compat/compat": "error",
15 | "consistent-return": "off",
16 | "comma-dangle": "off",
17 | "generator-star-spacing": "off",
18 | "import/no-unresolved": "error",
19 | "import/no-extraneous-dependencies": "off",
20 | "jsx-a11y/anchor-is-valid": "off",
21 | "no-console": "off",
22 | "no-use-before-define": "off",
23 | "no-multi-assign": "off",
24 | "promise/param-names": "error",
25 | "promise/catch-or-return": "error",
26 | "promise/no-native": "off",
27 | "react/sort-comp": [
28 | "error",
29 | {
30 | "order": [
31 | "type-annotations",
32 | "static-methods",
33 | "lifecycle",
34 | "everything-else",
35 | "render"
36 | ]
37 | }
38 | ],
39 | "react/jsx-no-bind": "off",
40 | "react/jsx-filename-extension": [
41 | "error",
42 | { "extensions": [".js", ".jsx"] }
43 | ],
44 | "react/prefer-stateless-function": "off",
45 | "object-curly-newline": 0,
46 | "function-paren-newline": 0,
47 | "indent": 0
48 | },
49 | "plugins": ["flowtype", "import", "promise", "compat", "react"],
50 | "settings": {
51 | "import/resolver": {
52 | "webpack": {
53 | "config": "webpack.config.eslint.js"
54 | }
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/app/index.js:
--------------------------------------------------------------------------------
1 | /*
2 | * knots
3 | * Copyright 2018 data.world, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the
7 | * License.
8 | *
9 | * You may obtain a copy of the License at
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | *
18 | * This product includes software developed at
19 | * data.world, Inc.(http://data.world/).
20 | */
21 |
22 | import React from 'react';
23 | import { render } from 'react-dom';
24 | import { AppContainer } from 'react-hot-loader';
25 |
26 | import Root from './containers/Root';
27 | import { configureStore, history } from './store/configureStore';
28 | import './app.global.scss';
29 |
30 | const store = configureStore();
31 |
32 | render(
33 |
34 |
35 | ,
36 | document.getElementById('root')
37 | );
38 |
39 | if (module.hot) {
40 | module.hot.accept('./containers/Root', () => {
41 | const NextRoot = require('./containers/Root'); // eslint-disable-line global-require
42 | render(
43 |
44 |
45 | ,
46 | document.getElementById('root')
47 | );
48 | });
49 | }
50 |
--------------------------------------------------------------------------------
/app/routes.js:
--------------------------------------------------------------------------------
1 | /*
2 | * knots
3 | * Copyright 2018 data.world, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the
7 | * License.
8 | *
9 | * You may obtain a copy of the License at
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | *
18 | * This product includes software developed at
19 | * data.world, Inc.(http://data.world/).
20 | */
21 |
22 | /* eslint flowtype-errors/show-errors: 0 */
23 | import React from 'react';
24 | import { Switch, Route } from 'react-router';
25 | import App from './containers/App';
26 | import HomePage from './containers/HomePage';
27 | import Taps from './containers/Taps';
28 | import Schema from './containers/Schema';
29 | import Targets from './containers/Targets';
30 | import Sync from './containers/Sync';
31 | import SavedSync from './containers/SavedSync';
32 |
33 | export default () => (
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | );
45 |
--------------------------------------------------------------------------------
/app/components/Targets/TargetConfiguration/index.js:
--------------------------------------------------------------------------------
1 | /*
2 | * knots
3 | * Copyright 2018 data.world, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the
7 | * License.
8 | *
9 | * You may obtain a copy of the License at
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | *
18 | * This product includes software developed at
19 | * data.world, Inc.(http://data.world/).
20 | */
21 |
22 | // @flow
23 |
24 | import React, { Component } from 'react';
25 | import { Container, Row } from 'reactstrap';
26 |
27 | import DataWorld from '../../../containers/DataWorld';
28 | import Stitch from '../../../containers/Stitch';
29 |
30 | type Props = {
31 | targetsStore: {
32 | selectedTarget: { name: string, image: string }
33 | }
34 | };
35 |
36 | export default class Target extends Component {
37 | selectedTarget = () => {
38 | const { selectedTarget } = this.props.targetsStore;
39 | switch (selectedTarget.name) {
40 | case 'target-datadotworld':
41 | return ;
42 | case 'target-stitch':
43 | return ;
44 | default:
45 | return