Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ To run the client,

Access the client side from a browser:

http://localhost:7472/
http://localhost:7473//

API Server

Expand Down
Binary file added assets/images/usebility_result.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion client/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@

npm-debug.log*
yarn-debug.log*
yarn-error.log*
yarn-error.log*

.netlify
2 changes: 1 addition & 1 deletion client/src/DemoPages/DataDashboard/DataDashboard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default class DataDashboard extends Component {
{
Axios({
method: "get",
url: `http://localhost:7473/data/nodes/${dataNodeId}/children`,
url: `http://165.227.106.53:7473/data/nodes/${dataNodeId}/children`,
withCredentials: true,
})
.then(response =>
Expand Down
14 changes: 7 additions & 7 deletions client/src/DemoPages/Home/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class Home extends React.Component {
this.setState({messagePending: "Create blank database"});

return axios({
url: 'http://localhost:7473/app',
url: 'http://165.227.106.53:7473/app',
withCredentials: true,
method: 'post',
data: {name: this.state.newProjName, isNewProject: true}
Expand All @@ -83,7 +83,7 @@ class Home extends React.Component {
const {datasets} = data.datasets;
readData = data;
return axios({
url: 'http://localhost:7473/dataset',
url: 'http://165.227.106.53:7473/dataset',
withCredentials: true,
method: 'post',
data: datasets,
Expand All @@ -94,7 +94,7 @@ class Home extends React.Component {
const {datagraph, intgraph, visgraph} = readData;

return axios({
url: `http://localhost:7473/app/${this.state.newProjName}`,
url: `http://165.227.106.53:7473/app/${this.state.newProjName}`,
withCredentials: true,
method: 'post',
data: {
Expand Down Expand Up @@ -124,7 +124,7 @@ class Home extends React.Component {
});

axios({
url: 'http://localhost:7473/app',
url: 'http://165.227.106.53:7473/app',
withCredentials: true,
method: 'get'
})
Expand All @@ -141,7 +141,7 @@ class Home extends React.Component {
});

return axios({
url: `http://localhost:7473/app/${name}`,
url: `http://165.227.106.53:7473/app/${name}`,
withCredentials: true,
method: 'get'
}).then(response => {
Expand All @@ -165,7 +165,7 @@ class Home extends React.Component {
}

return axios({
url: 'http://localhost:7473/app',
url: 'http://165.227.106.53:7473/app',
withCredentials: true,
method: 'post',
data: {name: this.state.newProjName, isNewProject: true}
Expand All @@ -188,7 +188,7 @@ class Home extends React.Component {
deleteProject(projectName)
{
return axios({
url: `http://localhost:7473/app/${projectName}`,
url: `http://165.227.106.53:7473/app/${projectName}`,
withCredentials: true,
method: 'delete'
}).then(() => {
Expand Down
2 changes: 1 addition & 1 deletion client/src/DemoPages/VisDashboard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class Dashboard extends Component {
this.setState({ loadRecommendedSequence: true });
Axios({
method: 'post',
url: `http://localhost:7473/vis/sequenceRecommend`,
url: `http://165.227.106.53:7473/vis/sequenceRecommend`,
data: {
charts: this.props.visgraph.nodes.map(node => ({
...node.data.spec,
Expand Down
2 changes: 1 addition & 1 deletion client/src/Layout/AppMain/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ const AppMain = ({
const downloadProject = () => {
const name = Cookies.get("project_name");
return axios({
url: `http://localhost:7473/app/${name}`,
url: `http://165.227.106.53:7473/app/${name}`,
withCredentials: true,
method: 'get'
}).then(response => {
Expand Down
8 changes: 4 additions & 4 deletions client/src/redux/DataGraphActionCreators.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const addDataNode = ({
const newNode = { name, type, source, transform, format};
return Axios({
method: 'post',
url: 'http://localhost:7473/data/nodes',
url: 'http://165.227.106.53:7473/data/nodes',
data: newNode,
withCredentials: true
})
Expand Down Expand Up @@ -82,7 +82,7 @@ export const addDataEdge = ({source, target, type, data}) => (dispatch) => {

return Axios({
method: "post",
url: "http://localhost:7473/data/edges",
url: "http://165.227.106.53:7473/data/edges",
data: newEdge,
withCredentials: true
}).then(response => {
Expand Down Expand Up @@ -114,7 +114,7 @@ export const addDataEdge = ({source, target, type, data}) => (dispatch) => {
export const removeDataNode = ({ id }) => dispatch => {
return Axios({
method: 'delete',
url: `http://localhost:7473/data/nodes/${id}`,
url: `http://165.227.106.53:7473/data/nodes/${id}`,
withCredentials: true,
})
.then(response => {
Expand Down Expand Up @@ -157,7 +157,7 @@ export const setDataPosition = payload => dispatch => {
const {x, y, id} = payload;
return Axios({
method: 'put',
url: `http://localhost:7473/data/nodes/${id}`,
url: `http://165.227.106.53:7473/data/nodes/${id}`,
data: {x, y},
withCredentials: true,
}).then((response) => {
Expand Down
2 changes: 1 addition & 1 deletion client/src/redux/DatasetActionCreators.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import toastOptions from '../DemoPages/config/toastOptions';
export const addDataset = ({ name, dataset }) => dispatch => {
toast.info(`Adding dataset ${name}`, toastOptions);
return axios({
url: 'http://localhost:7473/dataset',
url: 'http://165.227.106.53:7473/dataset',
withCredentials: true,
method: 'post',
data: [{name, dataset}]
Expand Down
12 changes: 6 additions & 6 deletions client/src/redux/IntGraphActionCreators.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import toastOptions from '../DemoPages/config/toastOptions';
export const saveIntNode = ({name, source}) => dispatch => {
return axios({
method: 'post',
url: `http://localhost:7473/int/nodes`,
url: `http://165.227.106.53:7473/int/nodes`,
data: {source, name},
withCredentials: true,
})
Expand Down Expand Up @@ -42,7 +42,7 @@ export const saveIntEdge = payload => ({
export const addIntEdge = ({source, target, signal, binding, label}) => dispatch => {
return axios({
method: 'post',
url: `http://localhost:7473/int/edges`,
url: `http://165.227.106.53:7473/int/edges`,
data: {source, target, signal, binding, label},
withCredentials: true,
})
Expand Down Expand Up @@ -71,7 +71,7 @@ export const addIntEdge = ({source, target, signal, binding, label}) => dispatch
export const removeIntNode = ({id}) => dispatch => {
return axios({
method: 'delete',
url: `http://localhost:7473/int/nodes/${id}`,
url: `http://165.227.106.53:7473/int/nodes/${id}`,
data: {id},
withCredentials: true,
}).then(response => {
Expand All @@ -97,7 +97,7 @@ export const removeIntEdge = ({id}) => dispatch =>
{
return axios({
method: 'delete',
url: `http://localhost:7473/int/edges/${id}`,
url: `http://165.227.106.53:7473/int/edges/${id}`,
data: {id},
withCredentials: true,
}).then(response => {
Expand All @@ -120,7 +120,7 @@ export const setIntPosition = payload => dispatch => {
const {x, y, id} = payload;
return axios({
method: 'put',
url: `http://localhost:7473/int/nodes/${id}`,
url: `http://165.227.106.53:7473/int/nodes/${id}`,
data: {x, y},
withCredentials: true,
})
Expand All @@ -138,7 +138,7 @@ export const setIntPosition = payload => dispatch => {
const {id, params} = payload;
return axios({
method: 'put',
url: `http://localhost:7473/int/nodes/${id}`,
url: `http://165.227.106.53:7473/int/nodes/${id}`,
data: params,
withCredentials: true,
})
Expand Down
8 changes: 4 additions & 4 deletions client/src/redux/VisGraphActionCreators.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const addVisNode = ({ name, dataSource, spec }) => dispatch => {
const newNode = { name, dataSource, spec};
return Axios({
method: 'post',
url: 'http://localhost:7473/vis/nodes',
url: 'http://165.227.106.53:7473/vis/nodes',
data: newNode,
withCredentials: true,
})
Expand Down Expand Up @@ -54,7 +54,7 @@ export const removeAllVisEdgesByType = payload => ({
export const removeVisNode = payload => dispatch => {
return Axios({
method: 'delete',
url: `http://localhost:7473/vis/nodes/${payload.id}`,
url: `http://165.227.106.53:7473/vis/nodes/${payload.id}`,
data: payload,
withCredentials: true,
})
Expand Down Expand Up @@ -90,7 +90,7 @@ export const setVisNode = payload => dispatch => {
const {id, params} = payload;
return Axios({
method: 'put',
url: `http://localhost:7473/vis/nodes/${id}`,
url: `http://165.227.106.53:7473/vis/nodes/${id}`,
data: params,
withCredentials: true,
})
Expand All @@ -110,7 +110,7 @@ export const setVisPosition = payload => dispatch => {
const {x, y, id} = payload;
return Axios({
method: 'put',
url: `http://localhost:7473/vis/nodes/${id}`,
url: `http://165.227.106.53:7473/vis/nodes/${id}`,
data: {x, y},
withCredentials: true,
})
Expand Down
2 changes: 1 addition & 1 deletion client/src/utils/dataGeneration.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ async function calculateDataset(dataNodeId, datasets, params = {})
{
return Axios({
method: "get",
url: `http://localhost:7473/data/subgraph/${dataNodeId}`,
url: `http://165.227.106.53:7473/data/subgraph/${dataNodeId}`,
withCredentials: true
}).then(response => {
if (response.statusText !== "OK")
Expand Down
32 changes: 17 additions & 15 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ services:
- ./server/data:/srv/app/server/data
- ./server/app.js:/srv/app/server/app.js
- ./server/utils:/srv/app/server/utils
- ./server/bin:/srv/app/server/bin
- ./server/cert:/srv/app/server/cert
networks:
- db-server
- client-server
Expand Down Expand Up @@ -65,25 +67,25 @@ services:
############################
# setup client container
############################
# client:
# build: ./client
client:
build: ./client

# container_name: gravity-client
# # environment:
# # - REACT_APP_PORT=REACT_APP_PORT
# expose:
# - ${REACT_APP_PORT}
container_name: gravity-client
# environment:
# - REACT_APP_PORT=REACT_APP_PORT
expose:
- ${REACT_APP_PORT}

# ports:
# - ${REACT_APP_PORT}:${REACT_APP_PORT}
ports:
- ${REACT_APP_PORT}:${REACT_APP_PORT}

# volumes:
# - ./client/src:/srv/app/client/src
# - ./client/public:/srv/app/client/public
volumes:
- ./client/src:/srv/app/client/src
- ./client/public:/srv/app/client/public

# networks:
# - client-server
# command: npm run start
networks:
- client-server
command: npm run start

networks:
client-server:
Expand Down
2 changes: 1 addition & 1 deletion server/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ app.use(bodyParser.json({limit: '50mb'}));
// })

app.use(function(req, res, next) {
res.header('Access-Control-Allow-Origin', 'http://localhost:7472');
res.header('Access-Control-Allow-Origin', 'http://165.227.106.53:7472');
res.header('Access-Control-Allow-Credentials', 'true');
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
next();
Expand Down
11 changes: 10 additions & 1 deletion server/bin/www
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,29 @@
var app = require('../app');
var debug = require('debug')('server1:server');
var http = require('http');

var https = require('https');
var fs = require('fs');
var path = require('path');
/**
* Get port from environment and store in Express.
*/


var port = normalizePort(process.env.PORT || '7473');
app.set('port', port);

/**
* Create HTTP server.
*/

// var server = http.createServer(app);
var server = http.createServer(app);

// var server = https.createServer({
// key: fs.readFileSync(path.join(__dirname, '../cert', 'key.pem')),
// cert: fs.readFileSync(path.join(__dirname, '../cert', 'cert.pem')),
// }, app);

/**
* Listen on provided port, on all network interfaces.
*/
Expand Down
22 changes: 22 additions & 0 deletions server/cert/cert.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
-----BEGIN CERTIFICATE-----
MIIDuzCCAqMCFAsyFnl2HAvCaJDb4a1FO0xoK8OkMA0GCSqGSIb3DQEBCwUAMIGZ
MQswCQYDVQQGEwJBVTERMA8GA1UECAwIVmljdG9yaWExEjAQBgNVBAcMCU1lbGJv
dXJuZTEaMBgGA1UECgwRTW9uYXNoIFVuaXZlcnNpdHkxGTAXBgNVBAsMEERlcGFy
dG1lbnQgb2YgSVQxLDAqBgkqhkiG9w0BCQEWHTEwMTkyMTYyM0BzdHVkZW50LnN3
aW4uZWR1LmF1MB4XDTIxMDIxNzEwNTYyN1oXDTIyMDIxNzEwNTYyN1owgZkxCzAJ
BgNVBAYTAkFVMREwDwYDVQQIDAhWaWN0b3JpYTESMBAGA1UEBwwJTWVsYm91cm5l
MRowGAYDVQQKDBFNb25hc2ggVW5pdmVyc2l0eTEZMBcGA1UECwwQRGVwYXJ0bWVu
dCBvZiBJVDEsMCoGCSqGSIb3DQEJARYdMTAxOTIxNjIzQHN0dWRlbnQuc3dpbi5l
ZHUuYXUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDuP4ziSz7dsPa8
ebsGvctUT+zxvQJNyJc0+z+l2ItwchUtWhYwN13xhlzz65Ht9ff28vAcvt1XxVKW
RyPaxo53IdUSlG4iq4PPYxKxPInih7KEE4+PuWMbqkLkQ+5aTxtdTc2xRpgqfqXH
Vu3zDqgox0QwkOJxUaGXYQa+c9tvJre78oLqF9GuSz+Q8eYtgHamnB4cIKDw2o4I
VmixvzEEFCLGHGkuVRa+LHS9GDvc0coE+m6al6NJSgb4gVU2OErzMVjAbAmi33zr
IhIa87BMsKXJrT9frbAgNU/Ytg7awG9rKKuL+VnZCC2BVrDKB9rq8iy3H6Hz+UKP
bWfvkFgHAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAHMgb0P4RoZwDH8DpZ3fTkQh
TMdGJa7bAG34OwttlDXzS+2SpHquGybmOvwSmETFTeC+F23HKcgSoXIpz9Y3Ayzx
Jgc/IaV8L5q1fk+VomLQx9TAMvon/fcsu4yP4B6wZXnchQzMf070owWgwSbnp4jm
epSiAGNJfmzuZX2scK/qMCILfUnGjUOT3PLm9SHvdpFX/FEro9+b+Nxpf3CdQaQQ
1WX8QfzHBxmBY4DUzRk3SPNwZF2fpUytdSKjC6QnVOjFAh8MQ7B4NnT8IhN4cptc
dDSz4amsQxZd3k6sr3KDsFfwl7n9+lTC1ZrSIrGLpdTQCvxAFfHESj6XYJda9T0=
-----END CERTIFICATE-----
27 changes: 27 additions & 0 deletions server/cert/key.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEA7j+M4ks+3bD2vHm7Br3LVE/s8b0CTciXNPs/pdiLcHIVLVoW
MDdd8YZc8+uR7fX39vLwHL7dV8VSlkcj2saOdyHVEpRuIquDz2MSsTyJ4oeyhBOP
j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