From 2d790f947330aeaa75b2e09610545bbdb16abb95 Mon Sep 17 00:00:00 2001 From: Benjamin Ricaud Date: Wed, 25 Sep 2019 19:27:01 +0200 Subject: [PATCH 1/7] G 3.4 (#74) * adapt to gremlin 3.4 * Added multi-version support and node properties scrolling (#63) * better compatibility with gremlin 3.3 and 3.4 * add missing dot on gremlin query From c51678bcc0170d1413db1f5ec04ee21968c3cc47 Mon Sep 17 00:00:00 2001 From: Rogelio Orts Date: Sun, 12 Jan 2020 20:41:50 +0100 Subject: [PATCH 2/7] Strict ID comparison to avoid exclude nodes (#81) * Add strict id comparation to avoid exclude nodes * Add strict type comparison for string type --- .gitignore | 2 ++ scripts/graphioGremlin.js | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 3a46f40..5537fb4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.DS_Store + d3/ font-awesome-4.7.0/ jquery* \ No newline at end of file diff --git a/scripts/graphioGremlin.js b/scripts/graphioGremlin.js index 25f993c..e3f5b89 100644 --- a/scripts/graphioGremlin.js +++ b/scripts/graphioGremlin.js @@ -172,7 +172,7 @@ var graphioGremlin = (function(){ var edge_filter = $('#edge_filter').val(); var communication_method = $('#communication_method').val(); var id = d.id; - if(isNaN(id)){ // Add quotes if id is a string (not a number). + if (typeof id === 'string' || id instanceof String) { // Add quotes if id is a string (not a number). id = '"'+id+'"'; } // Gremlin query @@ -442,7 +442,7 @@ var graphioGremlin = (function(){ // find the element in list with id equal to elem // return its index or null if there is no for (var i=0;i Date: Wed, 19 Feb 2020 17:50:16 +0100 Subject: [PATCH 3/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 61ac42b..f27e40d 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ On your web browser, just access the file `graphexp.html`. Next step, configure the server settings on the bottom of the page. The default Gremlin server address is `localhost:8182`. You will have to specify the communication protocol `websocket` or `REST` and the gremlin server version. Graphexp is not able to handle secure connections yet and a contribution on this topic would be welcome. -Graphexp works with [Amazon Neptune](https://aws.amazon.com/neptune) thanks to a pull request of [jwalton922](https://github.com/jwalton922). With this database, set `SINGLE_COMMANDS_AND_NO_VARS = true` in the file `graphConf.js`. +Graphexp works with [Amazon Neptune](https://aws.amazon.com/neptune) thanks to a pull request of [jwalton922](https://github.com/jwalton922). With this database, set `SINGLE_COMMANDS_AND_NO_VARS = true` in the file `graphConf.js`. You may also have a look at PR [#82](https://github.com/bricaud/graphexp/pull/82) if you use `https`. Additional parameters can be configured inside the file `graphConf.js`. From 33b00dce82b7989da95beb855d71324dcbe7c5ab Mon Sep 17 00:00:00 2001 From: bhsu22 <56443547+bhsu22@users.noreply.github.com> Date: Mon, 2 Mar 2020 12:51:11 -0500 Subject: [PATCH 4/7] AddsHTTPS support for REST protocol for AWS Neptune. (#82) * adds https support for REST protocol * add https flag to graphConf --- scripts/graphConf.js | 3 +++ scripts/graphioGremlin.js | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/graphConf.js b/scripts/graphConf.js index 8a0b882..e565283 100644 --- a/scripts/graphConf.js +++ b/scripts/graphConf.js @@ -8,6 +8,9 @@ const host = false; // For implementations like Neptune where only single commands are allowed per request // set to true const SINGLE_COMMANDS_AND_NO_VARS = false; +// For implementations like Neptune where communication only over https is allowed +// set to true +const REST_USE_HTTPS = false; // Time out for the REST protocol. Increase it if the graphDB is slow. const REST_TIMEOUT = 2000 diff --git a/scripts/graphioGremlin.js b/scripts/graphioGremlin.js index e3f5b89..6b73d65 100644 --- a/scripts/graphioGremlin.js +++ b/scripts/graphioGremlin.js @@ -216,7 +216,11 @@ var graphioGremlin = (function(){ let server_port = $('#server_port').val(); let COMMUNICATION_PROTOCOL = $('#server_protocol').val(); if (COMMUNICATION_PROTOCOL == 'REST'){ - let server_url = "http://"+server_address+":"+server_port; + if(REST_USE_HTTPS){ + let server_url = "https://"+server_address+":"+server_port; + } else{ + let server_url = "http://"+server_address+":"+server_port; + } run_ajax_request(gremlin_query,server_url,query_type,active_node,message,callback); } else if (COMMUNICATION_PROTOCOL == 'websocket'){ From 03cd908e8c5468b28c980de0d96469296c00cfdb Mon Sep 17 00:00:00 2001 From: Benjamin Ricaud Date: Mon, 2 Mar 2020 18:58:12 +0100 Subject: [PATCH 5/7] add info on https option for REST --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f27e40d..1564d24 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ On your web browser, just access the file `graphexp.html`. Next step, configure the server settings on the bottom of the page. The default Gremlin server address is `localhost:8182`. You will have to specify the communication protocol `websocket` or `REST` and the gremlin server version. Graphexp is not able to handle secure connections yet and a contribution on this topic would be welcome. -Graphexp works with [Amazon Neptune](https://aws.amazon.com/neptune) thanks to a pull request of [jwalton922](https://github.com/jwalton922). With this database, set `SINGLE_COMMANDS_AND_NO_VARS = true` in the file `graphConf.js`. You may also have a look at PR [#82](https://github.com/bricaud/graphexp/pull/82) if you use `https`. +Graphexp works with [Amazon Neptune](https://aws.amazon.com/neptune). With this database, set `SINGLE_COMMANDS_AND_NO_VARS = true` in the file `graphConf.js`. if you use REST over `https` you may need to set `REST_USE_HTTPS = true` as well. Additional parameters can be configured inside the file `graphConf.js`. From ab3a9619c72de6d24a132f956944c44948b47dde Mon Sep 17 00:00:00 2001 From: sherrisherry <34172217+sherrisherry@users.noreply.github.com> Date: Mon, 16 Mar 2020 03:22:36 -0400 Subject: [PATCH 6/7] added websocket secure (#86) --- graphexp.html | 1 + scripts/graphioGremlin.js | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/graphexp.html b/graphexp.html index 654423a..7ae324c 100644 --- a/graphexp.html +++ b/graphexp.html @@ -145,6 +145,7 @@

Graph Explorer v 0.6

diff --git a/scripts/graphioGremlin.js b/scripts/graphioGremlin.js index 6b73d65..2184ffa 100644 --- a/scripts/graphioGremlin.js +++ b/scripts/graphioGremlin.js @@ -227,6 +227,10 @@ var graphioGremlin = (function(){ let server_url = "ws://"+server_address+":"+server_port+"/gremlin" run_websocket_request(gremlin_query,server_url,query_type,active_node,message,callback); } + else if (COMMUNICATION_PROTOCOL == 'websockets'){ + let server_url = "wss://"+server_address+":"+server_port+"/gremlin" + run_websocket_request(gremlin_query,server_url,query_type,active_node,message,callback); + } else { console.log('Bad communication protocol. Check configuration file. Accept "REST" or "websocket" .') } From 568eabf13f57ee4de894d2dabd358d83fdc288b3 Mon Sep 17 00:00:00 2001 From: "M. Itokazu" <42832770+mitkz@users.noreply.github.com> Date: Tue, 17 Mar 2020 00:05:15 +0900 Subject: [PATCH 7/7] Fixed definition of server_url to pass its value to run_ajax_request(). (#88) --- scripts/graphioGremlin.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/graphioGremlin.js b/scripts/graphioGremlin.js index 2184ffa..cbcb803 100644 --- a/scripts/graphioGremlin.js +++ b/scripts/graphioGremlin.js @@ -216,10 +216,11 @@ var graphioGremlin = (function(){ let server_port = $('#server_port').val(); let COMMUNICATION_PROTOCOL = $('#server_protocol').val(); if (COMMUNICATION_PROTOCOL == 'REST'){ + let server_url = "" if(REST_USE_HTTPS){ - let server_url = "https://"+server_address+":"+server_port; + server_url = "https://"+server_address+":"+server_port; } else{ - let server_url = "http://"+server_address+":"+server_port; + server_url = "http://"+server_address+":"+server_port; } run_ajax_request(gremlin_query,server_url,query_type,active_node,message,callback); }