From e4bab2ee708e1192769462e8fa883095927a9b6d Mon Sep 17 00:00:00 2001 From: zhangyu Date: Thu, 23 Jun 2022 15:12:43 +0800 Subject: [PATCH 1/4] =?UTF-8?q?NEZ-1968=20fix=EF=BC=9A=E9=BB=91=E8=89=B2?= =?UTF-8?q?=E4=B8=BB=E9=A2=98=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/assets/css/common.scss | 10 +++++++++- .../common/project/L5/CanvasProps.scss | 2 +- .../css/components/common/project/topology.scss | 14 +++++++++++--- .../src/assets/css/themes/src/table.scss | 1 + .../components/common/ChartDiagram/diagram.vue | 16 ++++++++++------ .../src/components/common/project/topologyL5.vue | 2 ++ .../components/page/dashboard/explore/logTab.vue | 8 ++++++-- 7 files changed, 40 insertions(+), 13 deletions(-) diff --git a/nezha-fronted/src/assets/css/common.scss b/nezha-fronted/src/assets/css/common.scss index e1b6dd32c..8dac53ec2 100644 --- a/nezha-fronted/src/assets/css/common.scss +++ b/nezha-fronted/src/assets/css/common.scss @@ -437,6 +437,14 @@ input, textarea { .is-disabled{ color: $--color-text-disabled !important; } -.ql-tooltip { +.ql-snow .ql-tooltip { background: $--background-color-empty; + border: 1px solid $--select-page-focus-color; + box-shadow: 0px 0px 5px $--scrollbar-background-color; + color: $--color-text-primary; + input[type=text]{ + border: 1px solid $--select-page-focus-color; + background: $--background-color-empty; + outline: none; + } } diff --git a/nezha-fronted/src/assets/css/components/common/project/L5/CanvasProps.scss b/nezha-fronted/src/assets/css/components/common/project/L5/CanvasProps.scss index d8833a65d..fa9a5445b 100644 --- a/nezha-fronted/src/assets/css/components/common/project/L5/CanvasProps.scss +++ b/nezha-fronted/src/assets/css/components/common/project/L5/CanvasProps.scss @@ -37,7 +37,7 @@ } .project-title { - background: #eeeeee; + background: $--background-color-base; height: 36px; line-height: 36px; border-radius: 0; diff --git a/nezha-fronted/src/assets/css/components/common/project/topology.scss b/nezha-fronted/src/assets/css/components/common/project/topology.scss index b3197b5c0..757201ff9 100644 --- a/nezha-fronted/src/assets/css/components/common/project/topology.scss +++ b/nezha-fronted/src/assets/css/components/common/project/topology.scss @@ -60,7 +60,7 @@ } } .edit-topologyLine{ - background: rgba(196,196,196,0.4) !important; + //background: rgba(196,196,196,0.4) !important; border-bottom: 1px solid $--explore-border-color-bottom; } .topology-scroll{ @@ -333,10 +333,9 @@ margin-right: 10px; } .project-title { - height: 55px; + height: 36px; padding-bottom: 0; } - .drag-header { cursor: move; background: #1a1a1a; @@ -543,3 +542,12 @@ overflow: hidden; box-sizing: border-box; } +.full.pr10 { + .el-select.el-select--small,.el-input { + background-color: $--background-color-empty; + border: 1px solid $--background-color-empty; + } +} +.el-upload-dragger{ + background-color: $--background-color-empty; +} diff --git a/nezha-fronted/src/assets/css/themes/src/table.scss b/nezha-fronted/src/assets/css/themes/src/table.scss index 319c5d135..d64dac5f0 100644 --- a/nezha-fronted/src/assets/css/themes/src/table.scss +++ b/nezha-fronted/src/assets/css/themes/src/table.scss @@ -259,6 +259,7 @@ right: 0; width: 1px; height: 100%; + background: $--border-color-light; } } diff --git a/nezha-fronted/src/components/common/ChartDiagram/diagram.vue b/nezha-fronted/src/components/common/ChartDiagram/diagram.vue index f7e408179..480b2fa31 100644 --- a/nezha-fronted/src/components/common/ChartDiagram/diagram.vue +++ b/nezha-fronted/src/components/common/ChartDiagram/diagram.vue @@ -61,7 +61,7 @@
- + @@ -74,7 +74,7 @@
- + @@ -354,7 +354,9 @@ const canvasOptions = { export default { name: 'diagram', data () { + const theme = localStorage.getItem(`nz-user-${localStorage.getItem('nz-user-id')}-theme`) || 'light' return { + theme, title: this.$t('overall.uploadCustomPicture'), objChange: false, // project 变化 用于判断 init是否执行完成 执行完成 才可以执行下次变化 chartDataInfo: {}, @@ -517,10 +519,10 @@ export default { chartData: {}, chartGetData: [], penLineType: [ - { d: 'M5 19 a50,100 0 0,1 40,0', 'stroke-dasharray': '', name: this.$t('project.topology.curve'), id: 'curve' }, - { d: 'M5 8 l20 0 l0 12 l20 0', 'stroke-dasharray': '', name: this.$t('project.topology.polyline'), id: 'polyline' }, - { d: 'M5 14 l40 0', 'stroke-dasharray': '', name: this.$t('project.topology.line'), id: 'line' } - // {d:'M5 20 C0,8 50,0 85,0',"stroke-dasharray":"",name:'mind'}, + { d: 'M5 19 a50,100 0 0,1 40,0', 'stroke-dasharray': '', name: this.$t('project.topology.curve'), id: 'curve' , strokeColor: theme == 'light' ? 'black' : '#BEBEBE'}, + { d: 'M5 8 l20 0 l0 12 l20 0', 'stroke-dasharray': '', name: this.$t('project.topology.polyline'), id: 'polyline' , strokeColor: theme == 'light' ? 'black' : '#BEBEBE'}, + { d: 'M5 14 l40 0', 'stroke-dasharray': '', name: this.$t('project.topology.line'), id: 'line' , strokeColor: theme == 'light' ? 'black' : '#BEBEBE'} + // {d:'M5 20 C0,8 50,0 85,0',"stroke-dasharray":"",name:'mind', strokeColor: theme == 'light' ? 'black' : '#BEBEBE'}, ], lineName: 'curve', cachesIndex: 0, @@ -831,8 +833,10 @@ export default { this.projectAlertShow = true this.saveData = { ...data } this.topologyInfo.name = '' + data.ruleColor = this.theme == 'light' ? '#4e4e4e' : '#BEBEBE' resolve(data) } else { + data.ruleColor = this.theme == 'light' ? '#4e4e4e' : '#BEBEBE' if (data.data) { this.topologyInfo = { fontSize: data.data.fontSize, diff --git a/nezha-fronted/src/components/common/project/topologyL5.vue b/nezha-fronted/src/components/common/project/topologyL5.vue index 3dbf52dda..3113461e2 100644 --- a/nezha-fronted/src/components/common/project/topologyL5.vue +++ b/nezha-fronted/src/components/common/project/topologyL5.vue @@ -828,9 +828,11 @@ export default { this.projectAlertShow = true this.saveData = JSON.parse(JSON.stringify(data)) this.topologyInfo.name = this.obj.name + data.ruleColor = this.theme == 'light' ? '#4e4e4e' : '#BEBEBE' resolve(data) data = null } else { + data.ruleColor = this.theme == 'light' ? '#4e4e4e' : '#BEBEBE' if (data.data) { this.topologyInfo = { fontSize: data.data.fontSize, diff --git a/nezha-fronted/src/components/page/dashboard/explore/logTab.vue b/nezha-fronted/src/components/page/dashboard/explore/logTab.vue index 7bfbb1752..f1668a6be 100644 --- a/nezha-fronted/src/components/page/dashboard/explore/logTab.vue +++ b/nezha-fronted/src/components/page/dashboard/explore/logTab.vue @@ -125,7 +125,9 @@ export default { } }, data () { + const theme = localStorage.getItem(`nz-user-${localStorage.getItem('nz-user-id')}-theme`) || 'light' return { + theme, operations: { levels: [0, 1, 2, 3, 4, 5, 6], descending: true @@ -262,8 +264,10 @@ export default { itemHeight: 4, borderRadius: 3, textStyle: { - padding: [0, 0, 0, 6] - } + padding: [0, 0, 0, 6], + color: this.theme == 'light' ? '#666666' : '#BEBEBE', + }, + inactiveColor: this.theme == 'light' ? '#BEBEBE' : '#666666' // 字体颜色 }, series, xAxis: { From c5dfe7b6bed1695c002db9b8b44391c6f6bcb093 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Thu, 23 Jun 2022 15:50:05 +0800 Subject: [PATCH 2/4] =?UTF-8?q?NEZ-1973=20fix=EF=BC=9A=E9=80=89=E6=8B=A9Me?= =?UTF-8?q?tric=E6=97=B6=E5=87=BA=E7=8E=B0=E9=87=8D=E5=BD=B1=E7=8E=B0?= =?UTF-8?q?=E8=B1=A1=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/assets/css/components/chart/chart.scss | 3 +-- .../css/components/page/dashboard/explore/promqlInput.scss | 1 + .../src/components/page/dashboard/explore/promqlInput.vue | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/nezha-fronted/src/assets/css/components/chart/chart.scss b/nezha-fronted/src/assets/css/components/chart/chart.scss index 3bd277531..3aac0c05b 100644 --- a/nezha-fronted/src/assets/css/components/chart/chart.scss +++ b/nezha-fronted/src/assets/css/components/chart/chart.scss @@ -3,9 +3,8 @@ } .my-loading-parent--relative { position: relative; - display: inline-block; height: 100%; - width: 100%; + width: auto; } .panel-chart { border: 1px solid $--chart-box-border-color; diff --git a/nezha-fronted/src/assets/css/components/page/dashboard/explore/promqlInput.scss b/nezha-fronted/src/assets/css/components/page/dashboard/explore/promqlInput.scss index 053ac4e9d..b9b3e7815 100644 --- a/nezha-fronted/src/assets/css/components/page/dashboard/explore/promqlInput.scss +++ b/nezha-fronted/src/assets/css/components/page/dashboard/explore/promqlInput.scss @@ -58,6 +58,7 @@ } .el-cascader-menu { width: 200px; + height: 100%; } .metric-btn:hover, .metric-btn:focus { background-image: linear-gradient(180deg, rgb(247, 248, 250) 0%, rgb(247, 248, 250) 100%); diff --git a/nezha-fronted/src/components/page/dashboard/explore/promqlInput.vue b/nezha-fronted/src/components/page/dashboard/explore/promqlInput.vue index 488e5ba41..063361185 100644 --- a/nezha-fronted/src/components/page/dashboard/explore/promqlInput.vue +++ b/nezha-fronted/src/components/page/dashboard/explore/promqlInput.vue @@ -23,7 +23,6 @@ v-model="cascaderValue" v-clickoutside="closeDropdown" v-my-loading="tempBoxShowLoading" - :loading="loading" :options="metricOptions" v-if="type !== 'log'" :props="cascaderProps" @@ -925,7 +924,7 @@ export default { let childrenCopy = JSON.parse(JSON.stringify(children)) const findChild = this.metricOptions.find(item => item.label === data.parent) if (childrenCopy.length > 100) { - childrenCopy = childrenCopy.splice(findChild.children.length, findChild.children.length + 101) + childrenCopy = childrenCopy.splice(findChild.children.length, 100) findChild.children.splice(findChild.children.length - 1, 1) findChild.children.push(...childrenCopy) if (findChild.children.length < children.length - 1) { From 753253f4433d8cf18f340dcb64ab3d174703eea2 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Thu, 23 Jun 2022 16:23:39 +0800 Subject: [PATCH 3/4] =?UTF-8?q?NEZ-1974=20fix=EF=BC=9A=20=E6=96=B0?= =?UTF-8?q?=E5=BB=BAchart=E6=97=B6=E9=80=89=E6=8B=A9Metrics=E6=88=96Logs?= =?UTF-8?q?=E5=90=8E=EF=BC=8C=E8=A1=A8=E8=BE=BE=E5=BC=8F=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E6=A1=86=E6=8F=90=E7=A4=BA=E8=BE=93=E5=85=A5=E9=99=90=E5=88=B6?= =?UTF-8?q?=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 --- .../common/rightBox/chartRightBox/chartRightBox.scss | 6 +++--- 1 file changed, 3 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 4308be3b6..b68c315c0 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 @@ -38,12 +38,12 @@ } .metrics-input-box{ .input-box .el-textarea .el-textarea__inner { - width: calc(100% + 42px); + width: 100%; } .metric-selector-input-box{ line-height: 32px; .el-input__count{ - right: -38px !important; + right: 18px !important; } } .el-col-24{ @@ -330,4 +330,4 @@ .nz-icon-mimabukejian{ font-size: 18px; } -} \ No newline at end of file +} From 8d8654a13aa4e3572ac4b6adf73fd2512ec24d2a Mon Sep 17 00:00:00 2001 From: zhangyu Date: Thu, 23 Jun 2022 16:39:20 +0800 Subject: [PATCH 4/4] =?UTF-8?q?fix=EF=BC=9A=E5=9B=BD=E9=99=85=E5=8C=96?= =?UTF-8?q?=E6=9B=BF=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/detailView/list/alertRule/alertRuleDetail.vue | 2 +- nezha-fronted/src/components/common/rightBox/alertRuleBox.vue | 4 ++-- .../src/components/common/table/alert/alertRuleTable.vue | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nezha-fronted/src/components/common/detailView/list/alertRule/alertRuleDetail.vue b/nezha-fronted/src/components/common/detailView/list/alertRule/alertRuleDetail.vue index 01742bf03..f0941a92c 100644 --- a/nezha-fronted/src/components/common/detailView/list/alertRule/alertRuleDetail.vue +++ b/nezha-fronted/src/components/common/detailView/list/alertRule/alertRuleDetail.vue @@ -137,7 +137,7 @@ export default { width: 120, sortable: 'custom' }, { - label: this.$t('alert.config.receiver'), + label: this.$t('alert.receiver'), prop: 'receivers', show: false, minWidth: 100 diff --git a/nezha-fronted/src/components/common/rightBox/alertRuleBox.vue b/nezha-fronted/src/components/common/rightBox/alertRuleBox.vue index 62e3e3b09..4d901525f 100644 --- a/nezha-fronted/src/components/common/rightBox/alertRuleBox.vue +++ b/nezha-fronted/src/components/common/rightBox/alertRuleBox.vue @@ -100,7 +100,7 @@ - + - +