aboutsummaryrefslogtreecommitdiffstats
path: root/graphgraph-fe/src/GraphSettings.js
diff options
context:
space:
mode:
authorPavel Paroulek <pavel.paroulek@orange.com>2019-05-24 15:39:49 +0200
committerPavel Paroulek <pavel.paroulek@orange.com>2019-05-24 17:02:53 +0200
commite22629636b27a473f7950d7b684c7017d01f6298 (patch)
treea0403231ec49553758c6a5e66987ac89cc8bdd9d /graphgraph-fe/src/GraphSettings.js
parent2dd4055f8fcfd3b003907645d44ee2f0e2d2803e (diff)
Adding property table and layout
Adding a new property table, reading new entity properties, improving layout, distribution configuration changes Change-Id: I59d5ce7f2facd12c23103c275a921ad25c77ed38 Issue-ID: AAI-531 Signed-off-by: Pavel Paroulek <pavel.paroulek@orange.com>
Diffstat (limited to 'graphgraph-fe/src/GraphSettings.js')
-rw-r--r--graphgraph-fe/src/GraphSettings.js16
1 files changed, 14 insertions, 2 deletions
diff --git a/graphgraph-fe/src/GraphSettings.js b/graphgraph-fe/src/GraphSettings.js
index 54e2f4c..0c036db 100644
--- a/graphgraph-fe/src/GraphSettings.js
+++ b/graphgraph-fe/src/GraphSettings.js
@@ -44,6 +44,9 @@ class GraphSettings extends React.Component {
loadInitialGraph (startNode, endNode, parentHops, cousinHops, childHops, edgeFilter) {
if (this.state.selectedSchema === '' || startNode === 'none') {
+ var s = this.state
+ s['edgeFilter'] = edgeFilter
+ this.setState(s)
return
}
if (startNode === 'all') {
@@ -71,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'
+ s['showHops'] = endNode === 'none' && startNode !== 'none' && startNode !== 'all' && edgeFilter !== 'Edgerules'
s['enableDestinationNode'] = startNode !== 'none' && startNode !== 'all'
this.setState(s)
@@ -84,7 +87,7 @@ class GraphSettings extends React.Component {
selectSchema (schema) {
var s = this.state
s['selectedSchema'] = schema
- fetch(nodeNames(schema))
+ fetch(nodeNames(schema, s['edgeFilter']))
.then(response => response.json())
.then(nodeNames => {
s['fromNode'] = s['toNode'] = 'none'
@@ -94,6 +97,15 @@ class GraphSettings extends React.Component {
}
changeEdgeFilter (edgeFilter) {
+ fetch(nodeNames(this.state.selectedSchema, edgeFilter))
+ .then(response => response.json())
+ .then(nodeNames => {
+ let s = this.state
+ s['edgeFilter'] = edgeFilter
+ s['fromNode'] = s['toNode'] = 'none'
+ s['nodeNames'] = nodeNames
+ this.setState(s)
+ })
this.loadInitialGraph(
this.state.fromNode,
this.state.toNode,