From ca55d5d57a460091efe8fd7e46beade4c709901e Mon Sep 17 00:00:00 2001 From: zhangyu Date: Wed, 23 Aug 2023 18:55:15 +0800 Subject: [PATCH 01/18] =?UTF-8?q?NEZ-3070=20fix:software=20asset=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E7=BC=96=E8=BE=91=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rightBox/software/softwareAssetBox.vue | 115 +++++++++++++++++- .../table/settings/softwareTypeTable.vue | 4 +- 2 files changed, 112 insertions(+), 7 deletions(-) diff --git a/nezha-fronted/src/components/common/rightBox/software/softwareAssetBox.vue b/nezha-fronted/src/components/common/rightBox/software/softwareAssetBox.vue index 4a89967dc..56c63ac36 100644 --- a/nezha-fronted/src/components/common/rightBox/software/softwareAssetBox.vue +++ b/nezha-fronted/src/components/common/rightBox/software/softwareAssetBox.vue @@ -57,6 +57,92 @@
{{$t('softwareAsset.Connector')}}
+ + + + +
+ + + + +
+
@@ -100,6 +186,7 @@ export default { const vm = this return { assetConstants, + disabled: false, editSoftwareAsset: { id: '', name: '', @@ -157,7 +244,7 @@ export default { return row.dc ? row.dc.name : '' } } - ], + ] } }, watch: { @@ -167,9 +254,16 @@ export default { handler (n) { this.isEdit = true const editSoftwareAsset = JSON.parse(JSON.stringify(n)) + editSoftwareAsset.paramObj = [] + // if (editSoftwareAsset.params) { + // Object.keys(editSoftwareAsset.params).forEach(key => { + // editSoftwareAsset.paramObj.push(editSoftwareAsset.params[key]) + // }) + // } + editSoftwareAsset.assetId = editSoftwareAsset.assetId + '' this.editSoftwareAsset = editSoftwareAsset } - }, + } }, created () { this.getProjectList() @@ -203,11 +297,11 @@ export default { const params = { ...this.editSoftwareAsset } - params.icon = this.imageUrl params.params = {} params.paramObj.forEach(item => { - params.params[item.name] = item + params.params[item.name] = item.value }) + params.icon = this.imageUrl if (this.editSoftwareAsset.id) { this.$put(this.url, params).then(res => { this.prevent_opt.save = false @@ -254,6 +348,9 @@ export default { this.$get('asset/software/type', { pageSize: -1, pageNo: 1 }).then(response => { if (response.code === 200) { this.softwareTypeArr = response.data.list + if (this.editSoftwareAsset.typeId) { + this.renderParams() + } } }) }, @@ -266,7 +363,15 @@ export default { } }, renderParams () { - this.editSoftwareAsset.params = {} + this.editSoftwareAsset.paramObj = [] + const findItem = this.softwareTypeArr.find(item => item.id == this.editSoftwareAsset.typeId) + if (findItem.params) { + Object.keys(findItem.params).forEach(key => { + findItem.params[key].value = this.editSoftwareAsset.params[key] ? this.editSoftwareAsset.params[key].value : findItem.params[key].value + this.editSoftwareAsset.paramObj.push(findItem.params[key]) + }) + console.log(this.editSoftwareAsset.paramObj) + } } } } diff --git a/nezha-fronted/src/components/common/table/settings/softwareTypeTable.vue b/nezha-fronted/src/components/common/table/settings/softwareTypeTable.vue index 68e06ffda..c3aa3e0dd 100644 --- a/nezha-fronted/src/components/common/table/settings/softwareTypeTable.vue +++ b/nezha-fronted/src/components/common/table/settings/softwareTypeTable.vue @@ -52,10 +52,10 @@
Date: Thu, 24 Aug 2023 10:18:49 +0800 Subject: [PATCH 02/18] =?UTF-8?q?NEZ-3070=20fix:software=20asset=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E7=BC=96=E8=BE=91=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rightBox/software/softwareAssetBox.vue | 26 +++++++++++++------ .../table/settings/softwareAssetTable.vue | 3 +++ 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/nezha-fronted/src/components/common/rightBox/software/softwareAssetBox.vue b/nezha-fronted/src/components/common/rightBox/software/softwareAssetBox.vue index 56c63ac36..fe46264d4 100644 --- a/nezha-fronted/src/components/common/rightBox/software/softwareAssetBox.vue +++ b/nezha-fronted/src/components/common/rightBox/software/softwareAssetBox.vue @@ -21,9 +21,6 @@ - - - { + this.editSoftwareAsset.assetId = this.obj.assetId + '' + }, 500) }, methods: { clickOutside () { this.esc(false) }, iconActive (subItem) { - console.log(subItem, this.editSoftwareAsset.icon) if (this.editSoftwareAsset.icon === subItem.value) { this.editSoftwareAsset.icon = undefined this.$set(this.editSoftwareAsset, 'icon', '') @@ -299,7 +298,13 @@ export default { } params.params = {} params.paramObj.forEach(item => { - params.params[item.name] = item.value + if (item.type === 'CHECKBOX') { + params.params[item.name] = item.value + } else if (item.type === 'DATETIME' && JSON.parse(item.param).interval) { + params.params[item.name] = item.value + } else { + params.params[item.name] = item.value[0] + } }) params.icon = this.imageUrl if (this.editSoftwareAsset.id) { @@ -367,10 +372,15 @@ export default { const findItem = this.softwareTypeArr.find(item => item.id == this.editSoftwareAsset.typeId) if (findItem.params) { Object.keys(findItem.params).forEach(key => { - findItem.params[key].value = this.editSoftwareAsset.params[key] ? this.editSoftwareAsset.params[key].value : findItem.params[key].value + if (findItem.params[key].type === 'CHECKBOX') { + findItem.params[key].value = this.editSoftwareAsset.params[key] ? this.editSoftwareAsset.params[key] : findItem.params[key].value + } else if (findItem.params[key].type === 'DATETIME' && JSON.parse(findItem.params[key].param).interval) { + findItem.params[key].value = this.editSoftwareAsset.params[key] ? this.editSoftwareAsset.params[key] : findItem.params[key].value + } else { + findItem.params[key].value = this.editSoftwareAsset.params[key] ? [this.editSoftwareAsset.params[key]] : findItem.params[key].value + } this.editSoftwareAsset.paramObj.push(findItem.params[key]) }) - console.log(this.editSoftwareAsset.paramObj) } } } diff --git a/nezha-fronted/src/components/common/table/settings/softwareAssetTable.vue b/nezha-fronted/src/components/common/table/settings/softwareAssetTable.vue index 938f77ccc..613f27a71 100644 --- a/nezha-fronted/src/components/common/table/settings/softwareAssetTable.vue +++ b/nezha-fronted/src/components/common/table/settings/softwareAssetTable.vue @@ -67,6 +67,9 @@
+ {{scope.row[item.prop]}} - From d36528c426d72a1413550650588edd9709f187d5 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Thu, 24 Aug 2023 11:39:42 +0800 Subject: [PATCH 03/18] =?UTF-8?q?fix:=E5=9B=BD=E9=99=85=E5=8C=96=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/common/rightBox/chart/publicConfig.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nezha-fronted/src/components/common/rightBox/chart/publicConfig.js b/nezha-fronted/src/components/common/rightBox/chart/publicConfig.js index de93ed555..4cd0bb2b4 100644 --- a/nezha-fronted/src/components/common/rightBox/chart/publicConfig.js +++ b/nezha-fronted/src/components/common/rightBox/chart/publicConfig.js @@ -31,13 +31,13 @@ export default { spanList: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], unitOptions: chartDataFormat.unitOptions(), nullTypeList: [{ - label: 'connected', + label: this.$t('chart.connected'), value: 'connected' }, { - label: 'null', + label: this.$t('chart.null'), value: 'null' }, { - label: 'zero', + label: this.$t('chart.zero'), value: 'zero' }], statisticsList: this.$CONSTANTS.statisticsList, From 7e2501b3bfb01e5a38d48c17f61e0a42287e56d4 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Thu, 24 Aug 2023 13:37:58 +0800 Subject: [PATCH 04/18] =?UTF-8?q?NEZ-3067=20fix=EF=BC=9AAgents=E4=B8=AD?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E4=B8=8B=E8=BD=BD=E6=8C=89=E9=92=AE=E5=90=8E?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E4=B8=8B=E8=BD=BD=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/assets/css/common.scss | 5 +++++ nezha-fronted/src/components/page/config/agent.vue | 1 + .../components/page/integration/integration-tabs/manual.vue | 2 ++ 3 files changed, 8 insertions(+) diff --git a/nezha-fronted/src/assets/css/common.scss b/nezha-fronted/src/assets/css/common.scss index 77aa08277..396042088 100644 --- a/nezha-fronted/src/assets/css/common.scss +++ b/nezha-fronted/src/assets/css/common.scss @@ -735,3 +735,8 @@ i.nz-icon-override{ .xterm .xterm-viewport { background-color: transparent !important; } +.downloading { + opacity: .6; + color: $--color-primary; + margin-left: 10px; +} diff --git a/nezha-fronted/src/components/page/config/agent.vue b/nezha-fronted/src/components/page/config/agent.vue index 407e7c1ad..253a7bacd 100644 --- a/nezha-fronted/src/components/page/config/agent.vue +++ b/nezha-fronted/src/components/page/config/agent.vue @@ -70,6 +70,7 @@ + {{$t('overall.downloading')}}
{{$t('config.agent.agent.autoScript')}}
diff --git a/nezha-fronted/src/components/page/integration/integration-tabs/manual.vue b/nezha-fronted/src/components/page/integration/integration-tabs/manual.vue index bec71b6b9..0fa4a58be 100644 --- a/nezha-fronted/src/components/page/integration/integration-tabs/manual.vue +++ b/nezha-fronted/src/components/page/integration/integration-tabs/manual.vue @@ -16,6 +16,7 @@ + {{$t('overall.downloading')}} @@ -71,6 +72,7 @@ + {{$t('overall.downloading')}} From f4263d82ed152f2018813ea7e90e09612707ba66 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Thu, 24 Aug 2023 13:56:40 +0800 Subject: [PATCH 05/18] =?UTF-8?q?NEZ-3127=20fix=EF=BC=9A=E4=BF=AE=E6=94=B9?= =?UTF-8?q?Metrics=E8=A1=A8=E8=BE=BE=E5=BC=8F=20Metrics=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E5=8C=BA=E5=9F=9F=E4=B8=8D=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/rightBox/chartRightBox/chartRightBox.scss | 7 ++++++- .../src/components/common/rightBox/chart/chartRightBox.vue | 2 +- .../src/components/page/dashboard/explore/promqlInput.vue | 3 ++- 3 files changed, 9 insertions(+), 3 deletions(-) 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 43a811571..0b079a253 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 @@ -375,4 +375,9 @@ .nz-icon-sort{ color: #FF8C0E !important; } -} \ No newline at end of file +} +.datasource-log { + .el-tabs__content { + overflow: unset; + } +} diff --git a/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue b/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue index 1b1d1cc1e..1d09fe442 100644 --- a/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue +++ b/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue @@ -75,7 +75,7 @@ - + diff --git a/nezha-fronted/src/components/page/dashboard/explore/promqlInput.vue b/nezha-fronted/src/components/page/dashboard/explore/promqlInput.vue index 8b9fed6b8..eb8478484 100644 --- a/nezha-fronted/src/components/page/dashboard/explore/promqlInput.vue +++ b/nezha-fronted/src/components/page/dashboard/explore/promqlInput.vue @@ -163,12 +163,13 @@ > {{ type === "log" From 2d3ea18dac5c830d9c7d7c0c1c641147b1f6cc2a Mon Sep 17 00:00:00 2001 From: zhangyu Date: Thu, 24 Aug 2023 16:40:33 +0800 Subject: [PATCH 06/18] =?UTF-8?q?NEZ-3133=20fix:=20Batch=20edit=20endpoint?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=EF=BC=8CLabel=20key=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=9C=89=E9=81=AE=E6=8C=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/assets/css/common.scss | 3 ++ nezha-fronted/src/components/common/login.vue | 39 ++++++++++++++----- .../src/components/page/config/profile.vue | 33 ++++++++++++---- 3 files changed, 57 insertions(+), 18 deletions(-) diff --git a/nezha-fronted/src/assets/css/common.scss b/nezha-fronted/src/assets/css/common.scss index 396042088..dd5fea04c 100644 --- a/nezha-fronted/src/assets/css/common.scss +++ b/nezha-fronted/src/assets/css/common.scss @@ -740,3 +740,6 @@ i.nz-icon-override{ color: $--color-primary; margin-left: 10px; } +.el-form-item__error { + padding-top: 0; +} diff --git a/nezha-fronted/src/components/common/login.vue b/nezha-fronted/src/components/common/login.vue index f4d9c96e9..9c8d102c5 100644 --- a/nezha-fronted/src/components/common/login.vue +++ b/nezha-fronted/src/components/common/login.vue @@ -86,25 +86,37 @@ :show-close="true" width="620px" class="nz-dialog" >
-