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


The following commit(s) were added to refs/heads/master by this push:
     new 7f0ef25  Fix server name
7f0ef25 is described below

commit 7f0ef2547a89838ecb31e4b5a2ed622e6374da5b
Author: hanahmily <hanahm...@gmail.com>
AuthorDate: Wed May 2 09:25:43 2018 +0800

    Fix server name
---
 mock/application.js                   | 2 +-
 src/models/application.js             | 4 +++-
 src/routes/Application/Application.js | 2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/mock/application.js b/mock/application.js
index 9f68b65..fbc58e7 100644
--- a/mock/application.js
+++ b/mock/application.js
@@ -33,7 +33,7 @@ export default {
       {
         data: {
           'getSlowService|10': [{ 'key|+1': 1, name: '@name', 
'avgResponseTime|200-1000': 1 }],
-          'getServerThroughput|10': [{ 'key|+1': 1, name: '@name', 
'callsPerSec|100-10000': 1 }],
+          'getServerThroughput|10': [{ 'key|+1': 1, pid: '@natural(4, 20)', 
'ipv4|1-3': ['@ip'], host: 'WORKSAPCE-@name', 'callsPerSec|100-10000': 1 }],
           getApplicationTopology: () => {
             const application = mockjs.mock({
               nodes: [
diff --git a/src/models/application.js b/src/models/application.js
index 67a109a..a650766 100644
--- a/src/models/application.js
+++ b/src/models/application.js
@@ -36,7 +36,9 @@ const dataQuery = `
     }
     getServerThroughput(applicationId: $applicationId, duration: $duration, 
topN: 10) {
       key: id
-      osName
+      pid
+      ipv4
+      host
       callsPerSec
     }
     getApplicationTopology(applicationId: $applicationId, duration: $duration) 
{
diff --git a/src/routes/Application/Application.js 
b/src/routes/Application/Application.js
index 6bb59eb..f39ef51 100644
--- a/src/routes/Application/Application.js
+++ b/src/routes/Application/Application.js
@@ -128,7 +128,7 @@ export default class Application extends PureComponent {
                 bordered={false}
                 bodyStyle={{ padding: '0px 10px' }}
               >
-                <Ranking data={data.getServerThroughput} title="name" 
content="callsPerSec" unit="t/s" />
+                <Ranking data={data.getServerThroughput.map(_ => ({ ..._, 
name: `${_.pid}@${_.ipv4.length > 0 ? _.ipv4[0] : _.host}` }))} title="name" 
content="callsPerSec" unit="t/s" />
               </Card>
             </Col>
           </Row>

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

Reply via email to