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 c204543  Overhaul query for integration test
c204543 is described below

commit c204543e4ce25b3e8eabadc146550d7b1258b33f
Author: hanahmily <[email protected]>
AuthorDate: Sun Feb 11 11:56:53 2018 +0800

    Overhaul query for integration test
---
 src/main/frontend/mock/dashboard.js                 |  2 +-
 src/main/frontend/mock/server.js                    |  2 +-
 src/main/frontend/src/models/application.js         |  4 ++--
 src/main/frontend/src/models/dashboard.js           | 11 ++++-------
 src/main/frontend/src/routes/Dashboard/Dashboard.js |  5 +++--
 src/main/frontend/src/routes/Server/Server.js       |  3 ++-
 6 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/src/main/frontend/mock/dashboard.js 
b/src/main/frontend/mock/dashboard.js
index fe93ae2..af2bef8 100644
--- a/src/main/frontend/mock/dashboard.js
+++ b/src/main/frontend/mock/dashboard.js
@@ -19,7 +19,7 @@ export default {
             'apps|3-5': [{ 'name|1': ['Oracle', 'MySQL', 'ActiveMQ', 'Redis', 
'Memcache', 'SQLServer'], num: '@natural(1, 20)' }],
           },
           'getTopNSlowService|10': [{ 'key|+1': 1, name: '@url', 
'avgResponseTime|200-1000': 1 }],
-          'getTopNServerThroughput|10': [{ 'key|+1': 1, name: '@name', 
'tps|100-10000': 1 }],
+          'getTopNApplicationThroughput|10': [{ 'key|+1': 1, applicationCode: 
'@name', 'tps|100-10000': 1 }],
         },
       }
     ));
diff --git a/src/main/frontend/mock/server.js b/src/main/frontend/mock/server.js
index cb85394..ce620f5 100644
--- a/src/main/frontend/mock/server.js
+++ b/src/main/frontend/mock/server.js
@@ -12,7 +12,7 @@ export default {
               os: 'Mac-@name',
               host: 'WORKSAPCE-@name',
               pid: '@natural',
-              ipv4: '@ip',
+              'ipv4|1-3': ['@ip'],
             },
           ],
         },
diff --git a/src/main/frontend/src/models/application.js 
b/src/main/frontend/src/models/application.js
index c2ce69d..e57227b 100644
--- a/src/main/frontend/src/models/application.js
+++ b/src/main/frontend/src/models/application.js
@@ -11,12 +11,12 @@ const optionsQuery = `
 
 const dataQuery = `
   query Application($applicationId: ID!, $duration: Duration!) {
-    getSlowService(applicationId: $applicationId, duration: $duration, top: 
10) {
+    getSlowService(applicationId: $applicationId, duration: $duration, topN: 
10) {
       key: id
       name
       avgResponseTime
     }
-    getServerThroughput(applicationId: $applicationId, duration: $duration, 
top: 10) {
+    getServerThroughput(applicationId: $applicationId, duration: $duration, 
topN: 10) {
       key: id
       name
       tps
diff --git a/src/main/frontend/src/models/dashboard.js 
b/src/main/frontend/src/models/dashboard.js
index d501ed4..ca33a0d 100644
--- a/src/main/frontend/src/models/dashboard.js
+++ b/src/main/frontend/src/models/dashboard.js
@@ -28,9 +28,6 @@ export default generateModal({
         numOfCache
         numOfMQ
       }
-      getAlarmTrend(duration: $duration) {
-        numOfAlarmRate
-      }
       getConjecturalApps(duration: $duration) {
         apps {
           name
@@ -38,13 +35,13 @@ export default generateModal({
         }
       }
       getTopNSlowService(duration: $duration, topN: 10) {
-        id
+        key: id
         name
         avgResponseTime
       }
-      getTopNServerThroughput(duration: $duration, topN: 10) {
-        id
-        name
+      getTopNApplicationThroughput(duration: $duration, topN: 10) {
+        key: applicationId
+        applicationCode
         tps
       }
     }
diff --git a/src/main/frontend/src/routes/Dashboard/Dashboard.js 
b/src/main/frontend/src/routes/Dashboard/Dashboard.js
index 949ef4c..c624257 100644
--- a/src/main/frontend/src/routes/Dashboard/Dashboard.js
+++ b/src/main/frontend/src/routes/Dashboard/Dashboard.js
@@ -20,6 +20,7 @@ export default class Dashboard extends PureComponent {
     });
   }
   renderList = (data, title, content, unit) => {
+    let index = 0;
     return (<List
       size="small"
       itemLayout="horizontal"
@@ -31,7 +32,7 @@ export default class Dashboard extends PureComponent {
               <Avatar
                 style={{ color: '#ff3333', backgroundColor: '#ffb84d' }}
               >
-                {item.key}
+                {(() => { index += 1; return index; })()}
               </Avatar>}
             title={item[title]}
             description={`${item[content]} ${unit}`}
@@ -147,7 +148,7 @@ export default class Dashboard extends PureComponent {
               bordered={false}
               bodyStyle={{ padding: 10 }}
             >
-              {this.renderList(data.getTopNServerThroughput, 'name', 'tps', 
't/s')}
+              {this.renderList(data.getTopNApplicationThroughput, 
'applicationCode', 'tps', 't/s')}
             </Card>
           </Col>
         </Row>
diff --git a/src/main/frontend/src/routes/Server/Server.js 
b/src/main/frontend/src/routes/Server/Server.js
index f91743a..b59aea4 100644
--- a/src/main/frontend/src/routes/Server/Server.js
+++ b/src/main/frontend/src/routes/Server/Server.js
@@ -87,9 +87,10 @@ export default class Server extends PureComponent {
         >
           <Card title="Info" style={{ marginTop: 24 }} bordered={false}>
             <DescriptionList>
+              <Description term="OS">{serverInfo.label}</Description>
               <Description term="Host Name">{serverInfo.host}</Description>
               <Description term="Process Id">{serverInfo.pid}</Description>
-              <Description term="IPv4">{serverInfo.ipv4}</Description>
+              <Description term="IPv4">{serverInfo.ipv4 ? 
serverInfo.ipv4.join() : ''}</Description>
             </DescriptionList>
           </Card>
           <Row gutter={24}>

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to