From e47967f74bf8af210dfe0c13ff3b0af960354e6e Mon Sep 17 00:00:00 2001 From: 18317449825 <18317449825@163.com> Date: Fri, 25 Aug 2023 20:44:18 +0800 Subject: [PATCH 01/15] =?UTF-8?q?test=EF=BC=9A=E6=89=93=E5=BC=80console=20?= =?UTF-8?q?=E8=B0=83=E8=AF=95=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/build/webpack.prod.conf.js | 14 +++++++------- nezha-fronted/package-lock.json | 10 +++++----- .../page/dashboard/explore/exploreItem.vue | 5 ++++- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/nezha-fronted/build/webpack.prod.conf.js b/nezha-fronted/build/webpack.prod.conf.js index 58fcb43f8..f7a306a29 100644 --- a/nezha-fronted/build/webpack.prod.conf.js +++ b/nezha-fronted/build/webpack.prod.conf.js @@ -344,13 +344,13 @@ if (arg === 'html') { minimizer: [ new CssMinimizerPlugin(), // 去重压缩css new TerserPlugin({ // 压缩JS代码 - terserOptions: { - compress: { - warnings: false, - drop_console: true, // 去除console - pure_funcs: ['console.log'] - } - }, + // terserOptions: { + // compress: { + // warnings: false, + // drop_console: true, // 去除console + // pure_funcs: ['console.log'] + // } + // }, exclude: /manifest.+js/, sourceMap: config.build.productionSourceMap }) diff --git a/nezha-fronted/package-lock.json b/nezha-fronted/package-lock.json index 0a58f808b..9766e358d 100644 --- a/nezha-fronted/package-lock.json +++ b/nezha-fronted/package-lock.json @@ -14340,7 +14340,7 @@ }, "node-sass": { "version": "4.14.1", - "resolved": "https://registry.npmmirror.com/node-sass/-/node-sass-4.14.1.tgz", + "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.14.1.tgz", "integrity": "sha512-sjCuOlvGyCJS40R8BscF5vhVlQjNN069NtQ1gSxyK1u9iqvn6tf7O1R4GNowVZfiZUCRt5MmMs1xd+4V/7Yr0g==", "dev": true, "requires": { @@ -17659,7 +17659,7 @@ }, "showdown": { "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/showdown/-/showdown-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/showdown/-/showdown-2.1.0.tgz", "integrity": "sha512-/6NVYu4U819R2pUIk79n67SYgJHWCce0a5xTP979WbNp0FL9MN1I1QK662IDU1b6JzKTvmhgI7T7JYIxBi3kMQ==", "requires": { "commander": "^9.0.0" @@ -17667,7 +17667,7 @@ "dependencies": { "commander": { "version": "9.5.0", - "resolved": "https://registry.npmmirror.com/commander/-/commander-9.5.0.tgz", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==" } } @@ -19368,7 +19368,7 @@ "tmp": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.29.tgz", - "integrity": "sha512-89PTqMWGDva+GqClOqBV9s3SMh7MA3Mq0pJUdAoHuF65YoE7O0LermaZkVfT5/Ngfo18H4eYiyG7zKOtnEbxsw==", + "integrity": "sha1-8lEl/w3Z2jzLDC3Tce4SiLuRKMA=", "dev": true, "requires": { "os-tmpdir": "~1.0.1" @@ -20727,7 +20727,7 @@ }, "webpack-bundle-analyzer": { "version": "2.13.1", - "resolved": "https://registry.npmmirror.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-2.13.1.tgz", + "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-2.13.1.tgz", "integrity": "sha512-rwxyfecTAxoarCC9VlHlIpfQCmmJ/qWD5bpbjkof+7HrNhTNZIwZITxN6CdlYL2axGmwNUQ+tFgcSOiNXMf/sQ==", "dev": true, "requires": { diff --git a/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue b/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue index 65cf0a327..5fbc5af0b 100644 --- a/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue +++ b/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue @@ -3644,12 +3644,14 @@ export default { try { // eslint-disable-next-line no-undef const go = new Go() + console.log(go, 'log') const result = await WebAssembly.instantiateStreaming(fetch('/static/wasm/promqlparser.wasm'), go.importObject) go.run(result.instance) // eslint-disable-next-line no-undef + console.log(parsePromQL, 'log') this.parsePromQL = parsePromQL } catch (error) { - console.error(error) + console.error(error, 'log') } }, parsePromQL () {}, @@ -4123,6 +4125,7 @@ export default { this.expressions.forEach((item, index) => { if (item != '' && this.promqlKeys[index].state) { const res = this.parsePromQL(item) + console.log(res, 'log') if (res.status === 'error') { error = true this.$refs['promql-' + index][0].setError(res.message) From aba37584d93d0f6628a170083a357f33b1da9c3e Mon Sep 17 00:00:00 2001 From: 18317449825 <18317449825@163.com> Date: Fri, 25 Aug 2023 21:14:01 +0800 Subject: [PATCH 02/15] =?UTF-8?q?test=EF=BC=9A=E8=AF=B7=E6=B1=82wasm?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AF=B7=E6=B1=82=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/page/dashboard/explore/exploreItem.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue b/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue index 5fbc5af0b..ca0047136 100644 --- a/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue +++ b/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue @@ -3644,8 +3644,12 @@ export default { try { // eslint-disable-next-line no-undef const go = new Go() - console.log(go, 'log') - const result = await WebAssembly.instantiateStreaming(fetch('/static/wasm/promqlparser.wasm'), go.importObject) + console.log(WebAssembly.instantiateStreaming, 'log11') + const result = await WebAssembly.instantiateStreaming(fetch('/static/wasm/promqlparser.wasm', { + headers: { + 'content-type': 'application/wasm' + } + }), go.importObject) go.run(result.instance) // eslint-disable-next-line no-undef console.log(parsePromQL, 'log') From 6f9252e800582eb8dd3af68b0665cec9425e85a7 Mon Sep 17 00:00:00 2001 From: 18317449825 <18317449825@163.com> Date: Fri, 25 Aug 2023 21:38:41 +0800 Subject: [PATCH 03/15] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=94=B9WebAssembly?= =?UTF-8?q?=E7=BC=96=E8=AF=91=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/build/webpack.prod.conf.js | 14 +++++++------- .../page/dashboard/explore/exploreItem.vue | 13 ++++--------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/nezha-fronted/build/webpack.prod.conf.js b/nezha-fronted/build/webpack.prod.conf.js index f7a306a29..58fcb43f8 100644 --- a/nezha-fronted/build/webpack.prod.conf.js +++ b/nezha-fronted/build/webpack.prod.conf.js @@ -344,13 +344,13 @@ if (arg === 'html') { minimizer: [ new CssMinimizerPlugin(), // 去重压缩css new TerserPlugin({ // 压缩JS代码 - // terserOptions: { - // compress: { - // warnings: false, - // drop_console: true, // 去除console - // pure_funcs: ['console.log'] - // } - // }, + terserOptions: { + compress: { + warnings: false, + drop_console: true, // 去除console + pure_funcs: ['console.log'] + } + }, exclude: /manifest.+js/, sourceMap: config.build.productionSourceMap }) diff --git a/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue b/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue index ca0047136..7140e3233 100644 --- a/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue +++ b/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue @@ -3644,18 +3644,14 @@ export default { try { // eslint-disable-next-line no-undef const go = new Go() - console.log(WebAssembly.instantiateStreaming, 'log11') - const result = await WebAssembly.instantiateStreaming(fetch('/static/wasm/promqlparser.wasm', { - headers: { - 'content-type': 'application/wasm' - } - }), go.importObject) + const response = await fetch('/static/wasm/promqlparser.wasm') + const buffer = await response.arrayBuffer() + const result = await WebAssembly.instantiate(buffer, go.importObject) go.run(result.instance) // eslint-disable-next-line no-undef - console.log(parsePromQL, 'log') this.parsePromQL = parsePromQL } catch (error) { - console.error(error, 'log') + console.error(error) } }, parsePromQL () {}, @@ -4129,7 +4125,6 @@ export default { this.expressions.forEach((item, index) => { if (item != '' && this.promqlKeys[index].state) { const res = this.parsePromQL(item) - console.log(res, 'log') if (res.status === 'error') { error = true this.$refs['promql-' + index][0].setError(res.message) From 9f469a62a2d7de3834e0a667a32bb40f54452d09 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Mon, 28 Aug 2023 11:34:44 +0800 Subject: [PATCH 04/15] =?UTF-8?q?NEZ-3147=20fix=EF=BC=9AURL=20=E6=94=AF?= =?UTF-8?q?=E6=8C=81=20=E6=98=BE=E7=A4=BA=E6=88=96=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/page/config/system/linkTable.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/nezha-fronted/src/components/page/config/system/linkTable.vue b/nezha-fronted/src/components/page/config/system/linkTable.vue index d08808292..d041d6d3b 100644 --- a/nezha-fronted/src/components/page/config/system/linkTable.vue +++ b/nezha-fronted/src/components/page/config/system/linkTable.vue @@ -114,7 +114,6 @@ export default { }, { label: 'URL', prop: 'url', - visibility: 'disabled', show: true } ], From cd9159086062d1a37cc53a0c08f1599b8133bca0 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Mon, 28 Aug 2023 11:38:33 +0800 Subject: [PATCH 05/15] =?UTF-8?q?NEZ-3145=20fix=EF=BC=9AIPAM=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E9=A1=B5=E9=9D=A2=20CIDR=EF=BC=8C=E5=AD=90=E7=BD=91?= =?UTF-8?q?=E6=8E=A9=E7=A0=81=E4=B8=8D=E5=85=81=E8=AE=B8=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/common/rightBox/ipamBox.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nezha-fronted/src/components/common/rightBox/ipamBox.vue b/nezha-fronted/src/components/common/rightBox/ipamBox.vue index c9a826386..03eee84ec 100644 --- a/nezha-fronted/src/components/common/rightBox/ipamBox.vue +++ b/nezha-fronted/src/components/common/rightBox/ipamBox.vue @@ -31,13 +31,14 @@
CIDR
- + diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/recordRulesQuery.vue b/nezha-fronted/src/components/common/bottomBox/tabs/recordRulesQuery.vue index 56764a619..d4549a10f 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/recordRulesQuery.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/recordRulesQuery.vue @@ -36,18 +36,23 @@
- + -
From c0cbe4438d059b5adab1f7b8b9f951bdb66e5109 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Mon, 28 Aug 2023 14:59:22 +0800 Subject: [PATCH 08/15] =?UTF-8?q?fix:=20=E5=9B=BD=E9=99=85=E5=8C=96?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/common/rightBox/profileBox.vue | 2 +- .../common/table/settings/operationLogTable.vue | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/nezha-fronted/src/components/common/rightBox/profileBox.vue b/nezha-fronted/src/components/common/rightBox/profileBox.vue index b62aa9fe4..2ec154056 100644 --- a/nezha-fronted/src/components/common/rightBox/profileBox.vue +++ b/nezha-fronted/src/components/common/rightBox/profileBox.vue @@ -43,7 +43,7 @@ v-model="editProfile.theme" popper-class="right-box-select-top prevent-clickoutside" size="small"> - + diff --git a/nezha-fronted/src/components/common/table/settings/operationLogTable.vue b/nezha-fronted/src/components/common/table/settings/operationLogTable.vue index 09dd57130..8abdc9ef9 100644 --- a/nezha-fronted/src/components/common/table/settings/operationLogTable.vue +++ b/nezha-fronted/src/components/common/table/settings/operationLogTable.vue @@ -54,6 +54,7 @@ {{scope.row[item.prop]}} + {{formatOperation(scope.row)}} {{scope.row[item.prop]}} - @@ -91,9 +92,10 @@