From 513614e4f5ba5efe734d31c1d62dbf5795a573b3 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Mon, 20 Jun 2022 14:29:42 +0800 Subject: [PATCH 1/7] =?UTF-8?q?NEZ-1953=20fix=EF=BC=9A=20=E5=9C=A8Group?= =?UTF-8?q?=E5=86=85=E6=B7=BB=E5=8A=A0=E7=9A=84=E5=9B=BE=E8=A1=A8=EF=BC=8C?= =?UTF-8?q?=E9=80=9A=E8=BF=87=E6=8B=96=E6=8B=BD=E6=94=B9=E5=8F=98=E5=9B=BE?= =?UTF-8?q?=E8=A1=A8=E4=BD=8D=E7=BD=AE=E5=90=8E=EF=BC=8C=E5=86=8D=E6=AC=A1?= =?UTF-8?q?=E6=89=93=E5=BC=80=E5=9B=BE=E8=A1=A8=E6=81=A2=E5=A4=8D=E5=8E=9F?= =?UTF-8?q?=E6=9C=89=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/chart/chart/chartGroup.vue | 16 ++++++++-------- .../src/components/chart/panelChart.vue | 3 +++ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/nezha-fronted/src/components/chart/chart/chartGroup.vue b/nezha-fronted/src/components/chart/chart/chartGroup.vue index 0e20aa002..eb12424e2 100644 --- a/nezha-fronted/src/components/chart/chart/chartGroup.vue +++ b/nezha-fronted/src/components/chart/chart/chartGroup.vue @@ -54,14 +54,14 @@ export default { }, initChart () { - setTimeout(() => { - this.dataList = this.dataList.map(item => { - return { - ...item - // hide: item.name.indexOf(this.filter.searchName) === -1, // 搜索条件 - } - }) - }, 100) + // setTimeout(() => { + // this.dataList = this.dataList.map(item => { + // return { + // ...item + // // hide: item.name.indexOf(this.filter.searchName) === -1, // 搜索条件 + // } + // }) + // }, 100) } }, watch: { diff --git a/nezha-fronted/src/components/chart/panelChart.vue b/nezha-fronted/src/components/chart/panelChart.vue index 7189deb37..a08b68178 100644 --- a/nezha-fronted/src/components/chart/panelChart.vue +++ b/nezha-fronted/src/components/chart/panelChart.vue @@ -582,6 +582,9 @@ export default { this.$emit('showFullscreen', show, this.chartInfo) }, groupShow (flag) { + if (this.chartInfo.type === 'group' && !flag) { + this.chartData = lodash.get(this, 'chartInfo.children', []) + } this.chartInfo.param.collapse = flag this.groupInit() bus.$emit('groupMove', '', '', true) From fca29d2973a7397576cecc2f14127eaf2ceef8d9 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Mon, 20 Jun 2022 15:03:18 +0800 Subject: [PATCH 2/7] =?UTF-8?q?fix=EF=BC=9A=E8=A1=A5=E5=85=85setup?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=9B=BD=E9=99=85=E5=8C=96=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/common/language/newcn.js | 6 +++++- nezha-fronted/src/components/common/language/newen.js | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/nezha-fronted/src/components/common/language/newcn.js b/nezha-fronted/src/components/common/language/newcn.js index e8d5c07a8..d32b17c12 100644 --- a/nezha-fronted/src/components/common/language/newcn.js +++ b/nezha-fronted/src/components/common/language/newcn.js @@ -71,7 +71,11 @@ const newcn = { talon: { enable: '启用' } - + }, + validate: { + required: '必填项', + host: '不合法的IP', + number: '必须是数字' }, profile: { username: '用户名' diff --git a/nezha-fronted/src/components/common/language/newen.js b/nezha-fronted/src/components/common/language/newen.js index 75bc74181..486310300 100644 --- a/nezha-fronted/src/components/common/language/newen.js +++ b/nezha-fronted/src/components/common/language/newen.js @@ -80,6 +80,11 @@ const newen = { enable: 'Enable' } }, + validate: { + required: 'Required', + host: 'Invalid Host', + number: 'Numberic' + }, profile: { username: 'User name' }, From 3e252a6981f8b0dbe46a2ecf91acff5165365811 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Mon, 20 Jun 2022 15:12:15 +0800 Subject: [PATCH 3/7] =?UTF-8?q?fix=EF=BC=9A=E8=A1=A5=E5=85=85setu=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/common/language/newcn.js | 4 +++- nezha-fronted/src/components/common/language/newen.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/nezha-fronted/src/components/common/language/newcn.js b/nezha-fronted/src/components/common/language/newcn.js index d32b17c12..f94689a67 100644 --- a/nezha-fronted/src/components/common/language/newcn.js +++ b/nezha-fronted/src/components/common/language/newcn.js @@ -75,7 +75,9 @@ const newcn = { validate: { required: '必填项', host: '不合法的IP', - number: '必须是数字' + number: '必须是数字', + port: '不合法的端口', + special: '不能包含特殊字符' }, profile: { username: '用户名' diff --git a/nezha-fronted/src/components/common/language/newen.js b/nezha-fronted/src/components/common/language/newen.js index 486310300..a920fe7e8 100644 --- a/nezha-fronted/src/components/common/language/newen.js +++ b/nezha-fronted/src/components/common/language/newen.js @@ -83,7 +83,9 @@ const newen = { validate: { required: 'Required', host: 'Invalid Host', - number: 'Numberic' + number: 'Numberic', + port: 'Invalid port', + special: 'Cannot contain special characters' }, profile: { username: 'User name' From dcf070fb7ef50344fe7aec942f3fc624ce785b77 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Mon, 20 Jun 2022 16:01:22 +0800 Subject: [PATCH 4/7] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=94=B9=20=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E8=AF=AD=E8=A8=80=E5=90=8E=20=E5=BF=85=E5=A1=AB?= =?UTF-8?q?=E9=A1=B9=E7=9A=84=E6=8F=90=E7=A4=BA=E4=BE=9D=E6=97=A7=E6=98=AF?= =?UTF-8?q?=E8=8B=B1=E6=96=87=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/page/config/setup.vue | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/nezha-fronted/src/components/page/config/setup.vue b/nezha-fronted/src/components/page/config/setup.vue index 99085a2bc..07b87fd4d 100644 --- a/nezha-fronted/src/components/page/config/setup.vue +++ b/nezha-fronted/src/components/page/config/setup.vue @@ -447,6 +447,39 @@ export default { changeLocal: function (local) { this.language = local this.$i18n.locale = local + this.setRules() + }, + setRules () { + this.dbRules = { + host: [ + { + required: true, + message: this.$t('validate.required'), + trigger: 'blur' + }, + { validator: host, trigger: 'blur' } + ], + port: [{ validator: port, trigger: 'blur' }], + name: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }], + username: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }], + pin: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }] + } + this.redisRules = { + host: [ + { + required: true, + message: this.$t('validate.required'), + trigger: 'blur' + }, + { validator: host, trigger: 'blur' } + ], + port: [{ validator: port, trigger: 'blur' }] + } + this.sysRules = { + username: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }], + pin: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }], + haVip: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }] + } } } } From 34ddcc0b82f5f8fec345f40762219685cb64421c Mon Sep 17 00:00:00 2001 From: zhangyu Date: Mon, 20 Jun 2022 16:31:52 +0800 Subject: [PATCH 5/7] =?UTF-8?q?NEZ-1946=20fix=EF=BC=9A=20=E6=89=93?= =?UTF-8?q?=E5=BC=80=E5=BA=95=E9=83=A8=E5=BC=B9=E7=AA=97=20=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E5=AF=B9=E5=BA=94=E5=85=83=E7=B4=A0=20=E5=BA=95?= =?UTF-8?q?=E9=83=A8=E5=BC=B9=E7=AA=97=E4=B8=8D=E5=85=B3=E9=97=AD=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/common/deleteButton.vue | 2 ++ .../src/components/common/mixin/dataList.js | 1 + .../common/rightBox/addEndpointBox.vue | 2 +- .../common/rightBox/batchAddEndpoint.vue | 2 +- .../common/rightBox/batchModifyEndpoint.vue | 2 +- .../common/rightBox/editEndpointBoxNew.vue | 4 ++-- .../components/common/table/nzDataList.vue | 22 ++++++++++++++++++- 7 files changed, 29 insertions(+), 6 deletions(-) diff --git a/nezha-fronted/src/components/common/deleteButton.vue b/nezha-fronted/src/components/common/deleteButton.vue index 854fdc7ae..dc17fd1ef 100644 --- a/nezha-fronted/src/components/common/deleteButton.vue +++ b/nezha-fronted/src/components/common/deleteButton.vue @@ -10,6 +10,7 @@ From c8efd6773bd0c3ba540631394a8f0b6d38c830a3 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Mon, 20 Jun 2022 16:39:54 +0800 Subject: [PATCH 6/7] =?UTF-8?q?NEZ-1958=20fix=EF=BC=9A=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=BA=95=E5=BC=B9=E7=AA=97=E6=A0=B9=E6=8D=AE=E7=88=B6=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E7=9A=84=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/common/mixin/dataList.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nezha-fronted/src/components/common/mixin/dataList.js b/nezha-fronted/src/components/common/mixin/dataList.js index 20f62551f..2561bfc42 100644 --- a/nezha-fronted/src/components/common/mixin/dataList.js +++ b/nezha-fronted/src/components/common/mixin/dataList.js @@ -355,6 +355,8 @@ export default { } if (this.$route.query.orderBy && !this.isSubList) { this.orderBy = this.$route.query.orderBy + } else if (this.isSubList) { + return } let searchKeys = {} if (path === 'dc') { From b7facbfd3ce9d599ad47f4be0d92ab974e07ea24 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Mon, 20 Jun 2022 16:54:37 +0800 Subject: [PATCH 7/7] =?UTF-8?q?NEZ-1959=20fix=EF=BC=9A=E5=9C=A8=E4=B8=8D?= =?UTF-8?q?=E5=90=8C=E7=9A=84=E6=97=B6=E9=97=B4=E6=A0=BC=E5=BC=8F=E4=B8=8B?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E5=85=B6=E4=BB=96=E6=97=B6=E9=97=B4=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E4=B8=8B=E4=BD=BF=E7=94=A8=E8=BF=87=E7=9A=84=E6=9C=80?= =?UTF-8?q?=E8=BF=91=E6=97=B6=E9=97=B4=E6=98=BE=E7=A4=BA=E8=8C=83=E5=9B=B4?= =?UTF-8?q?=E6=97=B6=E5=86=85=E5=AE=B9=E6=98=BE=E7=A4=BA=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/timePicker.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nezha-fronted/src/components/common/timePicker.vue b/nezha-fronted/src/components/common/timePicker.vue index 3b8eb33c6..7d9dd74ba 100644 --- a/nezha-fronted/src/components/common/timePicker.vue +++ b/nezha-fronted/src/components/common/timePicker.vue @@ -92,9 +92,9 @@ class="date-range-history-item" @click="historyChange(item)" > - {{ timeFormate(item.start) }} + {{ momentTz(item.start) }} {{ $t("dashboard.panel.to") }} - {{ timeFormate(item.end) }} + {{ momentTz(item.end) }} @@ -340,8 +340,8 @@ export default { } this.isCustom = true this.rangeHistory.unshift({ - start: item[0], - end: item[1] + start: this.momentStrToTimestamp(item[0]), + end: this.momentStrToTimestamp(item[1]) }) localStorage.setItem( 'date-range-history' + this.sign,