diff options
author | Pavel Paroulek <pavel.paroulek@orange.com> | 2019-05-28 14:43:01 +0200 |
---|---|---|
committer | Pavel Paroulek <pavel.paroulek@orange.com> | 2019-05-28 14:43:01 +0200 |
commit | cd8c4a64f0b6aa74e8190c53bf21924d291b76e0 (patch) | |
tree | e2ecdc6a33897a39207ad6412870b605dd1f3428 /graphgraph-fe/src | |
parent | e22629636b27a473f7950d7b684c7017d01f6298 (diff) |
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 <pavel.paroulek@orange.com>
Diffstat (limited to 'graphgraph-fe/src')
-rw-r--r-- | graphgraph-fe/src/GraphHops.js | 9 | ||||
-rw-r--r-- | graphgraph-fe/src/GraphSettings.js | 5 | ||||
-rw-r--r-- | graphgraph-fe/src/PopupSettings.js | 2 |
3 files changed, 11 insertions, 5 deletions
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 ( + <div className="hops-input"> + {createNumInput('edgerule hops', this.onChangeCousin, this.state.cousinHops)} + </div> + ) + } + return ( <div className="hops-input"> {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 = [ <MenuItem key='Edgerules' eventKey='Edgerules'>Edgerules</MenuItem>, <MenuItem key='Parents' eventKey='Parents'>Parent-child (OXM structure)</MenuItem>, - <MenuItem key='Both' eventKey='Both'>Both</MenuItem> ] return ( <div> @@ -211,7 +210,7 @@ class GraphSettings extends React.Component { </DropdownButton> </div> - <Popup isDisabled={!this.state.showHops} parentHops={this.state.hops.parents} childHops={this.state.hops.child} cousinHops={this.state.hops.cousin} updateHops={this.updateHops}/> + <Popup isDisabled={!this.state.showHops} edgeFilter={this.state.edgeFilter} parentHops={this.state.hops.parents} childHops={this.state.hops.child} cousinHops={this.state.hops.cousin} updateHops={this.updateHops}/> </div> </div> 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 { <Popup trigger={<button className='settings-button' disabled={this.props.isDisabled}>Hops</button>} position="bottom right"> {close => ( <div> - <GraphHops parentHops={this.props.parentHops} childHops={this.props.childHops} cousinHops={this.props.cousinHops} updateHops={this.props.updateHops} /> + <GraphHops edgeFilter={this.props.edgeFilter} parentHops={this.props.parentHops} childHops={this.props.childHops} cousinHops={this.props.cousinHops} updateHops={this.props.updateHops} /> <button type="button" className="link-button, close" |