Skip to content

Commit

Permalink
Revamp tooltips
Browse files Browse the repository at this point in the history
Remove redundant queries
  • Loading branch information
rvazarkar committed Sep 2, 2016
1 parent 5cbbf41 commit 7280e5a
Showing 1 changed file with 5 additions and 17 deletions.
22 changes: 5 additions & 17 deletions src/components/tooltip.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@
<li onclick="emitter.emit('setEnd', '{{label}}')">
<i class="glyphicon glyphicon-screenshot"> </i> Set as Ending Node
</li>
<li onclick="emitter.emit('query', 'MATCH (n {name:\'{{label}}\'})-[r:MemberOf]->(m) RETURN n,r,m', '{{label}}')">
<i class="glyphicon glyphicon-screenshot"> </i> Group Membership
</li>
<li onclick="emitter.emit('query', 'MATCH (n:User {name:\'{{label}}\'}), (target:Computer),p=allShortestPaths((n)-[*]->(target)) RETURN p', '{{label}}')">
<i class="glyphicon glyphicon-screenshot"> </i> Admin To
<li onclick="emitter.emit('query', 'MATCH (n:User {name:\'{{label}}\'}),(m:User),p=allShortestPaths((m)-[r*1..]->(n)) RETURN p', '{{label}}')">
<i class="glyphicon glyphicon-screenshot"> </i> Shortest Paths to Here
</li>
{{/type_user}}
{{#type_computer}}
Expand All @@ -23,15 +20,9 @@
<li onclick="emitter.emit('setEnd', '{{label}}')">
<i class="glyphicon glyphicon-screenshot"> </i> Set as Ending Node
</li>
<li onclick="emitter.emit('query', 'MATCH (n:Computer {name:\'{{label}}\'}), (m), p=allShortestPaths((m)-[r*1..]->(n)) RETURN p', '{{label}}')">
<li onclick="emitter.emit('query', 'MATCH (n:Computer {name:\'{{label}}\'}),(m:User),p=allShortestPaths((m)-[r*1..]->(n)) RETURN p', '{{label}}')">
<i class="glyphicon glyphicon-screenshot"> </i> Shortest Paths to Here
</li>
<li onclick="emitter.emit('query', 'MATCH (n:User {name:\'{{label}}\'}), (target:Computer),p=allShortestPaths((n)-[*]->(target)) RETURN p', '{{label}}')>
<i class="glyphicon glyphicon-screenshot"> </i> Get Explicit Admins
</li>
<li onclick="emitter.emit('query', 'MATCH (m:Computer {name:\'{{label}}\'})-[r:HasSession]->(n:User) WITH n,r,m WHERE NOT n.name ENDS WITH \'$\' RETURN n,r,m', '{{label}}')>
<i class="glyphicon glyphicon-screenshot"> </i> Get User Sessions
</li>
{{/type_computer}}
{{#type_group}}
<li onclick="emitter.emit('setStart', '{{label}}')">
Expand All @@ -40,11 +31,8 @@
<li onclick="emitter.emit('setEnd', '{{label}}')">
<i class="glyphicon glyphicon-screenshot"> </i> Set as Ending Node
</li>
<li onclick="emitter.emit('query', 'MATCH (n {name:\'{{label}}\'})<-[r:MemberOf]-(m) RETURN n,r,m', '{{label}}')"">
<i class="glyphicon glyphicon-screenshot"> </i> Get Members
</li>
<li onclick="emitter.emit('query', 'MATCH (n {name:\'{{label}}\'})-[r:AdminTo]->(m) RETURN n,r,m', '{{label}}')">
<i class="glyphicon glyphicon-screenshot"> </i> Admin To
<li onclick="emitter.emit('query', 'MATCH (n:Group {name:\'{{label}}\'}),(m:User),p=allShortestPaths((m)-[r*1..]->(n)) RETURN p', '{{label}}')">
<i class="glyphicon glyphicon-screenshot"> </i> Shortest Paths to Here
</li>
{{/type_group}}
{{#expand}}
Expand Down

0 comments on commit 7280e5a

Please sign in to comment.