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/12/12 09:52:00 UTC
[incubator-shardingsphere-benchmark] branch master updated: feature[shadingsphere-benchmark-ui]: support for ‘\n’ #32
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 d8cebdb feature[shadingsphere-benchmark-ui]: support for ‘\n’ #32
new 36a2405 Merge pull request #33 from wqzwh/master
d8cebdb is described below
commit d8cebdb9fc6389da4cf2f6b70a38e2c7bd65cb9c
Author: wqzwh <wa...@163.com>
AuthorDate: Thu Dec 12 17:45:41 2019 +0800
feature[shadingsphere-benchmark-ui]: support for ‘\n’ #32
---
shadingsphere-benchmark-ui/.prettierrc | 4 +++
shadingsphere-benchmark-ui/src/App.vue | 32 ++++++++---------
.../src/components/Container/index.vue | 36 ++++++++++---------
.../src/components/Footer/index.vue | 32 ++++++++---------
shadingsphere-benchmark-ui/src/utils/line.js | 1 +
shadingsphere-benchmark-ui/src/utils/mixin.js | 26 +++++++++++---
.../src/views/overview/index.vue | 32 ++++++++---------
.../src/views/overview_detail/index.vue | 40 ++++++++++++----------
8 files changed, 115 insertions(+), 88 deletions(-)
diff --git a/shadingsphere-benchmark-ui/.prettierrc b/shadingsphere-benchmark-ui/.prettierrc
new file mode 100644
index 0000000..fd496a8
--- /dev/null
+++ b/shadingsphere-benchmark-ui/.prettierrc
@@ -0,0 +1,4 @@
+{
+ "singleQuote": true,
+ "semi": false
+}
diff --git a/shadingsphere-benchmark-ui/src/App.vue b/shadingsphere-benchmark-ui/src/App.vue
index 8effef7..980804d 100644
--- a/shadingsphere-benchmark-ui/src/App.vue
+++ b/shadingsphere-benchmark-ui/src/App.vue
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+<!--
+ - Licensed to the Apache Software Foundation (ASF) under one or more
+ - contributor license agreements. See the NOTICE file distributed with
+ - this work for additional information regarding copyright ownership.
+ - The ASF licenses this file to You under the Apache License, Version 2.0
+ - (the "License"); you may not use this file except in compliance with
+ - the License. You may obtain a copy of the License at
+ -
+ - http://www.apache.org/licenses/LICENSE-2.0
+ -
+ - Unless required by applicable law or agreed to in writing, software
+ - distributed under the License is distributed on an "AS IS" BASIS,
+ - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ - See the License for the specific language governing permissions and
+ - limitations under the License.
+ -->
<template>
<div id="app">
<Container>
diff --git a/shadingsphere-benchmark-ui/src/components/Container/index.vue b/shadingsphere-benchmark-ui/src/components/Container/index.vue
index 6552560..ccc3657 100644
--- a/shadingsphere-benchmark-ui/src/components/Container/index.vue
+++ b/shadingsphere-benchmark-ui/src/components/Container/index.vue
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+<!--
+ - Licensed to the Apache Software Foundation (ASF) under one or more
+ - contributor license agreements. See the NOTICE file distributed with
+ - this work for additional information regarding copyright ownership.
+ - The ASF licenses this file to You under the Apache License, Version 2.0
+ - (the "License"); you may not use this file except in compliance with
+ - the License. You may obtain a copy of the License at
+ -
+ - http://www.apache.org/licenses/LICENSE-2.0
+ -
+ - Unless required by applicable law or agreed to in writing, software
+ - distributed under the License is distributed on an "AS IS" BASIS,
+ - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ - See the License for the specific language governing permissions and
+ - limitations under the License.
+ -->
<template>
<div class="layout">
<Layout>
@@ -67,7 +67,9 @@ export default {
if (to.path === '/overview') {
this.breadcrumbName = ''
} else {
- const res = this.$store.state.global.fileData[to.path.split(`/overview_detail/`)[1]]
+ const res = this.$store.state.global.fileData[
+ to.path.split(`/overview_detail/`)[1]
+ ]
if (res) {
this.breadcrumbName = res.split('-').join(' ')
}
diff --git a/shadingsphere-benchmark-ui/src/components/Footer/index.vue b/shadingsphere-benchmark-ui/src/components/Footer/index.vue
index 7718bb2..631f4a2 100644
--- a/shadingsphere-benchmark-ui/src/components/Footer/index.vue
+++ b/shadingsphere-benchmark-ui/src/components/Footer/index.vue
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+<!--
+ - Licensed to the Apache Software Foundation (ASF) under one or more
+ - contributor license agreements. See the NOTICE file distributed with
+ - this work for additional information regarding copyright ownership.
+ - The ASF licenses this file to You under the Apache License, Version 2.0
+ - (the "License"); you may not use this file except in compliance with
+ - the License. You may obtain a copy of the License at
+ -
+ - http://www.apache.org/licenses/LICENSE-2.0
+ -
+ - Unless required by applicable law or agreed to in writing, software
+ - distributed under the License is distributed on an "AS IS" BASIS,
+ - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ - See the License for the specific language governing permissions and
+ - limitations under the License.
+ -->
<template>
<div class="footer-wrapper">
Copyright © The Apache Software Foundation, Licensed under the Apache License, Version 2.0.
diff --git a/shadingsphere-benchmark-ui/src/utils/line.js b/shadingsphere-benchmark-ui/src/utils/line.js
index 6166a08..e6c5e93 100644
--- a/shadingsphere-benchmark-ui/src/utils/line.js
+++ b/shadingsphere-benchmark-ui/src/utils/line.js
@@ -65,6 +65,7 @@ const getLineOptions = (name, xAxis, legend, series) => {
name: 'Construction times',
nameLocation: 'middle',
type: 'category',
+ nameGap: 20,
boundaryGap: false,
data: _xAxis
},
diff --git a/shadingsphere-benchmark-ui/src/utils/mixin.js b/shadingsphere-benchmark-ui/src/utils/mixin.js
index 0585e5e..05ffeaa 100644
--- a/shadingsphere-benchmark-ui/src/utils/mixin.js
+++ b/shadingsphere-benchmark-ui/src/utils/mixin.js
@@ -30,16 +30,32 @@ const mountedMixin = {
key: 'mysqlVerison'
},
{
- title: 'table number',
- key: 'tableNumber'
+ title: 'table description',
+ key: 'tableDescription'
},
{
title: 'scene description',
- key: 'sceneDescription'
+ key: 'sceneDescription',
+ render: (h, params) => {
+ const rows = params.row.sceneDescription.split('\n')
+ const html = []
+ for (const v of rows) {
+ html.push(h('div', v))
+ }
+ return h('div', html)
+ }
},
{
title: 'sql example',
- key: 'sqlExample'
+ key: 'sqlExample',
+ render: (h, params) => {
+ const rows = params.row.sqlExample.split('\n')
+ const html = []
+ for (const v of rows) {
+ html.push(h('div', v))
+ }
+ return h('div', html)
+ }
}
]
}
@@ -103,7 +119,7 @@ const mountedMixin = {
if (k !== m) {
desc[k] = {
mysqlVerison: sourceData[m]['mysqlVerison'],
- tableNumber: sourceData[m]['tableNumber'],
+ tableDescription: sourceData[m]['tableDescription'],
sceneDescription: sourceData[m]['sceneDescription'],
sqlExample: sourceData[m][k].SqlExample
}
diff --git a/shadingsphere-benchmark-ui/src/views/overview/index.vue b/shadingsphere-benchmark-ui/src/views/overview/index.vue
index f09ab48..9153354 100644
--- a/shadingsphere-benchmark-ui/src/views/overview/index.vue
+++ b/shadingsphere-benchmark-ui/src/views/overview/index.vue
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+<!--
+ - Licensed to the Apache Software Foundation (ASF) under one or more
+ - contributor license agreements. See the NOTICE file distributed with
+ - this work for additional information regarding copyright ownership.
+ - The ASF licenses this file to You under the Apache License, Version 2.0
+ - (the "License"); you may not use this file except in compliance with
+ - the License. You may obtain a copy of the License at
+ -
+ - http://www.apache.org/licenses/LICENSE-2.0
+ -
+ - Unless required by applicable law or agreed to in writing, software
+ - distributed under the License is distributed on an "AS IS" BASIS,
+ - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ - See the License for the specific language governing permissions and
+ - limitations under the License.
+ -->
<template>
<Card class="card-wrap">
<p slot="title">
diff --git a/shadingsphere-benchmark-ui/src/views/overview_detail/index.vue b/shadingsphere-benchmark-ui/src/views/overview_detail/index.vue
index f1cbe35..d9e8de9 100644
--- a/shadingsphere-benchmark-ui/src/views/overview_detail/index.vue
+++ b/shadingsphere-benchmark-ui/src/views/overview_detail/index.vue
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+<!--
+ - Licensed to the Apache Software Foundation (ASF) under one or more
+ - contributor license agreements. See the NOTICE file distributed with
+ - this work for additional information regarding copyright ownership.
+ - The ASF licenses this file to You under the Apache License, Version 2.0
+ - (the "License"); you may not use this file except in compliance with
+ - the License. You may obtain a copy of the License at
+ -
+ - http://www.apache.org/licenses/LICENSE-2.0
+ -
+ - Unless required by applicable law or agreed to in writing, software
+ - distributed under the License is distributed on an "AS IS" BASIS,
+ - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ - See the License for the specific language governing permissions and
+ - limitations under the License.
+ -->
<template>
<Row :gutter="16" style="background:#eee; padding:20px">
<Col
@@ -73,7 +73,9 @@ export default {
'$store.state.global.fileData': {
handler(val) {
this.loading = true
- const fileName = this.$store.state.global.fileData[location.hash.split(`#/overview_detail/`)[1]]
+ const fileName = this.$store.state.global.fileData[
+ location.hash.split(`#/overview_detail/`)[1]
+ ]
apis.getOverviewDetail(fileName).then(res => {
this.formatData(res)
this.loading = false
@@ -85,7 +87,9 @@ export default {
mounted() {
if (!this.$store.state.global.fileData.length) return
this.loading = true
- const fileName = this.$store.state.global.fileData[location.hash.split(`#/overview_detail/`)[1]]
+ const fileName = this.$store.state.global.fileData[
+ location.hash.split(`#/overview_detail/`)[1]
+ ]
apis.getOverviewDetail(fileName).then(res => {
this.formatData(res)
this.loading = false