From 844772c937915c9fec2e0d7cab613b9b3dd1ce9e Mon Sep 17 00:00:00 2001 From: zhangyu Date: Thu, 8 Jun 2023 14:58:31 +0800 Subject: [PATCH 1/3] =?UTF-8?q?NEZ-2860=20fix=EF=BC=9AChart=20preview=20?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E8=8C=83=E5=9B=B4=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/rightBox/chart/chartRightBox.vue | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue b/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue index 04a3e10b7..88347ab63 100644 --- a/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue +++ b/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue @@ -183,7 +183,10 @@ export default { computed: { chartLastPosition () { return this.$store.getters.getChartLastPosition - } + }, + timeRange () { + return this.$store.getters.getTimeRange + }, }, data () { return { @@ -198,7 +201,7 @@ export default { id: '', name: '' }, - timeRange: [], + // timeRange: [], prevChart: '', filterPanel: '', groupArr: [], @@ -507,9 +510,9 @@ export default { if (show) { this.prevChart = '' setTimeout(() => { - const start = new Date().setHours(new Date().getHours() - 1) - const end = new Date() - this.timeRange = [bus.computeTimezoneTime(start), bus.computeTimezoneTime(end)] + // const start = new Date().setHours(new Date().getHours() - 1) + // const end = new Date() + // this.timeRange = [bus.computeTimezoneTime(start), bus.computeTimezoneTime(end)] this.prevChart = { ...lodash.cloneDeep(this.editChart), loaded: true From feecf7956afc6923f854feb177920de46ef84ec3 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Thu, 8 Jun 2023 15:33:35 +0800 Subject: [PATCH 2/3] =?UTF-8?q?NEZ-2860=20fxi=EF=BC=9A=20Chart=20preview?= =?UTF-8?q?=20=E6=97=B6=E9=97=B4=E8=8C=83=E5=9B=B4=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/chart/ChartScreenHeader.vue | 9 +++++++-- .../src/components/chart/chartHeaderMixin.js | 3 +++ .../src/components/chart/panelChart.vue | 5 +++++ .../common/rightBox/chart/chartRightBox.vue | 18 ++++++++++-------- 4 files changed, 25 insertions(+), 10 deletions(-) diff --git a/nezha-fronted/src/components/chart/ChartScreenHeader.vue b/nezha-fronted/src/components/chart/ChartScreenHeader.vue index 7b6d46d22..52d1ebd7d 100644 --- a/nezha-fronted/src/components/chart/ChartScreenHeader.vue +++ b/nezha-fronted/src/components/chart/ChartScreenHeader.vue @@ -197,8 +197,13 @@ export default { this.searchTime[1] = bus.timeFormate(this.timeRange[1]) this.nowType.start_time = this.searchTime[0] this.nowType.end_time = this.searchTime[1] - this.$refs.pickTime.$refs.timePicker.setCustomTime(this.nowType) - this.setSearchTime(this.nowType.type, this.nowType.value, this.nowType) + if (!this.nowTimeType) { + this.$refs.pickTime.$refs.timePicker.setCustomTime(this.nowType) + this.setSearchTime(this.nowType.type, this.nowType.value, this.nowType) + } else { + this.$refs.pickTime.$refs.timePicker.setCustomTime(this.nowTimeType) + this.setSearchTime(this.nowType.type, this.nowType.value, this.nowTimeType) + } } } } diff --git a/nezha-fronted/src/components/chart/chartHeaderMixin.js b/nezha-fronted/src/components/chart/chartHeaderMixin.js index 214b4d6af..c89b0a600 100644 --- a/nezha-fronted/src/components/chart/chartHeaderMixin.js +++ b/nezha-fronted/src/components/chart/chartHeaderMixin.js @@ -27,6 +27,9 @@ export default { type: Boolean, default: false }, + nowTimeType: { + type: Number + }, hiddenText: { // 隐藏图表的悬浮文字 type: String } diff --git a/nezha-fronted/src/components/chart/panelChart.vue b/nezha-fronted/src/components/chart/panelChart.vue index cc1d737ae..f185c5010 100644 --- a/nezha-fronted/src/components/chart/panelChart.vue +++ b/nezha-fronted/src/components/chart/panelChart.vue @@ -7,6 +7,7 @@ :is-group="isGroup(chartInfo.type)" :isExportHtml="isExportHtml" :isError="isError" + :nowTimeType="nowTimeType" :chartData="chartData" :chart-info="chartInfo" :showAllData.sync="showAllData" @@ -26,6 +27,7 @@ :is-group="isGroup(chartInfo.type)" :isError="isError" :from="from" + :nowTimeType="nowTimeType" :chartData="chartData" :chart-info="chartInfo" :showAllData.sync="showAllData" @@ -92,6 +94,9 @@ export default { type: Boolean, default: true }, + nowTimeType: { + type: Object + }, isExportHtml: { // 是否是导出的html type: Boolean, default: false diff --git a/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue b/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue index 88347ab63..bb443b4df 100644 --- a/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue +++ b/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue @@ -121,6 +121,11 @@ > { - // const start = new Date().setHours(new Date().getHours() - 1) - // const end = new Date() - // this.timeRange = [bus.computeTimezoneTime(start), bus.computeTimezoneTime(end)] + const start = new Date().setHours(new Date().getHours() - 1) + const end = new Date() + this.timeRange = [bus.computeTimezoneTime(start), bus.computeTimezoneTime(end)] this.prevChart = { ...lodash.cloneDeep(this.editChart), loaded: true From d83d832a9cb5b1ea963c703f539ead8ee6bd700e Mon Sep 17 00:00:00 2001 From: zyh Date: Thu, 8 Jun 2023 16:14:45 +0800 Subject: [PATCH 3/3] =?UTF-8?q?NEZ-2862=20fix=EF=BC=9A=E6=89=93=E5=BC=80?= =?UTF-8?q?=E5=BA=95=E9=83=A8=E5=BC=B9=E7=AA=97=E6=97=B6=20=E6=82=AC?= =?UTF-8?q?=E6=B5=AE=E7=AA=97=E8=A2=AB=E9=81=AE=E6=8C=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/package-lock.json | 76 +++++++++---------- .../src/assets/css/common/tableCommon.scss | 2 +- .../common/alert/alertDaysInfo.scss | 2 +- .../common/bottomBox/bottomBox.scss | 1 + .../rightBox/chartRightBox/chartRightBox.scss | 1 + .../components/common/rightBox/panelBox.scss | 4 + .../components/common/rightBox/panelBox.vue | 40 +++++++++- .../src/components/page/tool/trace.vue | 2 +- 8 files changed, 83 insertions(+), 45 deletions(-) diff --git a/nezha-fronted/package-lock.json b/nezha-fronted/package-lock.json index 5add7dd10..3622ea787 100644 --- a/nezha-fronted/package-lock.json +++ b/nezha-fronted/package-lock.json @@ -1401,7 +1401,7 @@ }, "@mapbox/geojson-rewind": { "version": "0.5.2", - "resolved": "https://registry.npmmirror.com/@mapbox/geojson-rewind/-/geojson-rewind-0.5.2.tgz", + "resolved": "https://registry.npmjs.org/@mapbox/geojson-rewind/-/geojson-rewind-0.5.2.tgz", "integrity": "sha512-tJaT+RbYGJYStt7wI3cq4Nl4SXxG8W7JDG5DMJu97V25RnbNg3QtQtf+KD+VLjNpWKYsRvXDNmNrBgEETr1ifA==", "requires": { "get-stream": "^6.0.1", @@ -1410,24 +1410,24 @@ "dependencies": { "get-stream": { "version": "6.0.1", - "resolved": "https://registry.npmmirror.com/get-stream/-/get-stream-6.0.1.tgz", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==" }, "minimist": { "version": "1.2.6", - "resolved": "https://registry.npmmirror.com/minimist/-/minimist-1.2.6.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" } } }, "@mapbox/jsonlint-lines-primitives": { "version": "2.0.2", - "resolved": "https://registry.npmmirror.com/@mapbox/jsonlint-lines-primitives/-/jsonlint-lines-primitives-2.0.2.tgz", + "resolved": "https://registry.npmjs.org/@mapbox/jsonlint-lines-primitives/-/jsonlint-lines-primitives-2.0.2.tgz", "integrity": "sha512-rY0o9A5ECsTQRVhv7tL/OyDpGAoUB4tTvLiW1DSzQGq4bvTPhNw1VpSNjDJc5GFZ2XuyOtSWSVN05qOtcD71qQ==" }, "@mapbox/mapbox-gl-supported": { "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/@mapbox/mapbox-gl-supported/-/mapbox-gl-supported-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/@mapbox/mapbox-gl-supported/-/mapbox-gl-supported-2.0.1.tgz", "integrity": "sha512-HP6XvfNIzfoMVfyGjBckjiAOQK9WfX0ywdLubuPMPv+Vqf5fj0uCbgBQYpiqcWZT6cbyyRnTSXDheT1ugvF6UQ==" }, "@mapbox/node-pre-gyp": { @@ -1604,22 +1604,22 @@ }, "@mapbox/point-geometry": { "version": "0.1.0", - "resolved": "https://registry.npmmirror.com/@mapbox/point-geometry/-/point-geometry-0.1.0.tgz", + "resolved": "https://registry.npmjs.org/@mapbox/point-geometry/-/point-geometry-0.1.0.tgz", "integrity": "sha512-6j56HdLTwWGO0fJPlrZtdU/B13q8Uwmo18Ck2GnGgN9PCFyKTZ3UbXeEdRFh18i9XQ92eH2VdtpJHpBD3aripQ==" }, "@mapbox/tiny-sdf": { "version": "2.0.5", - "resolved": "https://registry.npmmirror.com/@mapbox/tiny-sdf/-/tiny-sdf-2.0.5.tgz", + "resolved": "https://registry.npmjs.org/@mapbox/tiny-sdf/-/tiny-sdf-2.0.5.tgz", "integrity": "sha512-OhXt2lS//WpLdkqrzo/KwB7SRD8AiNTFFzuo9n14IBupzIMa67yGItcK7I2W9D8Ghpa4T04Sw9FWsKCJG50Bxw==" }, "@mapbox/unitbezier": { "version": "0.0.1", - "resolved": "https://registry.npmmirror.com/@mapbox/unitbezier/-/unitbezier-0.0.1.tgz", + "resolved": "https://registry.npmjs.org/@mapbox/unitbezier/-/unitbezier-0.0.1.tgz", "integrity": "sha512-nMkuDXFv60aBr9soUG5q+GvZYL+2KZHVvsqFCzqnkGEf46U2fvmytHaEVc1/YZbiLn8X+eR3QzX1+dwDO1lxlw==" }, "@mapbox/vector-tile": { "version": "1.3.1", - "resolved": "https://registry.npmmirror.com/@mapbox/vector-tile/-/vector-tile-1.3.1.tgz", + "resolved": "https://registry.npmjs.org/@mapbox/vector-tile/-/vector-tile-1.3.1.tgz", "integrity": "sha512-MCEddb8u44/xfQ3oD+Srl/tNcQoqTw3goGk2oLsrFxOTc3dUp+kAnby3PvAeeBYSMSjSPD1nd1AJA6W49WnoUw==", "requires": { "@mapbox/point-geometry": "~0.1.0" @@ -1627,7 +1627,7 @@ }, "@mapbox/whoots-js": { "version": "3.1.0", - "resolved": "https://registry.npmmirror.com/@mapbox/whoots-js/-/whoots-js-3.1.0.tgz", + "resolved": "https://registry.npmjs.org/@mapbox/whoots-js/-/whoots-js-3.1.0.tgz", "integrity": "sha512-Es6WcD0nO5l+2BOQS4uLfNPYQaNDfbot3X1XUoloz+x0mPDS3eeORZJl06HXjwBG1fOGwCRnzK88LMdxKRrd6Q==" }, "@riophae/vue-treeselect": { @@ -1745,7 +1745,7 @@ }, "@types/geojson": { "version": "7946.0.10", - "resolved": "https://registry.npmmirror.com/@types/geojson/-/geojson-7946.0.10.tgz", + "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.10.tgz", "integrity": "sha512-Nmh0K3iWQJzniTuPRcJn5hxXkfB1T1pgB89SBig5PlJQU5yocazeu4jATJlaA0GYFKWMqDdvYemoSnF2pXgLVA==" }, "@types/istanbul-lib-coverage": { @@ -1781,12 +1781,12 @@ }, "@types/mapbox__point-geometry": { "version": "0.1.2", - "resolved": "https://registry.npmmirror.com/@types/mapbox__point-geometry/-/mapbox__point-geometry-0.1.2.tgz", + "resolved": "https://registry.npmjs.org/@types/mapbox__point-geometry/-/mapbox__point-geometry-0.1.2.tgz", "integrity": "sha512-D0lgCq+3VWV85ey1MZVkE8ZveyuvW5VAfuahVTQRpXFQTxw03SuIf1/K4UQ87MMIXVKzpFjXFiFMZzLj2kU+iA==" }, "@types/mapbox__vector-tile": { "version": "1.3.0", - "resolved": "https://registry.npmmirror.com/@types/mapbox__vector-tile/-/mapbox__vector-tile-1.3.0.tgz", + "resolved": "https://registry.npmjs.org/@types/mapbox__vector-tile/-/mapbox__vector-tile-1.3.0.tgz", "integrity": "sha512-kDwVreQO5V4c8yAxzZVQLE5tyWF+IPToAanloQaSnwfXmIcJ7cyOrv8z4Ft4y7PsLYmhWXmON8MBV8RX0Rgr8g==", "requires": { "@types/geojson": "*", @@ -1796,7 +1796,7 @@ }, "@types/pbf": { "version": "3.0.2", - "resolved": "https://registry.npmmirror.com/@types/pbf/-/pbf-3.0.2.tgz", + "resolved": "https://registry.npmjs.org/@types/pbf/-/pbf-3.0.2.tgz", "integrity": "sha512-EDrLIPaPXOZqDjrkzxxbX7UlJSeQVgah3i0aA4pOSzmK9zq3BIh7/MZIQxED7slJByvKM4Gc6Hypyu2lJzh3SQ==" }, "@types/q": { @@ -4333,7 +4333,7 @@ }, "clipboard": { "version": "2.0.11", - "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.11.tgz", + "resolved": "https://registry.npmmirror.com/clipboard/-/clipboard-2.0.11.tgz", "integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==", "requires": { "good-listener": "^1.2.2", @@ -5281,7 +5281,7 @@ }, "csscolorparser": { "version": "1.0.3", - "resolved": "https://registry.npmmirror.com/csscolorparser/-/csscolorparser-1.0.3.tgz", + "resolved": "https://registry.npmjs.org/csscolorparser/-/csscolorparser-1.0.3.tgz", "integrity": "sha512-umPSgYwZkdFoUrH5hIq5kf0wPSXiro51nPw0j2K/c83KflkPSTBGMz6NJvMB+07VlL0y7VPo6QJcDjcgKTTm3w==" }, "cssesc": { @@ -6512,7 +6512,7 @@ }, "delegate": { "version": "3.2.0", - "resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz", + "resolved": "https://registry.npmmirror.com/delegate/-/delegate-3.2.0.tgz", "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==" }, "delegates": { @@ -6753,7 +6753,7 @@ }, "earcut": { "version": "2.2.4", - "resolved": "https://registry.npmmirror.com/earcut/-/earcut-2.2.4.tgz", + "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.4.tgz", "integrity": "sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ==" }, "easings-css": { @@ -8654,7 +8654,7 @@ }, "geojson-vt": { "version": "3.2.1", - "resolved": "https://registry.npmmirror.com/geojson-vt/-/geojson-vt-3.2.1.tgz", + "resolved": "https://registry.npmjs.org/geojson-vt/-/geojson-vt-3.2.1.tgz", "integrity": "sha512-EvGQQi/zPrDA6zr6BnJD/YhwAkBP8nnJ9emh3EnHQKVMfg/MRVtPbMYdgVy/IaEmn4UfagD2a6fafPDL5hbtwg==" }, "get-caller-file": { @@ -8706,7 +8706,7 @@ }, "gl-matrix": { "version": "3.4.3", - "resolved": "https://registry.npmmirror.com/gl-matrix/-/gl-matrix-3.4.3.tgz", + "resolved": "https://registry.npmjs.org/gl-matrix/-/gl-matrix-3.4.3.tgz", "integrity": "sha512-wcCp8vu8FT22BnvKVPjXa/ICBWRq/zjFfdofZy1WSpQZpphblv12/bOQLBC1rMM7SGOFS9ltVmKOHil5+Ml7gA==" }, "glob": { @@ -8851,7 +8851,7 @@ }, "good-listener": { "version": "1.2.2", - "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz", + "resolved": "https://registry.npmmirror.com/good-listener/-/good-listener-1.2.2.tgz", "integrity": "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==", "requires": { "delegate": "^3.1.2" @@ -11365,7 +11365,7 @@ }, "kdbush": { "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/kdbush/-/kdbush-3.0.0.tgz", + "resolved": "https://registry.npmjs.org/kdbush/-/kdbush-3.0.0.tgz", "integrity": "sha512-hRkd6/XW4HTsA9vjVpY9tuXJYLSlelnkTmVFu4M9/7MIYQtFcHpbugAU7UbOfjOiVSVYl2fqgBuJ32JUmRo5Ew==" }, "keyv": { @@ -11723,7 +11723,7 @@ }, "maplibre-gl": { "version": "2.2.0", - "resolved": "https://registry.npmmirror.com/maplibre-gl/-/maplibre-gl-2.2.0.tgz", + "resolved": "https://registry.npmjs.org/maplibre-gl/-/maplibre-gl-2.2.0.tgz", "integrity": "sha512-5LB7ROIxvBADPa4PmU2j+mp0jG5IIbEidCOyZEXVbEriluMJn0hz28vszVb4Cr2IA4YQ9cnERqjHaf33MHIRBQ==", "requires": { "@mapbox/geojson-rewind": "^0.5.2", @@ -12274,7 +12274,7 @@ }, "murmurhash-js": { "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/murmurhash-js/-/murmurhash-js-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/murmurhash-js/-/murmurhash-js-1.0.0.tgz", "integrity": "sha512-TvmkNhkv8yct0SVBSy+o8wYzXjE4Zz3PCesbfs8HiCXXdcTuocApFv11UWlNFWKYsP2okqrhb7JNlSm9InBhIw==" }, "mv": { @@ -12545,7 +12545,7 @@ }, "node-sass": { "version": "4.14.1", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.14.1.tgz", + "resolved": "https://registry.npmmirror.com/node-sass/-/node-sass-4.14.1.tgz", "integrity": "sha512-sjCuOlvGyCJS40R8BscF5vhVlQjNN069NtQ1gSxyK1u9iqvn6tf7O1R4GNowVZfiZUCRt5MmMs1xd+4V/7Yr0g==", "requires": { "async-foreach": "^0.1.3", @@ -13230,7 +13230,7 @@ }, "pbf": { "version": "3.2.1", - "resolved": "https://registry.npmmirror.com/pbf/-/pbf-3.2.1.tgz", + "resolved": "https://registry.npmjs.org/pbf/-/pbf-3.2.1.tgz", "integrity": "sha512-ClrV7pNOn7rtmoQVF4TS1vyU0WhYRnP92fzbfF75jAIwpnzdJXf8iTd4CMEqO4yUenH6NDqLiwjqlh6QgZzgLQ==", "requires": { "ieee754": "^1.1.12", @@ -15670,7 +15670,7 @@ }, "potpack": { "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/potpack/-/potpack-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/potpack/-/potpack-1.0.2.tgz", "integrity": "sha512-choctRBIV9EMT9WGAZHn3V7t0Z2pMQyl0EZE6pFc/6ml3ssw7Dlf/oAOvFwjm1HVsqfQN8GfeFyJ+d8tRzqueQ==" }, "preload": { @@ -15819,7 +15819,7 @@ }, "protocol-buffers-schema": { "version": "3.6.0", - "resolved": "https://registry.npmmirror.com/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz", + "resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz", "integrity": "sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw==" }, "proxy-addr": { @@ -15941,7 +15941,7 @@ }, "quickselect": { "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/quickselect/-/quickselect-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/quickselect/-/quickselect-2.0.0.tgz", "integrity": "sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw==" }, "quill": { @@ -16436,7 +16436,7 @@ }, "resolve-protobuf-schema": { "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/resolve-protobuf-schema/-/resolve-protobuf-schema-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/resolve-protobuf-schema/-/resolve-protobuf-schema-2.1.0.tgz", "integrity": "sha512-kI5ffTiZWmJaS/huM8wZfEMer1eRd7oJQhDuxeCLe3t7N7mX3z94CN0xPxBQxFYQTSNz9T0i+v6inKqSdK8xrQ==", "requires": { "protocol-buffers-schema": "^3.3.1" @@ -16927,7 +16927,7 @@ }, "select": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz", + "resolved": "https://registry.npmmirror.com/select/-/select-1.1.2.tgz", "integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA==" }, "select-hose": { @@ -17974,7 +17974,7 @@ }, "supercluster": { "version": "7.1.5", - "resolved": "https://registry.npmmirror.com/supercluster/-/supercluster-7.1.5.tgz", + "resolved": "https://registry.npmjs.org/supercluster/-/supercluster-7.1.5.tgz", "integrity": "sha512-EulshI3pGUM66o6ZdH3ReiFcvHpM3vAigyK+vcxdjpJyEbIIrtbmBdY23mGgnI24uXiGFvrGq9Gkum/8U7vJWg==", "requires": { "kdbush": "^3.0.0" @@ -18446,7 +18446,7 @@ }, "tiny-emitter": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz", + "resolved": "https://registry.npmmirror.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz", "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==" }, "tinycolor2": { @@ -18456,13 +18456,13 @@ }, "tinyqueue": { "version": "2.0.3", - "resolved": "https://registry.npmmirror.com/tinyqueue/-/tinyqueue-2.0.3.tgz", + "resolved": "https://registry.npmjs.org/tinyqueue/-/tinyqueue-2.0.3.tgz", "integrity": "sha512-ppJZNDuKGgxzkHihX8v9v9G5f+18gzaTfrukGrq6ueg0lmH4nqVnA2IPG0AEH3jKEk2GRJCUhDoqpoiw3PHLBA==" }, "tmp": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.29.tgz", - "integrity": "sha1-8lEl/w3Z2jzLDC3Tce4SiLuRKMA=", + "integrity": "sha512-89PTqMWGDva+GqClOqBV9s3SMh7MA3Mq0pJUdAoHuF65YoE7O0LermaZkVfT5/Ngfo18H4eYiyG7zKOtnEbxsw==", "dev": true, "requires": { "os-tmpdir": "~1.0.1" @@ -19139,7 +19139,7 @@ }, "vt-pbf": { "version": "3.1.3", - "resolved": "https://registry.npmmirror.com/vt-pbf/-/vt-pbf-3.1.3.tgz", + "resolved": "https://registry.npmjs.org/vt-pbf/-/vt-pbf-3.1.3.tgz", "integrity": "sha512-2LzDFzt0mZKZ9IpVF2r69G9bXaP2Q2sArJCmcCgvfTdCCZzSyz4aCLoQyUilu37Ll56tCblIZrXFIjNUpGIlmA==", "requires": { "@mapbox/point-geometry": "0.1.0", @@ -19154,7 +19154,7 @@ }, "vue-clipboard2": { "version": "0.3.3", - "resolved": "https://registry.npmjs.org/vue-clipboard2/-/vue-clipboard2-0.3.3.tgz", + "resolved": "https://registry.npmmirror.com/vue-clipboard2/-/vue-clipboard2-0.3.3.tgz", "integrity": "sha512-aNWXIL2DKgJyY/1OOeITwAQz1fHaCIGvUFHf9h8UcoQBG5a74MkdhS/xqoYe7DNZdQmZRL+TAdIbtUs9OyVjbw==", "requires": { "clipboard": "^2.0.0" @@ -19729,7 +19729,7 @@ }, "webpack-bundle-analyzer": { "version": "2.13.1", - "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-2.13.1.tgz", + "resolved": "https://registry.npmmirror.com/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/assets/css/common/tableCommon.scss b/nezha-fronted/src/assets/css/common/tableCommon.scss index f44c6555c..282fb8015 100644 --- a/nezha-fronted/src/assets/css/common/tableCommon.scss +++ b/nezha-fronted/src/assets/css/common/tableCommon.scss @@ -12,7 +12,7 @@ flex-direction: column; height: 100%; width: 100%; - z-index: 0; + // z-index: 0; } .main-container { padding: 0px; diff --git a/nezha-fronted/src/assets/css/components/common/alert/alertDaysInfo.scss b/nezha-fronted/src/assets/css/components/common/alert/alertDaysInfo.scss index 2ff87302e..ac796ebbf 100644 --- a/nezha-fronted/src/assets/css/components/common/alert/alertDaysInfo.scss +++ b/nezha-fronted/src/assets/css/components/common/alert/alertDaysInfo.scss @@ -15,7 +15,7 @@ } .alert-days-info-tooltip{ position: fixed; - z-index: 1; + z-index: 3000; padding: 5px 10px 5px 10px; line-height: 20px; min-width: 120px; diff --git a/nezha-fronted/src/assets/css/components/common/bottomBox/bottomBox.scss b/nezha-fronted/src/assets/css/components/common/bottomBox/bottomBox.scss index 49e981c5a..9995abe69 100644 --- a/nezha-fronted/src/assets/css/components/common/bottomBox/bottomBox.scss +++ b/nezha-fronted/src/assets/css/components/common/bottomBox/bottomBox.scss @@ -76,6 +76,7 @@ height: 50%; position: relative; padding: 0; + z-index: 10; .top-tools.top-tools--sub { border-bottom: 1px solid $--border-color-light; .top-tool-right { diff --git a/nezha-fronted/src/assets/css/components/common/rightBox/chartRightBox/chartRightBox.scss b/nezha-fronted/src/assets/css/components/common/rightBox/chartRightBox/chartRightBox.scss index 9bf37ab4d..134c4171c 100644 --- a/nezha-fronted/src/assets/css/components/common/rightBox/chartRightBox/chartRightBox.scss +++ b/nezha-fronted/src/assets/css/components/common/rightBox/chartRightBox/chartRightBox.scss @@ -70,6 +70,7 @@ margin-bottom: 10px; box-sizing: border-box; height: 32px; + transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1); .chart-title-content{ flex: 1; display: flex; diff --git a/nezha-fronted/src/assets/css/components/common/rightBox/panelBox.scss b/nezha-fronted/src/assets/css/components/common/rightBox/panelBox.scss index 483b27ae9..0e5f2b4db 100644 --- a/nezha-fronted/src/assets/css/components/common/rightBox/panelBox.scss +++ b/nezha-fronted/src/assets/css/components/common/rightBox/panelBox.scss @@ -171,6 +171,7 @@ justify-content: space-between; box-sizing: border-box; height: 32px; + transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1); .variable-title-left{ width: 450px; text-overflow: ellipsis; @@ -197,6 +198,9 @@ font-size: 17px; } } + .is-item-box-error .variable-title { + border-color: #F56C6C + } .add-variable{ border: 1px solid $--border-color-light; border-radius: 2px; diff --git a/nezha-fronted/src/components/common/rightBox/panelBox.vue b/nezha-fronted/src/components/common/rightBox/panelBox.vue index 9e2ed9032..11783c00c 100644 --- a/nezha-fronted/src/components/common/rightBox/panelBox.vue +++ b/nezha-fronted/src/components/common/rightBox/panelBox.vue @@ -66,6 +66,7 @@ v-for="(item,index) of editPanel.param.variables" :key="item.uid" style="margin-top: 10px" + :class="item.error? 'is-item-box-error' : ''" >
@@ -92,7 +93,7 @@
-
+
- + @@ -137,7 +138,7 @@
- + @@ -145,7 +146,7 @@ - + @@ -533,6 +534,35 @@ export default { this.esc(false) }, + showError () { + this.$refs.form.validate((blooen, object) => { + Object.keys(object).forEach(item => { + const keyArr = item.split('.') + if (keyArr.length >= 4) { + this.editPanel[keyArr[0]][keyArr[1]][keyArr[2]].error = true + } + }) + if (!blooen) { + this.$forceUpdate() + } + }) + }, + hideError (key, index, type) { + if (!this.editPanel.param[key] || !this.editPanel.param[key].length) { + return + } + if (type === 'name') { + const reg = /^[a-zA-Z_][a-zA-Z0-9_]*$/ + if (reg.test(this.editPanel.param[key][index].name)) { + this.editPanel.param[key][index].error = false + this.$forceUpdate() + } + } else { + this.editPanel.param[key][index].error = false + this.$forceUpdate() + } + }, + /* 保存 */ save () { // 保存时把无用属性删除 再传入后台 @@ -540,6 +570,7 @@ export default { const temp = JSON.parse(JSON.stringify(item)) delete temp.collapse delete temp.uid + delete temp.error return temp }) const params = { @@ -598,6 +629,7 @@ export default { }) } } else { + this.showError() this.prevent_opt.save = false return false } diff --git a/nezha-fronted/src/components/page/tool/trace.vue b/nezha-fronted/src/components/page/tool/trace.vue index a797e9cb1..3b91ed5aa 100644 --- a/nezha-fronted/src/components/page/tool/trace.vue +++ b/nezha-fronted/src/components/page/tool/trace.vue @@ -114,7 +114,7 @@ -

{{$t('overall.placeHolder')}}IP

+

{{$t('overall.placeHolder')}} IP

Trace