You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by qi...@apache.org on 2021/03/03 08:02:43 UTC
[skywalking-rocketbot-ui] branch master updated: build: update
echarts version to 5.0.0 (#435)
This is an automated email from the ASF dual-hosted git repository.
qiuxiafan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-rocketbot-ui.git
The following commit(s) were added to refs/heads/master by this push:
new 24339b4 build: update echarts version to 5.0.0 (#435)
24339b4 is described below
commit 24339b46655e99c146cc75fe0b23bf1ba7370512
Author: Qiuxia Fan <fi...@outlook.com>
AuthorDate: Wed Mar 3 16:02:36 2021 +0800
build: update echarts version to 5.0.0 (#435)
* build: update echarts version and fix errors
* fix: heatmap pieces
* build: add echarts chunk
* fix:typo
---
package-lock.json | 32 +++++++++++++++++-----
package.json | 2 +-
src/components/rk-echarts.vue | 2 +-
.../components/dashboard/charts/chart-heatmap.vue | 9 ++++--
.../components/topology/dependency-sankey.vue | 2 +-
vue.config.js | 15 ++++++++++
6 files changed, 49 insertions(+), 13 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index a0652e0..db06e62 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -4069,11 +4069,19 @@
}
},
"echarts": {
- "version": "4.1.0",
- "resolved": "http://registry.npm.taobao.org/echarts/download/echarts-4.1.0.tgz",
- "integrity": "sha1-1YjJX3PBqZKLnHPVt2l1HDGFvNw=",
+ "version": "5.0.2",
+ "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.0.2.tgz",
+ "integrity": "sha512-En0VYpc96nw2/2AZoBWPHsGi471zMublttj50kfFpYAeR4geup0Tj9iVgEXh7QYZFPnRiruDJEjcB5PXZ+BYzQ==",
"requires": {
- "zrender": "4.0.4"
+ "tslib": "2.0.3",
+ "zrender": "5.0.4"
+ },
+ "dependencies": {
+ "tslib": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz",
+ "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ=="
+ }
}
},
"ee-first": {
@@ -11984,9 +11992,19 @@
}
},
"zrender": {
- "version": "4.0.4",
- "resolved": "http://registry.npm.taobao.org/zrender/download/zrender-4.0.4.tgz",
- "integrity": "sha1-kQ5g2IjwDJWZBz8jdY3SM0X+SP0="
+ "version": "5.0.4",
+ "resolved": "https://registry.npmjs.org/zrender/-/zrender-5.0.4.tgz",
+ "integrity": "sha512-DJpy0yrHYY5CuH6vhb9IINWbjvBUe/56J8aH86Jb7O8rRPAYZ3M2E469Qf5B3EOIfM3o3aUrO5edRQfLJ+l1Qw==",
+ "requires": {
+ "tslib": "2.0.3"
+ },
+ "dependencies": {
+ "tslib": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz",
+ "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ=="
+ }
+ }
}
}
}
diff --git a/package.json b/package.json
index 4721401..a93f159 100644
--- a/package.json
+++ b/package.json
@@ -25,7 +25,7 @@
"d3": "^5.9.1",
"d3-tip": "^0.9.1",
"dayjs": "^1.8.8",
- "echarts": "^4.1.0",
+ "echarts": "^5.0.2",
"lodash": "^4.17.15",
"noty": "^3.2.0-beta",
"popper.js": "^1.14.7",
diff --git a/src/components/rk-echarts.vue b/src/components/rk-echarts.vue
index 86061c7..a3c4507 100644
--- a/src/components/rk-echarts.vue
+++ b/src/components/rk-echarts.vue
@@ -19,7 +19,7 @@ limitations under the License. -->
<script lang="ts">
import Vue from 'vue';
import { Component, Prop, Watch } from 'vue-property-decorator';
- import echarts from 'echarts/lib/echarts';
+ import * as echarts from 'echarts/lib/echarts';
import 'echarts/lib/component/legendScroll';
import { Action } from 'vuex-class';
@Component
diff --git a/src/views/components/dashboard/charts/chart-heatmap.vue b/src/views/components/dashboard/charts/chart-heatmap.vue
index f736695..5d95b9c 100644
--- a/src/views/components/dashboard/charts/chart-heatmap.vue
+++ b/src/views/components/dashboard/charts/chart-heatmap.vue
@@ -106,8 +106,8 @@ limitations under the License. -->
{
type: 'heatmap',
data: this.data.nodes || [],
- itemStyle: {
- emphasis: {
+ emphasis: {
+ itemStyle: {
shadowBlur: 10,
shadowColor: 'rgba(0, 0, 0, 0.5)',
},
@@ -117,9 +117,12 @@ limitations under the License. -->
};
}
private generatePieces(maxValue: number, colorBox: string[], minItem: number) {
+ if (maxValue < minItem) {
+ return [];
+ }
const pieces = [];
let quotient = 1;
- let temp = {} as any;
+ let temp = {} as { min: number; max: number; color: string };
temp.max = minItem;
temp.min = minItem;
temp.color = colorBox[0];
diff --git a/src/views/components/topology/dependency-sankey.vue b/src/views/components/topology/dependency-sankey.vue
index 406242f..1c71ca4 100644
--- a/src/views/components/topology/dependency-sankey.vue
+++ b/src/views/components/topology/dependency-sankey.vue
@@ -21,7 +21,7 @@ limitations under the License. -->
import Vue from 'vue';
import { Component, Prop } from 'vue-property-decorator';
import { State, Action, Getter, Mutation } from 'vuex-class';
- import echarts from 'echarts/lib/echarts';
+ import * as echarts from 'echarts/lib/echarts';
@Component
export default class DependencySankey extends Vue {
diff --git a/vue.config.js b/vue.config.js
index 0d28e61..7fa74f0 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -16,6 +16,7 @@
*/
module.exports = {
+ productionSourceMap: process.env.NODE_ENV !== 'production',
devServer: {
proxy: {
'/graphql': {
@@ -35,4 +36,18 @@ module.exports = {
symbolId: '[name]',
});
},
+ configureWebpack: (config) => {
+ config.optimization = {
+ splitChunks: {
+ chunks: 'all',
+ cacheGroups: {
+ echarts: {
+ name: 'echarts',
+ test: /[\\/]node_modules[\\/]echarts[\\/]/,
+ priority: 2,
+ },
+ },
+ },
+ };
+ },
};