You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2019/10/15 08:01:18 UTC

[incubator-shardingsphere-benchmark] branch master updated: feature:Optimize details

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

zhaoyanan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-shardingsphere-benchmark.git


The following commit(s) were added to refs/heads/master by this push:
     new 4a94f07  feature:Optimize details
     new c2fd2b5  Merge pull request #7 from wqzwh/master
4a94f07 is described below

commit 4a94f07b4e5dafdc659ff5b26364f495c57b8fcf
Author: wqzwh <wa...@163.com>
AuthorDate: Tue Oct 15 15:56:08 2019 +0800

    feature:Optimize details
---
 .../build/webpack.dev.conf.js                      |   4 +--
 .../build/webpack.prod.conf.js                     |   4 +--
 shadingsphere-benchmark-ui/favicon.ico             | Bin 9662 -> 0 bytes
 .../src/components/Footer/index.vue                |   2 +-
 shadingsphere-benchmark-ui/src/utils/mixin.js      |  22 +++++++++++--
 .../src/views/mysql-vs-sharding/index.vue          |  14 ++++----
 .../src/views/overview/index.vue                   |  36 +++++++++++++++++++++
 .../sharding-proxy-master-slave-sharding/index.vue |  14 ++++----
 .../views/sharding-proxy-master-slave/index.vue    |  14 ++++----
 .../index.vue                                      |  14 ++++----
 .../index.vue                                      |  14 ++++----
 .../index.vue                                      |  14 ++++----
 shadingsphere-benchmark-ui/static/.gitkeep         |   0
 .../{ => static}/favicon.png                       | Bin
 14 files changed, 103 insertions(+), 49 deletions(-)

diff --git a/shadingsphere-benchmark-ui/build/webpack.dev.conf.js b/shadingsphere-benchmark-ui/build/webpack.dev.conf.js
index 3dd767e..ba8e023 100644
--- a/shadingsphere-benchmark-ui/build/webpack.dev.conf.js
+++ b/shadingsphere-benchmark-ui/build/webpack.dev.conf.js
@@ -84,8 +84,8 @@ const devWebpackConfig = merge(baseWebpackConfig, {
       filename: 'index.html',
       template: 'index.html',
       inject: true,
-      favicon: resolve('favicon.png'),
-      title: 'sharding-ui'
+      favicon: resolve('static/favicon.png'),
+      title: 'Sharding Performance monitoring'
     }),
     // copy custom static assets
     new CopyWebpackPlugin([
diff --git a/shadingsphere-benchmark-ui/build/webpack.prod.conf.js b/shadingsphere-benchmark-ui/build/webpack.prod.conf.js
index 58b5373..f23e6a5 100644
--- a/shadingsphere-benchmark-ui/build/webpack.prod.conf.js
+++ b/shadingsphere-benchmark-ui/build/webpack.prod.conf.js
@@ -102,8 +102,8 @@ const webpackConfig = merge(baseWebpackConfig, {
       filename: config.build.index,
       template: 'index.html',
       inject: true,
-      favicon: resolve('favicon.png'),
-      title: 'sharding-ui',
+      favicon: resolve('static/favicon.png'),
+      title: 'Sharding Performance monitoring',
       minify: {
         removeComments: true,
         collapseWhitespace: true,
diff --git a/shadingsphere-benchmark-ui/favicon.ico b/shadingsphere-benchmark-ui/favicon.ico
deleted file mode 100644
index 83655b2..0000000
Binary files a/shadingsphere-benchmark-ui/favicon.ico and /dev/null differ
diff --git a/shadingsphere-benchmark-ui/src/components/Footer/index.vue b/shadingsphere-benchmark-ui/src/components/Footer/index.vue
index 0c4b903..8a9e2be 100644
--- a/shadingsphere-benchmark-ui/src/components/Footer/index.vue
+++ b/shadingsphere-benchmark-ui/src/components/Footer/index.vue
@@ -1,7 +1,7 @@
 <template>
   <div class="footer-wrapper">
     Copyright
-    <i class="icon-copyright iconfont" /> 2016 - 2018 The Apache Software Foundation, Licensed under the Apache License, Version 2.0.
+    <i class="icon-copyright iconfont" /> The Apache Software Foundation, Licensed under the Apache License, Version 2.0.
   </div>
 </template>
 <script>
diff --git a/shadingsphere-benchmark-ui/src/utils/mixin.js b/shadingsphere-benchmark-ui/src/utils/mixin.js
index 3cce6d9..f6b6356 100644
--- a/shadingsphere-benchmark-ui/src/utils/mixin.js
+++ b/shadingsphere-benchmark-ui/src/utils/mixin.js
@@ -5,7 +5,25 @@ const mountedMixin = {
       series: {},
       desc: {},
       xAxis: {},
-      loading: false
+      loading: false,
+      columns: [
+        {
+          title: 'mysql verison',
+          key: 'mysqlVerison'
+        },
+        {
+          title: 'table number',
+          key: 'tableNumber'
+        },
+        {
+          title: 'scene description',
+          key: 'sceneDescription'
+        },
+        {
+          title: 'sql example',
+          key: 'sqlExample'
+        }
+      ]
     }
   },
   methods: {
@@ -33,7 +51,7 @@ const mountedMixin = {
             legend[m].push(mm.type)
             const data = []
             for (const mmm of Object.keys(mm.data)) {
-              if (xAxis[m].length < mm.data.length) {
+              if (xAxis[m].length < mm.data.length && mmm > xAxis[m].length) {
                 xAxis[m].push(mmm)
               }
               data.push({
diff --git a/shadingsphere-benchmark-ui/src/views/mysql-vs-sharding/index.vue b/shadingsphere-benchmark-ui/src/views/mysql-vs-sharding/index.vue
index 8542708..1881c21 100644
--- a/shadingsphere-benchmark-ui/src/views/mysql-vs-sharding/index.vue
+++ b/shadingsphere-benchmark-ui/src/views/mysql-vs-sharding/index.vue
@@ -14,13 +14,13 @@
       <Card :bordered="false">
         <p slot="title" style="font-size: 18px">{{ name.toLowerCase() }}</p>
         <v-chart :options="getOptions(name)" />
-        <Form :label-width="140">
-          <FormItem
-            v-for="(value, name,indx) in desc[name]"
-            :label="`${name}:`"
-            :key="indx"
-          >{{ value }}</FormItem>
-        </Form>
+        <Table
+          :columns="columns"
+          :data="[desc[name]]"
+          size="large"
+          style="margin-top: 20px;"
+          border
+        />
       </Card>
     </Col>
     <div v-show="loading" class="spin-container">
diff --git a/shadingsphere-benchmark-ui/src/views/overview/index.vue b/shadingsphere-benchmark-ui/src/views/overview/index.vue
index 77da3b2..e5402d8 100644
--- a/shadingsphere-benchmark-ui/src/views/overview/index.vue
+++ b/shadingsphere-benchmark-ui/src/views/overview/index.vue
@@ -7,6 +7,7 @@
       <Col span="6">
         <Card class="card-item">
           <router-link to="mysql-vs-sharding">
+            <div class="card-item-left left01">01</div>
             <h3>mysql vs sharding</h3>
             <span class="card-span">detail</span>
           </router-link>
@@ -15,6 +16,7 @@
       <Col span="6">
         <Card class="card-item">
           <router-link to="sharding-proxy-master-slave">
+            <div class="card-item-left left02">02</div>
             <h3>sharding proxy master slave</h3>
             <span class="card-span">detail</span>
           </router-link>
@@ -23,6 +25,7 @@
       <Col span="6">
         <Card class="card-item">
           <router-link to="sharding-proxy-master-slave-sharding">
+            <div class="card-item-left left03">03</div>
             <h3>sharding proxy master slave sharding</h3>
             <span class="card-span">detail</span>
           </router-link>
@@ -31,6 +34,7 @@
       <Col span="6">
         <Card class="card-item">
           <router-link to="sharding-proxy-single-database-single-table">
+            <div class="card-item-left left04">04</div>
             <h3>sharding proxy single database single table</h3>
             <span class="card-span">detail</span>
           </router-link>
@@ -39,6 +43,7 @@
       <Col span="6">
         <Card class="card-item">
           <router-link to="shardingjdbc-vs-shardingproxy-encrypt">
+            <div class="card-item-left left05">05</div>
             <h3>shardingjdbc vs shardingproxy encrypt</h3>
             <span class="card-span">detail</span>
           </router-link>
@@ -47,6 +52,7 @@
       <Col span="6">
         <Card class="card-item">
           <router-link to="shardingjdbc-vs-shardingproxy-sharding-encrypt">
+            <div class="card-item-left left06">06</div>
             <h3>shardingjdbc vs shardingproxy sharding encrypt</h3>
             <span class="card-span">detail</span>
           </router-link>
@@ -78,4 +84,34 @@ h3 {
   right: 10px;
   bottom: 10px;
 }
+.card-item-left {
+  width: 50px;
+  height: 50px;
+  float: left;
+  line-height: 50px;
+  text-align: center;
+  border-radius: 50px;
+  margin-right: 10px;
+  font-size: 18px;
+  font-weight: bold;
+  color: #fff;
+}
+.left01 {
+  background: #1ba3f7;
+}
+.left02 {
+  background: #d08553;
+}
+.left03 {
+  background: #fd9927;
+}
+.left04 {
+  background: #a177ca;
+}
+.left05 {
+  background: #00b0cf;
+}
+.left06 {
+  background: #8fa6ee;
+}
 </style>
\ No newline at end of file
diff --git a/shadingsphere-benchmark-ui/src/views/sharding-proxy-master-slave-sharding/index.vue b/shadingsphere-benchmark-ui/src/views/sharding-proxy-master-slave-sharding/index.vue
index 50a9577..1ba6cf5 100644
--- a/shadingsphere-benchmark-ui/src/views/sharding-proxy-master-slave-sharding/index.vue
+++ b/shadingsphere-benchmark-ui/src/views/sharding-proxy-master-slave-sharding/index.vue
@@ -15,13 +15,13 @@
       <Card :bordered="false">
         <p slot="title" style="font-size: 18px">{{ name.toLowerCase() }}</p>
         <v-chart :options="getOptions(name)" />
-        <Form :label-width="140">
-          <FormItem
-            v-for="(value, name,indx) in desc[name]"
-            :label="`${name}:`"
-            :key="indx"
-          >{{ value }}</FormItem>
-        </Form>
+        <Table
+          :columns="columns"
+          :data="[desc[name]]"
+          size="large"
+          style="margin-top: 20px;"
+          border
+        />
       </Card>
     </Col>
     <div v-show="loading" class="spin-container">
diff --git a/shadingsphere-benchmark-ui/src/views/sharding-proxy-master-slave/index.vue b/shadingsphere-benchmark-ui/src/views/sharding-proxy-master-slave/index.vue
index f1612ca..792a55e 100644
--- a/shadingsphere-benchmark-ui/src/views/sharding-proxy-master-slave/index.vue
+++ b/shadingsphere-benchmark-ui/src/views/sharding-proxy-master-slave/index.vue
@@ -15,13 +15,13 @@
       <Card :bordered="false">
         <p slot="title" style="font-size: 18px">{{ name.toLowerCase() }}</p>
         <v-chart :options="getOptions(name)" />
-        <Form :label-width="140">
-          <FormItem
-            v-for="(value, name,indx) in desc[name]"
-            :label="`${name}:`"
-            :key="indx"
-          >{{ value }}</FormItem>
-        </Form>
+        <Table
+          :columns="columns"
+          :data="[desc[name]]"
+          size="large"
+          style="margin-top: 20px;"
+          border
+        />
       </Card>
     </Col>
     <div v-show="loading" class="spin-container">
diff --git a/shadingsphere-benchmark-ui/src/views/sharding-proxy-single-database-single-table/index.vue b/shadingsphere-benchmark-ui/src/views/sharding-proxy-single-database-single-table/index.vue
index a84118a..58412f5 100644
--- a/shadingsphere-benchmark-ui/src/views/sharding-proxy-single-database-single-table/index.vue
+++ b/shadingsphere-benchmark-ui/src/views/sharding-proxy-single-database-single-table/index.vue
@@ -15,13 +15,13 @@
       <Card :bordered="false">
         <p slot="title" style="font-size: 18px">{{ name.toLowerCase() }}</p>
         <v-chart :options="getOptions(name)" />
-        <Form :label-width="140">
-          <FormItem
-            v-for="(value, name,indx) in desc[name]"
-            :label="`${name}:`"
-            :key="indx"
-          >{{ value }}</FormItem>
-        </Form>
+        <Table
+          :columns="columns"
+          :data="[desc[name]]"
+          size="large"
+          style="margin-top: 20px;"
+          border
+        />
       </Card>
     </Col>
     <div v-show="loading" class="spin-container">
diff --git a/shadingsphere-benchmark-ui/src/views/shardingjdbc-vs-shardingproxy-encrypt/index.vue b/shadingsphere-benchmark-ui/src/views/shardingjdbc-vs-shardingproxy-encrypt/index.vue
index 8aa8286..1402e43 100644
--- a/shadingsphere-benchmark-ui/src/views/shardingjdbc-vs-shardingproxy-encrypt/index.vue
+++ b/shadingsphere-benchmark-ui/src/views/shardingjdbc-vs-shardingproxy-encrypt/index.vue
@@ -14,13 +14,13 @@
       <Card :bordered="false">
         <p slot="title" style="font-size: 18px">{{ name.toLowerCase() }}</p>
         <v-chart :options="getOptions(name)" />
-        <Form :label-width="140">
-          <FormItem
-            v-for="(value, name,indx) in desc[name]"
-            :label="`${name}:`"
-            :key="indx"
-          >{{ value }}</FormItem>
-        </Form>
+        <Table
+          :columns="columns"
+          :data="[desc[name]]"
+          size="large"
+          style="margin-top: 20px;"
+          border
+        />
       </Card>
     </Col>
     <div v-show="loading" class="spin-container">
diff --git a/shadingsphere-benchmark-ui/src/views/shardingjdbc-vs-shardingproxy-sharding-encrypt/index.vue b/shadingsphere-benchmark-ui/src/views/shardingjdbc-vs-shardingproxy-sharding-encrypt/index.vue
index 84b236b..0d3fcc8 100644
--- a/shadingsphere-benchmark-ui/src/views/shardingjdbc-vs-shardingproxy-sharding-encrypt/index.vue
+++ b/shadingsphere-benchmark-ui/src/views/shardingjdbc-vs-shardingproxy-sharding-encrypt/index.vue
@@ -14,13 +14,13 @@
       <Card :bordered="false">
         <p slot="title" style="font-size: 18px">{{ name.toLowerCase() }}</p>
         <v-chart :options="getOptions(name)" />
-        <Form :label-width="140">
-          <FormItem
-            v-for="(value, name,indx) in desc[name]"
-            :label="`${name}:`"
-            :key="indx"
-          >{{ value }}</FormItem>
-        </Form>
+        <Table
+          :columns="columns"
+          :data="[desc[name]]"
+          size="large"
+          style="margin-top: 20px;"
+          border
+        />
       </Card>
     </Col>
     <div v-show="loading" class="spin-container">
diff --git a/shadingsphere-benchmark-ui/static/.gitkeep b/shadingsphere-benchmark-ui/static/.gitkeep
deleted file mode 100644
index e69de29..0000000
diff --git a/shadingsphere-benchmark-ui/favicon.png b/shadingsphere-benchmark-ui/static/favicon.png
similarity index 100%
rename from shadingsphere-benchmark-ui/favicon.png
rename to shadingsphere-benchmark-ui/static/favicon.png