From cd8c4a64f0b6aa74e8190c53bf21924d291b76e0 Mon Sep 17 00:00:00 2001 From: Pavel Paroulek Date: Tue, 28 May 2019 14:43:01 +0200 Subject: Adding edgerule filtering Adding edgerule filter and removing 'Both' option from drop down menu Change-Id: I1969052166cc213a891d52fef9e79c1901ff7f9f Issue-ID: AAI-531 Signed-off-by: Pavel Paroulek --- graphgraph-fe/src/GraphHops.js | 9 ++++++++- graphgraph-fe/src/GraphSettings.js | 5 ++--- graphgraph-fe/src/PopupSettings.js | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) (limited to 'graphgraph-fe/src') diff --git a/graphgraph-fe/src/GraphHops.js b/graphgraph-fe/src/GraphHops.js index cd5763a..de7a4cc 100644 --- a/graphgraph-fe/src/GraphHops.js +++ b/graphgraph-fe/src/GraphHops.js @@ -50,7 +50,14 @@ class GraphHops extends React.Component { } render () { - // {createNumInput('cousin hops', this.onChangeCousin, this.state.cousinHops)} + if (this.props.edgeFilter === 'Edgerules'){ + return ( +
+ {createNumInput('edgerule hops', this.onChangeCousin, this.state.cousinHops)} +
+ ) + } + return (
{createNumInput('parent hops', this.onChangeParent, this.state.parentHops)} diff --git a/graphgraph-fe/src/GraphSettings.js b/graphgraph-fe/src/GraphSettings.js index 0c036db..1e80da9 100644 --- a/graphgraph-fe/src/GraphSettings.js +++ b/graphgraph-fe/src/GraphSettings.js @@ -74,7 +74,7 @@ class GraphSettings extends React.Component { s['toNode'] = endNode s['graph'] = g s['edgeFilter'] = edgeFilter - s['showHops'] = endNode === 'none' && startNode !== 'none' && startNode !== 'all' && edgeFilter !== 'Edgerules' + s['showHops'] = endNode === 'none' && startNode !== 'none' && startNode !== 'all' s['enableDestinationNode'] = startNode !== 'none' && startNode !== 'all' this.setState(s) @@ -174,7 +174,6 @@ class GraphSettings extends React.Component { let edgeFilterItems = [ Edgerules, Parent-child (OXM structure), - Both ] return (
@@ -211,7 +210,7 @@ class GraphSettings extends React.Component {
- +
diff --git a/graphgraph-fe/src/PopupSettings.js b/graphgraph-fe/src/PopupSettings.js index a278bc8..cb8a533 100644 --- a/graphgraph-fe/src/PopupSettings.js +++ b/graphgraph-fe/src/PopupSettings.js @@ -9,7 +9,7 @@ class PopupMenu extends React.Component { Hops} position="bottom right"> {close => (
- +