You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2019/01/24 07:00:20 UTC

[incubator-skywalking-ui] branch master updated: Optimization: Local span layer issue (#223)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 6c00408  Optimization: Local span layer issue (#223)
6c00408 is described below

commit 6c00408995a56171f0ee799c69b363bf17f8186a
Author: 于玉桔 <76...@qq.com>
AuthorDate: Thu Jan 24 15:00:16 2019 +0800

    Optimization: Local span layer issue (#223)
    
    * Local span layer Unknown => Local
    
    * Optimization judgment
    
    * Revert "Optimization judgment"
    
    This reverts commit a87dce55f3c2a569f9a4056952337ba4439d6d98.
---
 src/components/TraceTree/d3-trace.js | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/components/TraceTree/d3-trace.js b/src/components/TraceTree/d3-trace.js
index 274e1ed..f394b58 100644
--- a/src/components/TraceTree/d3-trace.js
+++ b/src/components/TraceTree/d3-trace.js
@@ -104,7 +104,7 @@ export default class TraceMap {
       .scaleLinear()
       .domain([0, this.max])
       .range([0, this.width - 10]);
-      
+
     this.xAxis = d3.axisTop(this.xScale).tickFormat(d => {
       if (d === 0) return 0;
       if (d >= 1000) return d / 1000 + 's';
@@ -189,7 +189,7 @@ export default class TraceMap {
       .attr('dx', 5)
       .attr('dy', 11)
       .text(d=> `children: ${d.data.childrenLength}`)
-      .attr('fill', '#fff') 
+      .attr('fill', '#fff')
     nodeEnter
       .append('rect')
       .attr('class', 'block')
@@ -222,7 +222,12 @@ export default class TraceMap {
       .attr('text-anchor', 'start')
       .attr('fill', d => this.type[d.data.layer])
       .attr('stroke', d => this.type[d.data.layer])
-      .text(d => d.data.layer);
+      .text(d => {
+        if(d.data.type == 'Local' && d.data.layer == 'Unknown'){
+          return 'Local';
+        }
+        return d.data.layer;
+      });
 
     nodeEnter
       .append('text')