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

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


The following commit(s) were added to refs/heads/feature/5.0.0 by this push:
     new f25410e  Add application topology
f25410e is described below

commit f25410ea87bac72223fb13a1ac79402cfd1f19a3
Author: hanahmily <hanahm...@gmail.com>
AuthorDate: Fri Jan 19 16:32:36 2018 +0800

    Add application topology
---
 src/main/frontend/mock/application.js              | 76 ++++++++++++++++++++++
 src/main/frontend/src/models/application.js        |  4 ++
 .../frontend/src/routes/Application/Application.js |  5 +-
 3 files changed, 82 insertions(+), 3 deletions(-)

diff --git a/src/main/frontend/mock/application.js 
b/src/main/frontend/mock/application.js
index fdb8826..7e1423f 100644
--- a/src/main/frontend/mock/application.js
+++ b/src/main/frontend/mock/application.js
@@ -7,6 +7,82 @@ export default {
         data: {
           'getSlowService|10': [{ 'key|+1': 1, name: '@name', 
'avgResponseTime|200-1000': 1 }],
           'getServerThroughput|10': [{ 'key|+1': 1, name: '@name', 
'tps|100-10000': 1 }],
+          getApplicationTopology: () => {
+            const application = mockjs.mock({
+              nodes: [
+                {
+                  id: 1,
+                  name: '@name',
+                  'type|1': ['DUBBO', 'tomcat', 'SPRINGMVC'],
+                  'calls|1000-2000': 1,
+                  'sla|1-100.1-2': 1,
+                  'apdex|0.2': 1,
+                  'numOfServer|1-100': 1,
+                  'numOfServerAlarm|1-100': 1,
+                  'numOfServiceAlarm|1-100': 1,
+                  'isIncomingNode|1': true,
+                },
+              ],
+            });
+            const resources = mockjs.mock({
+              'nodes|5': [
+                {
+                  'id|+1': 200,
+                  name: '@name',
+                  'type|1': ['Oracle', 'MYSQL', 'REDIS'],
+                },
+              ],
+            });
+            const nodes = application.nodes.concat(resources.nodes);
+            const userConnectApplication = mockjs.mock({
+              calls: [
+                {
+                  source: 1,
+                  target: 200,
+                  'isAlarm|1': true,
+                  'callType|1': ['rpc', 'http', 'dubbo'],
+                  'callsPerSec|100-2000': 1,
+                  'responseTimePerSec|500-5000': 1,
+                },
+                {
+                  source: 1,
+                  target: 201,
+                  'isAlarm|1': true,
+                  'callType|1': ['rpc', 'http', 'dubbo'],
+                  'callsPerSec|100-2000': 1,
+                  'responseTimePerSec|500-5000': 1,
+                },
+                {
+                  source: 1,
+                  target: 202,
+                  'isAlarm|1': true,
+                  'callType|1': ['rpc', 'http', 'dubbo'],
+                  'callsPerSec|100-2000': 1,
+                  'responseTimePerSec|500-5000': 1,
+                },
+                {
+                  source: 1,
+                  target: 203,
+                  'isAlarm|1': true,
+                  'callType|1': ['rpc', 'http', 'dubbo'],
+                  'callsPerSec|100-2000': 1,
+                  'responseTimePerSec|500-5000': 1,
+                },
+                {
+                  source: 1,
+                  target: 204,
+                  'isAlarm|1': true,
+                  'callType|1': ['rpc', 'http', 'dubbo'],
+                  'callsPerSec|100-2000': 1,
+                  'responseTimePerSec|500-5000': 1,
+                },
+              ],
+            });
+            return {
+              nodes,
+              calls: userConnectApplication.calls,
+            };
+          },
         },
       }
     ));
diff --git a/src/main/frontend/src/models/application.js 
b/src/main/frontend/src/models/application.js
index d537e4a..95f3037 100644
--- a/src/main/frontend/src/models/application.js
+++ b/src/main/frontend/src/models/application.js
@@ -6,6 +6,10 @@ export default {
     getAllApplication: [],
     getSlowService: [],
     getServerThroughput: [],
+    getApplicationTopology: {
+      nodes: [],
+      calls: [],
+    },
   },
   effects: {
     *fetch({ payload }, { call, put }) {
diff --git a/src/main/frontend/src/routes/Application/Application.js 
b/src/main/frontend/src/routes/Application/Application.js
index 2beb24b..1b6f5aa 100644
--- a/src/main/frontend/src/routes/Application/Application.js
+++ b/src/main/frontend/src/routes/Application/Application.js
@@ -1,6 +1,7 @@
 import React, { Component } from 'react';
 import { connect } from 'dva';
 import { Row, Col, Select, Card, Table } from 'antd';
+import { AppTopology } from '../../components/Topology';
 
 const { Option } = Select;
 
@@ -70,9 +71,7 @@ export default class Application extends Component {
           bordered={false}
           bodyStyle={{ padding: 0, marginTop: 24 }}
         >
-          <div style={{ height: 400 }}>
-              Application and externel resources(Db, Cache or MQ) Topoloy
-          </div>
+          <AppTopology 
elements={this.props.application.getApplicationTopology} />
         </Card>
         <Row gutter={24}>
           <Col {...middleColResponsiveProps}>

-- 
To stop receiving notification emails like this one, please contact
['"commits@skywalking.apache.org" <commits@skywalking.apache.org>'].

Reply via email to