From 8410d1969a20d8592e5d087e8d6bb25fef66d651 Mon Sep 17 00:00:00 2001 From: zyh Date: Mon, 6 Mar 2023 14:50:06 +0800 Subject: [PATCH 1/4] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E5=A4=8DpanelChange?= =?UTF-8?q?=20=E5=8F=98=E9=87=8F=E6=9C=AA=E9=87=8D=E6=96=B0=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/page/dashboard/panel.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nezha-fronted/src/components/page/dashboard/panel.vue b/nezha-fronted/src/components/page/dashboard/panel.vue index 1f5b4b7e0..d29bce8b4 100644 --- a/nezha-fronted/src/components/page/dashboard/panel.vue +++ b/nezha-fronted/src/components/page/dashboard/panel.vue @@ -390,7 +390,7 @@ export default { this.filter.searchName = '' // this.$refs.searchInput.select(); this.showPanel = val - this.variables = this.$loadsh.get(this, 'showPanel.param.variables', []) || [] + this.variables = this.$loadsh.cloneDeep(this.$loadsh.get(this, 'showPanel.param.variables', []) || []) this.showPanel.type = 'dashboard' this.filter.panelId = this.showPanel.id this.panelId = this.showPanel.id From 66c8991149a3a8555344d96afc95f827bfbd63e0 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Mon, 6 Mar 2023 15:34:05 +0800 Subject: [PATCH 2/4] =?UTF-8?q?NEZ-2635=20=20fix=EF=BC=9A=20=E5=88=9B?= =?UTF-8?q?=E5=BB=BAMetrics=E7=9A=84chart=E6=97=B6=E8=AE=BE=E7=BD=AEThresh?= =?UTF-8?q?olds=E9=80=89=E6=8B=A9=E9=A2=9C=E8=89=B2=E6=9C=89=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/common/nezhaColor.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nezha-fronted/src/components/common/nezhaColor.vue b/nezha-fronted/src/components/common/nezhaColor.vue index 721c5ff02..d14c7adf9 100644 --- a/nezha-fronted/src/components/common/nezhaColor.vue +++ b/nezha-fronted/src/components/common/nezhaColor.vue @@ -19,9 +19,9 @@
-
{{item.name}}
+
{{item.name}}
- +
From 68d602385b93af7d8cef52fc3617502872e3d0ac Mon Sep 17 00:00:00 2001 From: zhangyu Date: Mon, 6 Mar 2023 16:04:52 +0800 Subject: [PATCH 3/4] =?UTF-8?q?NEZ-2635=20fix=EF=BC=9A=20=E5=88=9B?= =?UTF-8?q?=E5=BB=BAMetrics=E7=9A=84chart=E6=97=B6=E8=AE=BE=E7=BD=AEThresh?= =?UTF-8?q?olds=E9=80=89=E6=8B=A9=E9=A2=9C=E8=89=B2=E6=9C=89=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/common/js/common.js | 4 ++++ nezha-fronted/src/components/common/nezhaColor.vue | 2 +- .../src/components/common/rightBox/chart/chartConfig.vue | 4 +++- .../components/common/rightBox/chart/chartRightBox.vue | 8 ++++++-- .../common/rightBox/chart/systemChartConfig.vue | 2 +- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/nezha-fronted/src/components/common/js/common.js b/nezha-fronted/src/components/common/js/common.js index f806c3e6c..2917daffd 100644 --- a/nezha-fronted/src/components/common/js/common.js +++ b/nezha-fronted/src/components/common/js/common.js @@ -16,6 +16,10 @@ export function getUUID () { return (S4() + S4() + '-' + S4() + '-' + S4() + '-' + S4() + '-' + S4() + S4() + S4()) } +export function s8 () { + return (((1 + Math.random()) * 0x100000000) | 0).toString(16).substring(1) +} + export const chartCache = {} export function getChart (key) { diff --git a/nezha-fronted/src/components/common/nezhaColor.vue b/nezha-fronted/src/components/common/nezhaColor.vue index d14c7adf9..9f90b7672 100644 --- a/nezha-fronted/src/components/common/nezhaColor.vue +++ b/nezha-fronted/src/components/common/nezhaColor.vue @@ -21,7 +21,7 @@
{{item.name}}
- + diff --git a/nezha-fronted/src/components/common/rightBox/chart/chartConfig.vue b/nezha-fronted/src/components/common/rightBox/chart/chartConfig.vue index 8bd754a8c..88e26f6df 100644 --- a/nezha-fronted/src/components/common/rightBox/chart/chartConfig.vue +++ b/nezha-fronted/src/components/common/rightBox/chart/chartConfig.vue @@ -484,7 +484,7 @@ import { fromRoute } from '@/components/common/js/constants' import editRigthBox from '@/components/common/mixin/editRigthBox' -import { resetZIndex, getUUID } from '@/components/common/js/common' +import { resetZIndex, getUUID, s8 } from '@/components/common/js/common' import selectPanel from '@/components/common/popBox/selectPanel' import chartConfig from '@/components/common/rightBox/chart/chartConfig' import otherChartConfig from '@/components/common/rightBox/chart/otherChartConfig' @@ -382,7 +382,7 @@ export default { valueMapping: false, visibility: false }, - thresholds: [{ value: undefined, color: '#eeeeeeff' }], + thresholds: [{ id: s8(), value: undefined, color: '#eeeeeeff' }], showHeader: this.editChart.param.showHeader, visibility: { varName: '', @@ -541,6 +541,10 @@ export default { } if (obj.param && !obj.param.thresholds) { obj.param.thresholds = [] + } else if (obj.param && obj.param.thresholds) { + obj.param.thresholds.forEach(item => { + item.id = s8() + }) } if (obj.groupId === -1) { obj.groupId = '' diff --git a/nezha-fronted/src/components/common/rightBox/chart/systemChartConfig.vue b/nezha-fronted/src/components/common/rightBox/chart/systemChartConfig.vue index 914b11318..3f51c53c3 100644 --- a/nezha-fronted/src/components/common/rightBox/chart/systemChartConfig.vue +++ b/nezha-fronted/src/components/common/rightBox/chart/systemChartConfig.vue @@ -398,7 +398,7 @@ Date: Mon, 6 Mar 2023 16:15:22 +0800 Subject: [PATCH 4/4] =?UTF-8?q?NEZ-2637=20style=EF=BC=9Achart=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E7=8A=B6=E6=80=81=E4=B8=8B=E7=9B=B8=E5=AF=B9=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E5=8B=BE=E9=80=89=E5=9B=BE=E6=A0=87=E9=A2=9C=E8=89=B2?= =?UTF-8?q?=E4=B8=8D=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/assets/css/components/page/dashboard/chartBox.scss | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nezha-fronted/src/assets/css/components/page/dashboard/chartBox.scss b/nezha-fronted/src/assets/css/components/page/dashboard/chartBox.scss index a5514b755..81b25eb1d 100644 --- a/nezha-fronted/src/assets/css/components/page/dashboard/chartBox.scss +++ b/nezha-fronted/src/assets/css/components/page/dashboard/chartBox.scss @@ -149,5 +149,8 @@ .nz-icon{ color: $--color-text-regular; } + .activeLi .nz-icon { + color: $--color-primary; + } }