You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spot.apache.org by le...@apache.org on 2017/06/29 00:36:26 UTC

[2/2] incubator-spot git commit: Added validation to proxys network view to avoid rendering a unique node when no data is available

Added validation to proxys network view to avoid rendering a unique node when no data is available


Project: http://git-wip-us.apache.org/repos/asf/incubator-spot/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spot/commit/d360de15
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spot/tree/d360de15
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spot/diff/d360de15

Branch: refs/heads/SPOT-35_graphql_api
Commit: d360de15e52d91c73f2f56a9482bced505dd89b7
Parents: 9b633d2
Author: LedaLima <le...@apache.org>
Authored: Wed Jun 28 18:57:12 2017 -0500
Committer: LedaLima <le...@apache.org>
Committed: Wed Jun 28 18:57:12 2017 -0500

----------------------------------------------------------------------
 spot-oa/ui/proxy/js/components/NetworkViewPanel.react.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-spot/blob/d360de15/spot-oa/ui/proxy/js/components/NetworkViewPanel.react.js
----------------------------------------------------------------------
diff --git a/spot-oa/ui/proxy/js/components/NetworkViewPanel.react.js b/spot-oa/ui/proxy/js/components/NetworkViewPanel.react.js
index 67d435e..7f9ad58 100755
--- a/spot-oa/ui/proxy/js/components/NetworkViewPanel.react.js
+++ b/spot-oa/ui/proxy/js/components/NetworkViewPanel.react.js
@@ -102,7 +102,7 @@ var NetworkViewPanel = React.createClass({
         // Delete old links
         this.link.exit().remove();
 
-        // Update nodes
+        // Update nodesw
         this.node = this.canvas.selectAll('.node, .proxy_node')
             .data(nodes.filter((node) => node.visible), function(d) { return d.id; });
 
@@ -261,7 +261,7 @@ var NetworkViewPanel = React.createClass({
                 type: 'Root',
                 tooltip: 'Double click to toggle child nodes',
                 rep: -1,
-                visible: true,
+                visible: state.data.length > 0 ? true : false,
                 expanded: false,
                 root: true
             };