Skip to content

Commit

Permalink
19-filter-by-edge-label
Browse files Browse the repository at this point in the history
Adds a functionality to filter the next exploration step by edge label. Works per step, i.e. the value of the edge_filter field may be changed between exploration steps and the change will take effect on the next step, leaving previous steps untouched.

Also makes header a CSS grid with auto rows flow as new fields being added.
  • Loading branch information
grreeenn committed Apr 9, 2018
1 parent a1290c1 commit e6da71e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/graphioGremlin.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ var graphioGremlin = (function(){
!isNaN(parseInt(value, 10));
}
function click_query(d) {
var edge_filter = $('#edge_filter').val();
var edge_filter = $('#edge_filter').val();
// Gremlin query
//var gremlin_query = "g.V("+d.id+").bothE().bothV().path()"
// 'inject' is necessary in case of an isolated node ('both' would lead to an empty answer)
Expand All @@ -143,7 +143,7 @@ var graphioGremlin = (function(){
id = '"'+id+'"';
}
var gremlin_query_nodes = 'nodes = g.V('+id+').as("node").both('+(edge_filter?'"'+edge_filter+'"':'')+').as("node").select(all,"node").inject(g.V('+id+')).unfold()'
var gremlin_query_edges = "edges = g.V("+id+").bothE("+(edge_filter?"'"+edge_filter+"'":"")+")";
var gremlin_query_edges = "edges = g.V("+id+").bothE("+(edge_filter?"'"+edge_filter+"'":"")+")";
var gremlin_query = gremlin_query_nodes+'\n'+gremlin_query_edges+'\n'+'[nodes.toList(),edges.toList()]'
// while busy, show we're doing something in the messageArea.
$('#messageArea').html('<h3>(loading)</h3>');
Expand Down

0 comments on commit e6da71e

Please sign in to comment.