From 25077fbcc996626425f674e17aed6c88589d0f81 Mon Sep 17 00:00:00 2001 From: chenjinsong <523037378@qq.com> Date: Mon, 23 Aug 2021 15:46:35 +0800 Subject: [PATCH] =?UTF-8?q?CN-108=20feat:=20=E5=B0=86serverIP=E5=92=8Cclie?= =?UTF-8?q?ntIP=E7=9A=84=E5=AE=9E=E4=BD=93=E8=AF=A6=E6=83=85=E9=A1=B5?= =?UTF-8?q?=E7=9A=84panelTyle=E5=8C=BA=E5=88=86=E5=BC=80=E6=9D=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/webpack.config.js | 21 +++++++++++++++++---- src/utils/constants.js | 5 +++-- src/views/charts/Panel.vue | 3 ++- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/build/webpack.config.js b/build/webpack.config.js index 451c22a4..98e7c72b 100644 --- a/build/webpack.config.js +++ b/build/webpack.config.js @@ -1,6 +1,7 @@ /* eslint-disable @typescript-eslint/no-var-requires */ const path = require('path') const webpack = require('webpack') +const UglifyJsPlugin = require('uglifyjs-webpack-plugin') const { VueLoaderPlugin } = require('vue-loader') // const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin @@ -15,10 +16,6 @@ const externals = [ } } ] -const plugins = [ - new VueLoaderPlugin() - // new BundleAnalyzerPlugin(), -] const entry = path.resolve(__dirname, '../packages/element-plus/index.ts') @@ -67,4 +64,20 @@ const config = { plugins } +const plugins = [ + new VueLoaderPlugin(), + new UglifyJsPlugin({ + uglifyOptions: { + compress: { + warnings: false, + drop_console: true + } + }, + exclude: /manifest.+js/, + sourceMap: config.build.productionSourceMap, + parallel: true + }) + // new BundleAnalyzerPlugin(), +] + module.exports = config diff --git a/src/utils/constants.js b/src/utils/constants.js index 59944d32..1692dce0 100644 --- a/src/utils/constants.js +++ b/src/utils/constants.js @@ -37,9 +37,10 @@ export const panelTypeAndRouteMapping = { trafficSummary: 1, networkAppPerformance: 2, dnsServiceInsights: 3, - ipEntityDetail: 4, + clientIpEntityDetail: 4, domainEntityDetail: 5, - appEntityDetail: 6 + appEntityDetail: 6, + serverIpEntityDetail: 7 } export const position = { diff --git a/src/views/charts/Panel.vue b/src/views/charts/Panel.vue index 08c30616..6514dd17 100644 --- a/src/views/charts/Panel.vue +++ b/src/views/charts/Panel.vue @@ -69,7 +69,8 @@ export default { tabTitle () { let title switch (this.typeName) { - case 'ipEntityDetail': { + case 'clientIpEntityDetail': + case 'serverIpEntityDetail': { title = this.$t('entities.ipDetail') break }