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/05/03 12:03:09 UTC

[incubator-skywalking-ui] branch master updated (200e566 -> 92698e7)

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

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


    from 200e566  Refactor Server selection on Application Page
     new 7e65631  Refactor Topology overview panel
     new 92698e7  Refactor color

The 2 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.


Summary of changes:
 mock/topology.js                       | 16 ++++++++--------
 src/components/Charts/HeatMap/index.js |  2 +-
 src/components/Topology/AppTopology.js |  9 +++++++--
 src/routes/Topology/Topology.js        | 20 +++++++++++++++++---
 4 files changed, 33 insertions(+), 14 deletions(-)

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

[incubator-skywalking-ui] 01/02: Refactor Topology overview panel

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

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

commit 7e656311954fd0f2a424406c165ed5467128dc48
Author: hanahmily <ha...@gmail.com>
AuthorDate: Thu May 3 19:44:20 2018 +0800

    Refactor Topology overview panel
---
 mock/topology.js                       | 16 ++++++++--------
 src/components/Topology/AppTopology.js |  9 +++++++--
 src/routes/Topology/Topology.js        | 20 +++++++++++++++++---
 3 files changed, 32 insertions(+), 13 deletions(-)

diff --git a/mock/topology.js b/mock/topology.js
index 57e8a09..e0b816b 100644
--- a/mock/topology.js
+++ b/mock/topology.js
@@ -67,7 +67,7 @@ export default {
                   target: 1,
                   'isAlert|1': true,
                   'callType|1': ['rpc', 'http', 'dubbo'],
-                  'callsPerSec|100-2000': 1,
+                  'cpm|100-2000': 1,
                   'avgResponseTime|500-5000': 1,
                 },
                 {
@@ -75,7 +75,7 @@ export default {
                   target: 2,
                   'isAlert|1': true,
                   'callType|1': ['rpc', 'http', 'dubbo'],
-                  'callsPerSec|100-2000': 1,
+                  'cpm|100-2000': 1,
                   'avgResponseTime|500-5000': 1,
                 },
                 {
@@ -83,7 +83,7 @@ export default {
                   target: 1,
                   'isAlert|1': true,
                   'callType|1': ['rpc', 'http', 'dubbo'],
-                  'callsPerSec|100-2000': 1,
+                  'cpm|100-2000': 1,
                   'avgResponseTime|500-5000': 1,
                 },
                 {
@@ -91,7 +91,7 @@ export default {
                   target: 200,
                   'isAlert|1': true,
                   'callType|1': ['rpc', 'http', 'dubbo'],
-                  'callsPerSec|100-2000': 1,
+                  'cpm|100-2000': 1,
                   'avgResponseTime|500-5000': 1,
                 },
                 {
@@ -99,7 +99,7 @@ export default {
                   target: 201,
                   'isAlert|1': true,
                   'callType|1': ['rpc', 'http', 'dubbo'],
-                  'callsPerSec|100-2000': 1,
+                  'cpm|100-2000': 1,
                   'avgResponseTime|500-5000': 1,
                 },
                 {
@@ -107,7 +107,7 @@ export default {
                   target: 202,
                   'isAlert|1': true,
                   'callType|1': ['rpc', 'http', 'dubbo'],
-                  'callsPerSec|100-2000': 1,
+                  'cpm|100-2000': 1,
                   'avgResponseTime|500-5000': 1,
                 },
                 {
@@ -115,7 +115,7 @@ export default {
                   target: 203,
                   'isAlert|1': true,
                   'callType|1': ['rpc', 'http', 'dubbo'],
-                  'callsPerSec|100-2000': 1,
+                  'cpm|100-2000': 1,
                   'avgResponseTime|500-5000': 1,
                 },
                 {
@@ -123,7 +123,7 @@ export default {
                   target: 204,
                   'isAlert|1': true,
                   'callType|1': ['rpc', 'http', 'dubbo'],
-                  'callsPerSec|100-2000': 1,
+                  'cpm|100-2000': 1,
                   'avgResponseTime|500-5000': 1,
                 },
               ],
diff --git a/src/components/Topology/AppTopology.js b/src/components/Topology/AppTopology.js
index 9028ccd..93e22aa 100644
--- a/src/components/Topology/AppTopology.js
+++ b/src/components/Topology/AppTopology.js
@@ -66,19 +66,24 @@ export default class AppTopology extends Base {
         height: 'data(size)',
         'text-valign': 'bottom',
         'text-halign': 'center',
-        'background-color': ele => (ele.data('isAlarm') ? '#A8071A' : '#1890FF'),
         'font-family': 'Microsoft YaHei',
         content: 'data(name)',
         'text-margin-y': 10,
-        'pie-size': ele => (ele.data('isAlarm') ? '90%' : '100%'),
+        'border-width': ele => (ele.data('isAlarm') ? 10 : 0),
+        'border-color': '#A8071A',
         'pie-1-background-color': '#2FC25B',
         'pie-1-background-size': 'data(sla)',
+        'pie-1-background-opacity': 0.8,
         'pie-2-background-color': '#F04864',
         'pie-2-background-size': '100 - data(sla)',
+        'pie-2-background-opacity': 0.8,
       })
       .selector(':selected')
       .css({
         'pie-size': '80%',
+        'background-color': ele => (ele.data('isAlarm') ? '#A8071A' : '#1890FF'),
+        'pie-1-background-opacity': 1,
+        'pie-2-background-opacity': 1,
       })
       .selector('.faded')
       .css({
diff --git a/src/routes/Topology/Topology.js b/src/routes/Topology/Topology.js
index a80f812..2c26e2b 100644
--- a/src/routes/Topology/Topology.js
+++ b/src/routes/Topology/Topology.js
@@ -100,6 +100,20 @@ export default class Topology extends PureComponent {
       appInfo.isAlarm ? <Icon type="bell" onClick={() => redirect(this.props.history, '/monitor/alarm')} /> : null,
     ];
   }
+  renderNodeType = () => {
+    const { data } = this.props.topology;
+    const typeMap = new Map();
+    data.getClusterTopology.nodes.forEach((_) => {
+      if (typeMap.has(_.type)) {
+        typeMap.set(_.type, typeMap.get(_.type) + 1);
+      } else {
+        typeMap.set(_.type, 1);
+      }
+    });
+    const result = [];
+    typeMap.forEach((v, k) => result.push(<Description term={k}>{v}</Description>));
+    return result;
+  }
   render() {
     const { data } = this.props.topology;
     const { layout = layouts['cose-bilkent'] } = data;
@@ -140,9 +154,9 @@ export default class Topology extends PureComponent {
             )
             : (
               <Card title="Overview" style={{ height: 672 }}>
-                <DescriptionList col={1} layout="vertical" >
-                  <Description term="Total Application">{data.getClusterTopology.nodes.filter(_ => _.sla).length}</Description>
-                  <Description term="Application Alarm">{data.getClusterTopology.nodes.filter(_ => _.isAlarm).length}</Description>
+                <DescriptionList layout="vertical" >
+                  <Description term="Total">{data.getClusterTopology.nodes.length}</Description>
+                  {this.renderNodeType()}
                 </DescriptionList>
               </Card>
             )}

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

[incubator-skywalking-ui] 02/02: Refactor color

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

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

commit 92698e78e06107e77f8b0166098727d58b3736cb
Author: hanahmily <ha...@gmail.com>
AuthorDate: Thu May 3 19:55:53 2018 +0800

    Refactor color
---
 src/components/Charts/HeatMap/index.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/components/Charts/HeatMap/index.js b/src/components/Charts/HeatMap/index.js
index 6eb96b4..0f24cf8 100644
--- a/src/components/Charts/HeatMap/index.js
+++ b/src/components/Charts/HeatMap/index.js
@@ -143,7 +143,7 @@ class HeatMap extends Component {
             <Geom
               type="polygon"
               position="datetime*responseTime"
-              color={['count', '#BAE7FF-#1890FF-#0050B3']}
+              color={['count', '#EBEDF0-#BAE7FF-#1890FF-#0050B3']}
               style={{ stroke: '#fff', lineWidth: 1 }}
               tooltip={['datetime*responseTime*count', (datetime, responseTime, count) => {
                 return {

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