From fe6be3050965192d5fe761602f911d650e4bfb5e Mon Sep 17 00:00:00 2001 From: zhangyu Date: Thu, 19 May 2022 15:42:06 +0800 Subject: [PATCH 1/8] =?UTF-8?q?NEZ-1864=20fix=EF=BC=9AExplore=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=97=A5=E5=BF=97=E5=86=85=E5=AE=B9=E5=90=8E=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E7=9B=B4=E6=8E=A5=E4=BF=9D=E5=AD=98=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E5=88=B0dashboard?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../page/dashboard/explore/exploreItem.vue | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue b/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue index 7ebe5d651..219e17222 100644 --- a/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue +++ b/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue @@ -42,6 +42,16 @@ @click="saveChart"> {{$t('dashboard.metric.saveChart')}} +
@@ -981,6 +991,43 @@ export default { this.chartData = chart this.rightBox.show = true }, + saveChartLogs () { + const chart = { + id: '', + name: '', + panelName: '', + span: 4, + height: 4, + unit: 2, + groupId: -1, + updateBy: 1, + updateAt: '2022-05-18 07:51:45', + type: 'log', + weight: 6, + param: { limit: 100 }, + pid: null, + buildIn: 0, + seq: null, + x: 0, + y: 1.93, + elements: [], + children: null, + chartNums: null, + asset: null, + varType: null, + varId: null, + varName: null, + datasource: 'logs', + enable: { thresholds: false, legend: true, valueMapping: false }, + sync: 0, + remark: '' + } + this.expressions.forEach((exp, index) => { + chart.elements.push({ expression: exp, legend: '', type: 'expert', id: '', name: 'A' }) + }) + this.chartData = chart + this.rightBox.show = true + }, createSuccess (panel) { // 添加chart成功 this.$confirm(this.$t('dashboard.metric.goPanelTip'), this.$t('tip.saveSuccess'), { confirmButtonText: this.$t('tip.yes'), From ee3640387c85a3edb0fb10f4a3bc6b946e48c086 Mon Sep 17 00:00:00 2001 From: likexuan Date: Tue, 31 May 2022 16:54:00 +0800 Subject: [PATCH 2/8] =?UTF-8?q?NEZ-1869=20perf=20:=20=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E5=A4=87=E4=BB=BD=E9=A1=B5=E9=9D=A2=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../assets/css/components/page/config/backups.scss | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/nezha-fronted/src/assets/css/components/page/config/backups.scss b/nezha-fronted/src/assets/css/components/page/config/backups.scss index 9df7c6dd3..e56d434cc 100644 --- a/nezha-fronted/src/assets/css/components/page/config/backups.scss +++ b/nezha-fronted/src/assets/css/components/page/config/backups.scss @@ -164,4 +164,17 @@ .el-table--border th:first-child .cell { padding-left: 20px !important; } + .el-checkbox-button__inner{ + background-color:$--background-color-empty; + } + .el-checkbox-button.is-checked .el-checkbox-button__inner { + color: #fff; + background-color: #FA901C; + border-color: #FA901C; + -webkit-box-shadow: -1px 0 0 0 #fcbc77; + box-shadow: -1px 0 0 0 #fcbc77; + } + .nz-icon-delete:before{ + color: $--color-text-regular; + } } From 62adfbdc58849b9fffa13ae004c0d51fe1884d22 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Tue, 31 May 2022 17:31:32 +0800 Subject: [PATCH 3/8] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=94=B9=20=E9=BB=91?= =?UTF-8?q?=E6=9A=97=E4=B8=BB=E9=A2=98=E4=B8=8B=20ping=20trace=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E7=9A=84=E9=97=AE=E9=A2=98=20=E4=BB=A5=E5=8F=8Achart-?= =?UTF-8?q?line=20=E6=9C=80=E5=A4=A7=E5=80=BC=E4=B8=BA=E8=B4=9F=E6=95=B0?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/assets/css/common.scss | 6 ++++ .../common/globalSearch/globalSearch.scss | 4 +++ .../css/components/page/config/profile.scss | 2 +- .../assets/css/components/page/tool/ping.scss | 9 ++++++ .../src/assets/css/themes/theme-dark.scss | 2 +- .../chart/chart/chartTimeSeries.vue | 10 +++++- .../src/components/chart/chart/legend.vue | 12 +++++++ .../chart/chart/line-chart-block.vue | 11 +++++++ .../common/globalSearch/globalSearch.vue | 2 +- .../common/globalSearch/searchItemInfo.vue | 2 +- .../components/common/mixin/editRigthBox.js | 31 ++++++++++++++++++- .../common/rightBox/asset/assetBox.vue | 10 +++--- .../common/rightBox/editEndpointBoxNew.vue | 6 ++-- .../page/dashboard/overview/chart.vue | 11 +++++++ .../src/components/page/dashboard/panel.vue | 1 - .../page/monitor/endpoint/endpointList.vue | 7 +++++ .../src/components/page/tool/ping.vue | 1 - .../src/components/page/tool/trace.vue | 1 - 18 files changed, 113 insertions(+), 15 deletions(-) diff --git a/nezha-fronted/src/assets/css/common.scss b/nezha-fronted/src/assets/css/common.scss index 8b7ae3520..1edc6bd60 100644 --- a/nezha-fronted/src/assets/css/common.scss +++ b/nezha-fronted/src/assets/css/common.scss @@ -415,3 +415,9 @@ td .nz-icon-gear:before{ input, textarea { font-family: Inter-Regular !important; } +.message-next{ + vertical-align: bottom; + float: unset; + font-size: 10px; + margin-left: 190px; +} diff --git a/nezha-fronted/src/assets/css/components/common/globalSearch/globalSearch.scss b/nezha-fronted/src/assets/css/components/common/globalSearch/globalSearch.scss index 31d7fd38b..ec04b7f67 100644 --- a/nezha-fronted/src/assets/css/components/common/globalSearch/globalSearch.scss +++ b/nezha-fronted/src/assets/css/components/common/globalSearch/globalSearch.scss @@ -217,3 +217,7 @@ .fz12{ font-size: 12px; } +.el-skeleton__item{ + //background-color: $--background-color-disabled !important; + //background-image: unset !important; +} diff --git a/nezha-fronted/src/assets/css/components/page/config/profile.scss b/nezha-fronted/src/assets/css/components/page/config/profile.scss index f5d494b36..a50ba360e 100644 --- a/nezha-fronted/src/assets/css/components/page/config/profile.scss +++ b/nezha-fronted/src/assets/css/components/page/config/profile.scss @@ -225,7 +225,7 @@ } .list-page.profile-right { width: calc(100% - 370px); - padding: 0px 0px 7px 0px; + padding: 0; pxbox-shadow: 0 1px 2px 0 rgba(0,0,0,0.06); border-radius: 2px; .nz-table2 { diff --git a/nezha-fronted/src/assets/css/components/page/tool/ping.scss b/nezha-fronted/src/assets/css/components/page/tool/ping.scss index 2501a2f23..8fc1ee71d 100644 --- a/nezha-fronted/src/assets/css/components/page/tool/ping.scss +++ b/nezha-fronted/src/assets/css/components/page/tool/ping.scss @@ -251,6 +251,7 @@ } .right-content-box{ width: 380px; + color: $--color-text-primary; } .tools-header-right-content{ margin-left: 30px; @@ -410,3 +411,11 @@ } } +td.el-table__expanded-cell { + padding: 0 0 0 60px; + background-color: $--popover-background-color !important; +} +td.el-table__expanded-cell:hover { + padding: 0 0 0 60px; + background-color: $--background-color-base !important; +} diff --git a/nezha-fronted/src/assets/css/themes/theme-dark.scss b/nezha-fronted/src/assets/css/themes/theme-dark.scss index bd66a71b8..31c4d2011 100644 --- a/nezha-fronted/src/assets/css/themes/theme-dark.scss +++ b/nezha-fronted/src/assets/css/themes/theme-dark.scss @@ -253,7 +253,7 @@ $--right-box-sub-title-border-color: $--border-color-light; $--tooltip-background-color: #222329; $--tooltip-border-color: rgba(112,116,122,0.6); /* 17.label*/ -$--label-background-color: #18171D; +$--label-background-color: $--background-color-empty; /*** themes/common.scss是与主题切换无关的变量 ***/ @import './src/common/var.scss'; diff --git a/nezha-fronted/src/components/chart/chart/chartTimeSeries.vue b/nezha-fronted/src/components/chart/chart/chartTimeSeries.vue index 36d54fa15..63c9fe4de 100644 --- a/nezha-fronted/src/components/chart/chart/chartTimeSeries.vue +++ b/nezha-fronted/src/components/chart/chart/chartTimeSeries.vue @@ -158,11 +158,19 @@ export default { minValue = valueSorted.length ? valueSorted[0][1] : 0 maxValue = valueSorted.length ? valueSorted[valueSorted.length - 1][1] : 0 const unit = chartDataFormat.getUnit(chartUnit) + minValue = minValue > 0 ? 0 : minValue if (!isNaN(maxValue)) { maxValue = Number(maxValue) } else { maxValue = 0 } + if (maxValue < 0) { + maxValue = Math.abs(maxValue) + } + if (Math.abs(minValue) > Math.abs(maxValue)) { + maxValue = Math.abs(minValue) + } + maxValue = maxValue - minValue maxValue = chartDataFormat.formatDatas(maxValue, unit.type, 'ceil', unit.ascii) // 取最大值后 需要对其进行取整 let oldValue = maxValue let dot = 0 @@ -192,7 +200,7 @@ export default { offset = Number.parseInt(offset) const localOffset = new Date().getTimezoneOffset() * 60 * 1000 * -1 // 默认 一分钟显示时区偏移的结果 if (window.dataJson) { - offset = new Date().getTimezoneOffset()* -1/60 + offset = new Date().getTimezoneOffset() * -1 / 60 } const tData = new Date(value - localOffset + offset * 60 * 60 * 1000) let hour = tData.getHours() diff --git a/nezha-fronted/src/components/chart/chart/legend.vue b/nezha-fronted/src/components/chart/chart/legend.vue index fc080b4e8..39aecf264 100644 --- a/nezha-fronted/src/components/chart/chart/legend.vue +++ b/nezha-fronted/src/components/chart/chart/legend.vue @@ -226,9 +226,21 @@ export default { const chartUnit = chartInfo.unit ? chartInfo.unit : 2 const unit = chartDataFormat.getUnit(chartUnit) minValue = minValue > 0 ? 0 : minValue + if (maxValue < 0) { + maxValue = Math.abs(maxValue) + } + if (Math.abs(minValue) > Math.abs(maxValue)) { + maxValue = Math.abs(minValue) + } maxValue = maxValue - minValue maxValue = chartDataFormat.formatDatas(maxValue, unit.type, 'ceil', unit.ascii) let oldValue = maxValue + if (maxValue < 0) { + oldValue = Math.abs(maxValue) + } + if (minValue < 0) { + oldValue = Math.abs(maxValue - minValue) + } let dot = 0 if (maxValue == 1) { dot++ diff --git a/nezha-fronted/src/components/chart/chart/line-chart-block.vue b/nezha-fronted/src/components/chart/chart/line-chart-block.vue index 2a338c70e..4b45429bf 100644 --- a/nezha-fronted/src/components/chart/chart/line-chart-block.vue +++ b/nezha-fronted/src/components/chart/chart/line-chart-block.vue @@ -2071,6 +2071,17 @@ export default { const chartUnit = chartInfo.unit ? chartInfo.unit : 2 const unit = chartDataFormat.getUnit(chartUnit) minValue = minValue > 0 ? 0 : minValue + if (!isNaN(maxValue)) { + maxValue = Number(maxValue) + } else { + maxValue = 0 + } + if (maxValue < 0) { + maxValue = Math.abs(maxValue) + } + if (Math.abs(minValue) > Math.abs(maxValue)) { + maxValue = Math.abs(minValue) + } maxValue = maxValue - minValue maxValue = chartDataFormat.formatDatas(maxValue, unit.type, 'ceil', unit.ascii) let oldValue = maxValue diff --git a/nezha-fronted/src/components/common/globalSearch/globalSearch.vue b/nezha-fronted/src/components/common/globalSearch/globalSearch.vue index 69d2fa6cf..02f8dc935 100644 --- a/nezha-fronted/src/components/common/globalSearch/globalSearch.vue +++ b/nezha-fronted/src/components/common/globalSearch/globalSearch.vue @@ -11,7 +11,7 @@
- +