diff --git a/nezha-fronted/.babelrc b/nezha-fronted/.babelrc index 3a280ba34..01be98850 100644 --- a/nezha-fronted/.babelrc +++ b/nezha-fronted/.babelrc @@ -8,5 +8,32 @@ }], "stage-2" ], - "plugins": ["transform-vue-jsx", "transform-runtime"] + "plugins": ["transform-vue-jsx", "transform-runtime"], + "env": { + "utils": { + "presets": [ + [ + "env", + { + "loose": true, + "modules": "commonjs", + "targets": { + "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] + } + } + ], + ], + "plugins": [ + ["module-resolver", { + "root": ["element-ui"], + "alias": { + "element-ui/src": "element-ui/lib" + } + }] + ] + }, + "test": { + "plugins": ["istanbul"] + } + } } diff --git a/nezha-fronted/build/webpack.base.conf.js b/nezha-fronted/build/webpack.base.conf.js index a07e68360..88adc5d03 100644 --- a/nezha-fronted/build/webpack.base.conf.js +++ b/nezha-fronted/build/webpack.base.conf.js @@ -8,8 +8,6 @@ function resolve (dir) { return path.join(__dirname, '..', dir) } - - module.exports = { context: path.resolve(__dirname, '../'), entry: { @@ -25,8 +23,8 @@ module.exports = { resolve: { extensions: ['.js', '.vue', '.json'], alias: { - 'vue$': 'vue/dist/vue.esm.js', - '@': resolve('src'), + vue$: 'vue/dist/vue.esm.js', + '@': resolve('src') } }, module: { @@ -37,9 +35,22 @@ module.exports = { options: vueLoaderConfig }, { - test: /\.js$/, + test: /\.(js)$/, loader: 'babel-loader', - include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')] + include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client'), resolve('node_modules/element-ui/packages/scrollbar')], + exclude: '/node_modules/', + options: { + presets: [ + ['env', { + modules: false, + targets: { + browsers: ['> 1%', 'last 2 versions', 'not ie <= 8'] + } + }], + 'stage-2' + ], + plugins: ['transform-vue-jsx', 'transform-runtime'] + } }, { test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, diff --git a/nezha-fronted/package.json b/nezha-fronted/package.json index 562ee896a..9073baa7a 100644 --- a/nezha-fronted/package.json +++ b/nezha-fronted/package.json @@ -48,7 +48,7 @@ }, "devDependencies": { "autoprefixer": "^7.1.2", - "babel-core": "^6.22.1", + "babel-core": "^6.26.0", "babel-helper-vue-jsx-merge-props": "^2.0.3", "babel-loader": "^7.1.1", "babel-plugin-syntax-jsx": "^6.18.0", diff --git a/nezha-fronted/src/assets/css/common.scss b/nezha-fronted/src/assets/css/common.scss index 52ad24118..b68261d09 100644 --- a/nezha-fronted/src/assets/css/common.scss +++ b/nezha-fronted/src/assets/css/common.scss @@ -85,3 +85,26 @@ .orange-bg { background-color: var(--theme-color) !important; } +.timezone-area{ + display: inline-block; + vertical-align: middle; + width: auto; + font-size: 14px; + float: left; + margin-left: 10px; + font-family: PingFangSC-Regular; + color: #333333; + line-height: 20px; + font-weight: 400; +} +.timezone-offset{ + display: inline-block; + vertical-align: middle; + width: auto; + font-size: 14px; + margin-right: 10px; + font-family: PingFangSC-Regular; + color: #333333; + line-height: 20px; + font-weight: 400; +} diff --git a/nezha-fronted/src/components/charts/chart-list.vue b/nezha-fronted/src/components/charts/chart-list.vue index 4f9c26796..86aa83298 100644 --- a/nezha-fronted/src/components/charts/chart-list.vue +++ b/nezha-fronted/src/components/charts/chart-list.vue @@ -674,7 +674,7 @@ export default { } if (!param.query) delete param.query // 根据panelId获得panel下的所有图表 - this.$get('visual/panel/chart?panelId=' + params.panelId + '&groupId=0').then(response => { + this.$get('visual/panel/chart?panelId=' + params.panelId + '&pageSize=-1').then(response => { if (response.code === 200) { response.data.list.forEach((item, index) => { item.isLoaded = false diff --git a/nezha-fronted/src/components/charts/chartPreview.vue b/nezha-fronted/src/components/charts/chartPreview.vue index f656ecdca..16367c439 100644 --- a/nezha-fronted/src/components/charts/chartPreview.vue +++ b/nezha-fronted/src/components/charts/chartPreview.vue @@ -60,7 +60,7 @@ + --> diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/endpointQuery.vue b/nezha-fronted/src/components/common/bottomBox/tabs/endpointQuery.vue index 376c3a1df..edd8814be 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/endpointQuery.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/endpointQuery.vue @@ -19,7 +19,7 @@
- - +
- - +