You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ha...@apache.org on 2018/10/18 03:21:05 UTC

[incubator-skywalking-ui] 01/03: Add endpoint dependencies map

This is an automated email from the ASF dual-hosted git repository.

hanahmily pushed a commit to branch 6.0.0/dev
in repository https://gitbox.apache.org/repos/asf/incubator-skywalking-ui.git

commit 741fd263ea1e74571a3a3dbeb553f2535a50e008
Author: Gao Hongtao <ha...@gmail.com>
AuthorDate: Tue Oct 16 20:55:52 2018 +0800

    Add endpoint dependencies map
---
 src/components/Charts/EndpointDeps/index.js | 4 ++++
 src/components/Topology/Base.js             | 4 ++--
 src/models/topology.js                      | 2 +-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/components/Charts/EndpointDeps/index.js b/src/components/Charts/EndpointDeps/index.js
index 8cc478a..39d7f25 100644
--- a/src/components/Charts/EndpointDeps/index.js
+++ b/src/components/Charts/EndpointDeps/index.js
@@ -25,6 +25,10 @@ class EndpointDeps extends PureComponent {
     if (deps === preDeps) {
       return;
     }
+    const { calls } = deps;
+    if (calls.length < 1) {
+      return;
+    } 
     const { onLoadMetrics } = this.props;
     onLoadMetrics(deps);
   }
diff --git a/src/components/Topology/Base.js b/src/components/Topology/Base.js
index e6631fa..a860017 100644
--- a/src/components/Topology/Base.js
+++ b/src/components/Topology/Base.js
@@ -94,8 +94,8 @@ export default class Base extends Component {
     if (onLoadMetircs) {
       onLoadMetircs(
         elementes.nodes.filter(_ => _.data.id.indexOf('USER') < 0).map(_ => _.data.id),
-        elementes.edges.filter(_ => _.data.detectPoint === 'SERVER').map(_ => _.data.id),
-        elementes.edges.filter(_ => _.data.detectPoint === 'CLIENT').map(_ => _.data.id),
+        elementes.edges.filter(_ => _.data.detectPoint === 'SERVER').map(_ => _.data.dataId),
+        elementes.edges.filter(_ => _.data.detectPoint === 'CLIENT').map(_ => _.data.dataId),
       );
     }
   }
diff --git a/src/models/topology.js b/src/models/topology.js
index 1b34e44..4ff3e68 100644
--- a/src/models/topology.js
+++ b/src/models/topology.js
@@ -22,7 +22,7 @@ import { exec } from '../services/graphql';
 const metricQuery = `
   query TopologyMetric($duration: Duration!, $ids: [ID!]!,  $idsS: [ID!]!, $idsC: [ID!]!) {
     sla: getValues(metric: {
-      name: "service_relation_server_call_sla"
+      name: "service_sla"
       ids: $ids
     }, duration: $duration) {
       values {