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/14 18:47:45 UTC

incubator-spot git commit: Bug fix - The UI is not displaying the correct layout for internal/external IPs

Repository: incubator-spot
Updated Branches:
  refs/heads/SPOT-35_graphql_api 208413c23 -> 73897798c


Bug fix - The UI is not displaying the correct layout for internal/external IPs


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

Branch: refs/heads/SPOT-35_graphql_api
Commit: 73897798ce8f1f855fc64925b2f97fc82621eeb3
Parents: 208413c
Author: LedaLima <le...@apache.org>
Authored: Thu Jun 8 17:30:41 2017 -0500
Committer: LedaLima <le...@apache.org>
Committed: Thu Jun 8 17:30:41 2017 -0500

----------------------------------------------------------------------
 spot-oa/api/graphql/flow/query.py                       | 8 ++++----
 spot-oa/ui/dns/js/components/NetworkViewPanel.react.js  | 2 +-
 spot-oa/ui/flow/js/components/NetworkViewPanel.react.js | 2 +-
 spot-oa/ui/js/components/PolloNetworkViewMixin.react.js | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-spot/blob/73897798/spot-oa/api/graphql/flow/query.py
----------------------------------------------------------------------
diff --git a/spot-oa/api/graphql/flow/query.py b/spot-oa/api/graphql/flow/query.py
index 3806de9..64c4c53 100644
--- a/spot-oa/api/graphql/flow/query.py
+++ b/spot-oa/api/graphql/flow/query.py
@@ -78,14 +78,14 @@ SuspiciousType = GraphQLObjectType(
             resolver=lambda root, *_: root.get('rank') or 0
         ),
         'srcIp_isInternal': GraphQLField(
-            type=GraphQLBoolean,
+            type=GraphQLInt,
             description='Internal source IP address context flag',
-            resolver=lambda root, *_: root.get('srcip_internal') == '1'
+            resolver=lambda root, *_: root.get('srcip_internal')
         ),
         'dstIp_isInternal': GraphQLField(
-            type=GraphQLBoolean,
+            type=GraphQLInt,
             description='Internal destionation IP address context flag',
-            resolver=lambda root, *_: root.get('dstip_internal') == '1'
+            resolver=lambda root, *_: root.get('dstip_internal')
         ),
         'srcIp_geoloc': GraphQLField(
             type=GraphQLString,

http://git-wip-us.apache.org/repos/asf/incubator-spot/blob/73897798/spot-oa/ui/dns/js/components/NetworkViewPanel.react.js
----------------------------------------------------------------------
diff --git a/spot-oa/ui/dns/js/components/NetworkViewPanel.react.js b/spot-oa/ui/dns/js/components/NetworkViewPanel.react.js
index 7328c76..e2888f3 100755
--- a/spot-oa/ui/dns/js/components/NetworkViewPanel.react.js
+++ b/spot-oa/ui/dns/js/components/NetworkViewPanel.react.js
@@ -46,7 +46,7 @@ function getNodesFromData(data) {
                 nodes[id] = {
                     id: id,
                     label: item[field],
-                    internalIp: field==='tld',
+                    internalIp: field==='tld' ? 1 : 0,
                     hits: 1
                 };
             }

http://git-wip-us.apache.org/repos/asf/incubator-spot/blob/73897798/spot-oa/ui/flow/js/components/NetworkViewPanel.react.js
----------------------------------------------------------------------
diff --git a/spot-oa/ui/flow/js/components/NetworkViewPanel.react.js b/spot-oa/ui/flow/js/components/NetworkViewPanel.react.js
index db943ee..c49daf5 100755
--- a/spot-oa/ui/flow/js/components/NetworkViewPanel.react.js
+++ b/spot-oa/ui/flow/js/components/NetworkViewPanel.react.js
@@ -49,7 +49,7 @@ function getNodesFromData(data) {
                 nodes[id] = {
                     id: id,
                     label: item[field],
-                    internalIp: item[mapper[field]]==='1',
+                    internalIp: item[mapper[field]],
                     hits: 1
                 };
             }

http://git-wip-us.apache.org/repos/asf/incubator-spot/blob/73897798/spot-oa/ui/js/components/PolloNetworkViewMixin.react.js
----------------------------------------------------------------------
diff --git a/spot-oa/ui/js/components/PolloNetworkViewMixin.react.js b/spot-oa/ui/js/components/PolloNetworkViewMixin.react.js
index 09b684c..7f34d59 100755
--- a/spot-oa/ui/js/components/PolloNetworkViewMixin.react.js
+++ b/spot-oa/ui/js/components/PolloNetworkViewMixin.react.js
@@ -19,7 +19,7 @@ const PolloNetworkViewMixin = {
 
         // Node related scales
         const hitsDomain = [1, this.state.data.maxNodes];
-        const ipDomain = [false, true];
+        const ipDomain = [0,1];
         this.nodeSizeScale = d3.scale.linear().domain(hitsDomain);
         this.chargeScale = d3.scale.linear().domain(hitsDomain);
         this.typeScale = d3.scale.ordinal().domain(ipDomain).range(["circle", "diamond"]);