You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@skywalking.apache.org by ha...@apache.org on 2018/03/04 13:04:11 UTC

[incubator-skywalking-ui] branch fix/bugs created (now 9a7cc04)

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

hanahmily pushed a change to branch fix/bugs
in repository https://gitbox.apache.org/repos/asf/incubator-skywalking-ui.git.


      at 9a7cc04  Remove label when data is too small

This branch includes the following new commits:

     new b68bf46  Amend server ui issues
     new 5e3991f  Amend sankey map issue
     new e2d3fc8  Fix trace tag isError display issue
     new 9a7cc04  Remove label when data is too small

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


-- 
To stop receiving notification emails like this one, please contact
hanahmily@apache.org.

[incubator-skywalking-ui] 03/04: Fix trace tag isError display issue

Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit e2d3fc8817c37cb82cdcf557c3530d143e01d3a5
Author: gaohongtao <ha...@gmail.com>
AuthorDate: Sun Mar 4 20:39:29 2018 +0800

    Fix trace tag isError display issue
---
 mock/service.js                    | 2 +-
 mock/trace.js                      | 7 +++++++
 src/components/TraceStack/index.js | 2 +-
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/mock/service.js b/mock/service.js
index 7876ad7..1d3ba58 100644
--- a/mock/service.js
+++ b/mock/service.js
@@ -69,7 +69,7 @@ export default {
               target: 1,
               'isAlert|1': true,
               'callType|1': ['rpc', 'http', 'dubbo'],
-              'callsPerSec|0-1': 1,
+              'callsPerSec|0-100': 1,
               'avgResponseTime|500-5000': 1,
             }))).concat(downNodes.nodes.map(node => (mockjs.mock({
               source: 1,
diff --git a/mock/trace.js b/mock/trace.js
index c1167c5..2881e9c 100644
--- a/mock/trace.js
+++ b/mock/trace.js
@@ -46,6 +46,7 @@ export default {
                 peer: '@ip',
                 'tags|1-5': [{ key: 'db.type', value: 'aa' }],
                 'logs|2-10': [{ 'time|+1': 1516151345000, 'data|3-8': [{ key: 'db.type', value: 'aa' }] }],
+                'isError|1': true,
               },
               {
                 spanId: 2,
@@ -59,6 +60,7 @@ export default {
                 'component|1': ['MySQL', 'H2', 'Spring'],
                 peer: '@ip',
                 'tags|1-5': [{ key: 'db.type', value: 'aa' }],
+                'isError|1': true,
               },
               {
                 spanId: 3,
@@ -72,6 +74,7 @@ export default {
                 'component|1': ['MySQL', 'H2', 'Spring'],
                 peer: '@ip',
                 'tags|1-5': [{ key: 'db.type', value: 'aa' }],
+                'isError|1': true,
               },
               {
                 spanId: 4,
@@ -85,6 +88,7 @@ export default {
                 'component|1': ['MySQL', 'H2', 'Spring'],
                 peer: '@ip',
                 'tags|1-5': [{ key: 'db.type', value: 'aa' }],
+                'isError|1': true,
               },
               {
                 spanId: 5,
@@ -98,6 +102,7 @@ export default {
                 'component|1': ['RockerMQ'],
                 peer: '@ip',
                 'tags|1-5': [{ key: 'producer', value: 'tt' }],
+                'isError|1': true,
               },
               {
                 spanId: 6,
@@ -116,6 +121,7 @@ export default {
                     parentSegmentId: 1,
                   },
                 ],
+                'isError|1': true,
               },
               {
                 spanId: 6,
@@ -138,6 +144,7 @@ export default {
                     type: 'CROSS_THREAD',
                   },
                 ],
+                'isError|1': true,
               },
             ],
           },
diff --git a/src/components/TraceStack/index.js b/src/components/TraceStack/index.js
index 1023109..677f643 100644
--- a/src/components/TraceStack/index.js
+++ b/src/components/TraceStack/index.js
@@ -255,7 +255,7 @@ class TraceStack extends PureComponent {
         },
         {
           title: 'is error',
-          content: span.isError,
+          content: `${span.isError}`,
         },
       ];
       data = base.concat(span.tags.map(t => ({ title: t.key, content: t.value })));

-- 
To stop receiving notification emails like this one, please contact
hanahmily@apache.org.

[incubator-skywalking-ui] 01/04: Amend server ui issues

Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit b68bf4670405e2a69b628ae3b0454e6686d4e7ca
Author: gaohongtao <ha...@gmail.com>
AuthorDate: Sun Mar 4 19:55:54 2018 +0800

    Amend server ui issues
---
 mock/application.js                    | 10 +++++-----
 mock/server.js                         |  8 ++++----
 mock/topology.js                       | 14 +++++++-------
 src/components/Charts/Area/index.js    |  8 +++++---
 src/components/Topology/AppTopology.js |  4 ++--
 src/routes/Server/Server.js            | 12 +++++++-----
 6 files changed, 30 insertions(+), 26 deletions(-)

diff --git a/mock/application.js b/mock/application.js
index a78d693..7def66a 100644
--- a/mock/application.js
+++ b/mock/application.js
@@ -48,7 +48,7 @@ export default {
                 {
                   source: 1,
                   target: 200,
-                  'isAlarm|1': true,
+                  'isAlert|1': true,
                   'callType|1': ['rpc', 'http', 'dubbo'],
                   'callsPerSec|100-2000': 1,
                   'avgResponseTime|500-5000': 1,
@@ -56,7 +56,7 @@ export default {
                 {
                   source: 1,
                   target: 201,
-                  'isAlarm|1': true,
+                  'isAlert|1': true,
                   'callType|1': ['rpc', 'http', 'dubbo'],
                   'callsPerSec|100-2000': 1,
                   'avgResponseTime|500-5000': 1,
@@ -64,7 +64,7 @@ export default {
                 {
                   source: 1,
                   target: 202,
-                  'isAlarm|1': true,
+                  'isAlert|1': true,
                   'callType|1': ['rpc', 'http', 'dubbo'],
                   'callsPerSec|100-2000': 1,
                   'avgResponseTime|500-5000': 1,
@@ -72,7 +72,7 @@ export default {
                 {
                   source: 1,
                   target: 203,
-                  'isAlarm|1': true,
+                  'isAlert|1': true,
                   'callType|1': ['rpc', 'http', 'dubbo'],
                   'callsPerSec|100-2000': 1,
                   'avgResponseTime|500-5000': 1,
@@ -80,7 +80,7 @@ export default {
                 {
                   source: 1,
                   target: 204,
-                  'isAlarm|1': true,
+                  'isAlert|1': true,
                   'callType|1': ['rpc', 'http', 'dubbo'],
                   'callsPerSec|100-2000': 1,
                   'avgResponseTime|500-5000': 1,
diff --git a/mock/server.js b/mock/server.js
index 6078ac5..cbc8020 100644
--- a/mock/server.js
+++ b/mock/server.js
@@ -33,10 +33,10 @@ export default {
             'cost|60': ['@natural(0, 99)'],
           },
           getMemoryTrend: {
-            'heap|61': ['@natural(500, 900)'],
-            'maxHeap|61': [1000],
-            'noheap|61': ['@natural(100, 200)'],
-            'maxNoheap|61': [300],
+            'heap|61': ['@natural(177184375, 277184375)'],
+            'maxHeap|61': [377184375],
+            'noheap|61': ['@natural(58260667, 68260667)'],
+            'maxNoheap|61': [68260667],
           },
           getGCTrend: {
             'youngGC|60': ['@natural(200, 300)'],
diff --git a/mock/topology.js b/mock/topology.js
index bb5061f..4394a4f 100644
--- a/mock/topology.js
+++ b/mock/topology.js
@@ -47,7 +47,7 @@ export default {
                 {
                   source: 100,
                   target: 1,
-                  'isAlarm|1': true,
+                  'isAlert|1': true,
                   'callType|1': ['rpc', 'http', 'dubbo'],
                   'callsPerSec|100-2000': 1,
                   'avgResponseTime|500-5000': 1,
@@ -55,7 +55,7 @@ export default {
                 {
                   source: 1,
                   target: 2,
-                  'isAlarm|1': true,
+                  'isAlert|1': true,
                   'callType|1': ['rpc', 'http', 'dubbo'],
                   'callsPerSec|100-2000': 1,
                   'avgResponseTime|500-5000': 1,
@@ -63,7 +63,7 @@ export default {
                 {
                   source: 1,
                   target: 200,
-                  'isAlarm|1': true,
+                  'isAlert|1': true,
                   'callType|1': ['rpc', 'http', 'dubbo'],
                   'callsPerSec|100-2000': 1,
                   'avgResponseTime|500-5000': 1,
@@ -71,7 +71,7 @@ export default {
                 {
                   source: 1,
                   target: 201,
-                  'isAlarm|1': true,
+                  'isAlert|1': true,
                   'callType|1': ['rpc', 'http', 'dubbo'],
                   'callsPerSec|100-2000': 1,
                   'avgResponseTime|500-5000': 1,
@@ -79,7 +79,7 @@ export default {
                 {
                   source: 2,
                   target: 202,
-                  'isAlarm|1': true,
+                  'isAlert|1': true,
                   'callType|1': ['rpc', 'http', 'dubbo'],
                   'callsPerSec|100-2000': 1,
                   'avgResponseTime|500-5000': 1,
@@ -87,7 +87,7 @@ export default {
                 {
                   source: 2,
                   target: 203,
-                  'isAlarm|1': true,
+                  'isAlert|1': true,
                   'callType|1': ['rpc', 'http', 'dubbo'],
                   'callsPerSec|100-2000': 1,
                   'avgResponseTime|500-5000': 1,
@@ -95,7 +95,7 @@ export default {
                 {
                   source: 2,
                   target: 204,
-                  'isAlarm|1': true,
+                  'isAlert|1': true,
                   'callType|1': ['rpc', 'http', 'dubbo'],
                   'callsPerSec|100-2000': 1,
                   'avgResponseTime|500-5000': 1,
diff --git a/src/components/Charts/Area/index.js b/src/components/Charts/Area/index.js
index 6725e08..8fc6334 100644
--- a/src/components/Charts/Area/index.js
+++ b/src/components/Charts/Area/index.js
@@ -84,10 +84,10 @@ class Area extends Component {
         min: 0,
       },
     };
-
     const offset = Math.floor(data.length / 2);
     const xData = data.slice(0, offset);
-    const yData = data.slice(offset).map((v, i) => ({ ...v, y: v.y - xData[i].y }));
+    const yData = data.slice(offset).map((v, i) => ({ ...v,
+      y: ((v.y - xData[i].y) > 0 ? parseFloat(((v.y - xData[i].y).toFixed(2))) : 0) }));
     return (
       <div className={styles.chart} style={{ height }} ref={this.handleRoot}>
         <div ref={this.handleRef}>
@@ -106,7 +106,9 @@ class Area extends Component {
               tickLine={autoHideXLabels ? false : {}}
             />
             <Axis name="y" min={0} />
-            <Tooltip crosshairs={{ type: 'line' }} />
+            <Tooltip
+              crosshairs={{ type: 'line' }}
+            />
             <Geom type="areaStack" position="x*y" color={['type', [color, limitColor]]} />
             <Geom type="lineStack" position="x*y" size={2} color={['type', [color, limitColor]]} />
           </Chart>
diff --git a/src/components/Topology/AppTopology.js b/src/components/Topology/AppTopology.js
index 53b6ace..ff4c3b1 100644
--- a/src/components/Topology/AppTopology.js
+++ b/src/components/Topology/AppTopology.js
@@ -42,8 +42,8 @@ export default class AppTopology extends Base {
           'curve-style': 'bezier',
           'control-point-step-size': 100,
           'target-arrow-shape': 'triangle',
-          'target-arrow-color': ele => (ele.data('isAlarm') ? 'rgb(204, 0, 51)' : 'rgb(147, 198, 174)'),
-          'line-color': ele => (ele.data('isAlarm') ? 'rgb(204, 0, 51)' : 'rgb(147, 198, 174)'),
+          'target-arrow-color': ele => (ele.data('isAlert') ? 'rgb(204, 0, 51)' : 'rgb(147, 198, 174)'),
+          'line-color': ele => (ele.data('isAlert') ? 'rgb(204, 0, 51)' : 'rgb(147, 198, 174)'),
           width: 2,
           label: ele => `${ele.data('callType')} \n ${ele.data('callsPerSec')} tps / ${ele.data('avgResponseTime')} ms`,
           'text-wrap': 'wrap',
diff --git a/src/routes/Server/Server.js b/src/routes/Server/Server.js
index 59f67bc..0b7ace9 100644
--- a/src/routes/Server/Server.js
+++ b/src/routes/Server/Server.js
@@ -49,6 +49,7 @@ export default class Server extends PureComponent {
   }
   avg = list => (list.length > 0 ?
     (list.reduce((acc, curr) => acc + curr) / list.length).toFixed(2) : 0)
+  bytesToMB = list => list.map(_ => parseFloat((_ / (1024 ** 2)).toFixed(2)))
   render() {
     const { form, duration, server } = this.props;
     const { getFieldDecorator } = form;
@@ -73,10 +74,11 @@ export default class Server extends PureComponent {
                       host
                       pid
                       ipv4
+                      applicationCode
                     }
                   }
                 `}
-                transform={r => ({ ...r, label: `${r.pid}@${r.host}` })}
+                transform={r => ({ ...r, label: `${r.pid}@${r.applicationCode}` })}
               />
             )}
           </FormItem>
@@ -142,8 +144,8 @@ export default class Server extends PureComponent {
                 contentHeight={150}
               >
                 <Area
-                  data={axis(duration, getMemoryTrend.heap, ({ x, y }) => ({ x, y, type: 'value' }))
-                    .concat(axis(duration, getMemoryTrend.maxHeap, ({ x, y }) => ({ x, y, type: 'free' })))}
+                  data={axis(duration, this.bytesToMB(getMemoryTrend.heap), ({ x, y }) => ({ x, y, type: 'value' }))
+                    .concat(axis(duration, this.bytesToMB(getMemoryTrend.maxHeap), ({ x, y }) => ({ x, y, type: 'free' })))}
                 />
               </ChartCard>
             </Col>
@@ -153,8 +155,8 @@ export default class Server extends PureComponent {
                 contentHeight={150}
               >
                 <Area
-                  data={axis(duration, getMemoryTrend.noheap, ({ x, y }) => ({ x, y, type: 'value' }))
-                  .concat(axis(duration, getMemoryTrend.maxNoheap, ({ x, y }) => ({ x, y, type: 'free' })))}
+                  data={axis(duration, this.bytesToMB(getMemoryTrend.noheap), ({ x, y }) => ({ x, y, type: 'value' }))
+                  .concat(axis(duration, this.bytesToMB(getMemoryTrend.maxNoheap), ({ x, y }) => ({ x, y, type: 'free' })))}
                 />
               </ChartCard>
             </Col>

-- 
To stop receiving notification emails like this one, please contact
hanahmily@apache.org.

[incubator-skywalking-ui] 02/04: Amend sankey map issue

Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 5e3991ff31a7f887b2a190b301d7f024266ceb98
Author: gaohongtao <ha...@gmail.com>
AuthorDate: Sun Mar 4 20:30:35 2018 +0800

    Amend sankey map issue
---
 mock/service.js               | 2 +-
 src/routes/Server/Server.js   | 2 +-
 src/routes/Service/Service.js | 6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/mock/service.js b/mock/service.js
index f2eefc9..7876ad7 100644
--- a/mock/service.js
+++ b/mock/service.js
@@ -69,7 +69,7 @@ export default {
               target: 1,
               'isAlert|1': true,
               'callType|1': ['rpc', 'http', 'dubbo'],
-              'callsPerSec|0-2000': 1,
+              'callsPerSec|0-1': 1,
               'avgResponseTime|500-5000': 1,
             }))).concat(downNodes.nodes.map(node => (mockjs.mock({
               source: 1,
diff --git a/src/routes/Server/Server.js b/src/routes/Server/Server.js
index 0b7ace9..7ff19cd 100644
--- a/src/routes/Server/Server.js
+++ b/src/routes/Server/Server.js
@@ -48,7 +48,7 @@ export default class Server extends PureComponent {
     });
   }
   avg = list => (list.length > 0 ?
-    (list.reduce((acc, curr) => acc + curr) / list.length).toFixed(2) : 0)
+    parseFloat((list.reduce((acc, curr) => acc + curr) / list.length).toFixed(2)) : 0)
   bytesToMB = list => list.map(_ => parseFloat((_ / (1024 ** 2)).toFixed(2)))
   render() {
     const { form, duration, server } = this.props;
diff --git a/src/routes/Service/Service.js b/src/routes/Service/Service.js
index ac0a3aa..a13ed60 100644
--- a/src/routes/Service/Service.js
+++ b/src/routes/Service/Service.js
@@ -57,8 +57,8 @@ export default class Service extends PureComponent {
     });
     const nData = {
       nodes: data.nodes,
-      edges: data.calls.filter(_ => _.callsPerSec * _.avgResponseTime > 0).map(_ =>
-        ({ ..._, value: _.callsPerSec * _.avgResponseTime, source: nodesMap.get(`${_.source}`), target: nodesMap.get(`${_.target}`) })),
+      edges: data.calls.map(_ =>
+        ({ ..._, value: (_.callsPerSec < 1 ? 1000 : _.callsPerSec * _.avgResponseTime), source: nodesMap.get(`${_.source}`), target: nodesMap.get(`${_.target}`) })),
     };
     return (
       <Row gutter={24}>
@@ -72,7 +72,7 @@ export default class Service extends PureComponent {
               edgeTooltip={['target*source*callsPerSec*avgResponseTime*isAlert', (target, source, callsPerSec, avgResponseTime) => {
                 return {
                   name: `${source.name} to ${target.name} </span>`,
-                  value: `${callsPerSec} calls/s ${avgResponseTime}ms`,
+                  value: `${callsPerSec < 1 ? '<1' : callsPerSec} calls/s ${avgResponseTime}ms`,
                 };
               }]}
               edgeColor={['isAlert', isAlert => (isAlert ? '#DC143C' : '#bbb')]}

-- 
To stop receiving notification emails like this one, please contact
hanahmily@apache.org.

[incubator-skywalking-ui] 04/04: Remove label when data is too small

Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 9a7cc049d4c75e086c2ba2e36580cebbf7d9684f
Author: gaohongtao <ha...@gmail.com>
AuthorDate: Sun Mar 4 21:02:58 2018 +0800

    Remove label when data is too small
---
 src/components/Charts/Sankey/index.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/components/Charts/Sankey/index.js b/src/components/Charts/Sankey/index.js
index 828ad62..efb52e1 100644
--- a/src/components/Charts/Sankey/index.js
+++ b/src/components/Charts/Sankey/index.js
@@ -49,7 +49,7 @@ class Sankey extends Component {
         sync: true,
       },
     };
-    console.log(dv);
+    const ignoreNodes = dv.nodes.filter(_ => (_.y1 - _.y0) < 0.1).map(_ => _.name);
     return (
       <div className={styles.chart} style={{ height }} ref={this.handleRoot}>
         <div ref={this.handleRef}>
@@ -87,6 +87,9 @@ class Sankey extends Component {
                   }}
                   offset={0}
                   formatter={(val) => {
+                      if (ignoreNodes.findIndex(_ => _ === val) > -1) {
+                        return '';
+                      }
                       return `  ${val}`;
                     }
                   }

-- 
To stop receiving notification emails like this one, please contact
hanahmily@apache.org.