From 06d33dbf8012770028764d2ce1d58d96a637984c Mon Sep 17 00:00:00 2001 From: wangwenrui Date: Thu, 4 Jun 2020 16:42:27 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-311=20fix:alert=20list=E5=9B=BE=E8=A1=A8=20?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=A4=A7=E5=B0=8F=E6=8E=A5=E5=8F=A3=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E9=94=99=E8=AF=AFbug=E4=BF=AE=E5=A4=8D=20&=20?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=85=B6=E4=BB=96=E5=9B=BE=E8=A1=A8=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E7=BA=BF=E7=9A=84width?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/charts/chart-alert-list.vue | 29 +++++++++++++++---- .../src/components/charts/chartPreview.vue | 16 ++++++++-- .../components/charts/line-chart-block.vue | 4 +++ .../common/bottomBox/tabs/alertMessageTab.vue | 6 +++- .../bottomBox/tabs/endpointQueryTab.vue | 6 +++- .../src/components/page/alert/list.vue | 6 +++- .../components/page/dashboard/chartBox.vue | 2 +- .../page/dashboard/metricPreview.vue | 6 +++- .../page/dashboard/overview/overview2.vue | 8 +++++ .../src/components/page/dashboard/panel.vue | 4 +-- 10 files changed, 71 insertions(+), 16 deletions(-) diff --git a/nezha-fronted/src/components/charts/chart-alert-list.vue b/nezha-fronted/src/components/charts/chart-alert-list.vue index e6180da5f..c0b0966bc 100644 --- a/nezha-fronted/src/components/charts/chart-alert-list.vue +++ b/nezha-fronted/src/components/charts/chart-alert-list.vue @@ -7,7 +7,7 @@
-
+
module>endpoint 查询只传最细粒度 - let param=this.chartInfo.param; + let chart=null; + if(chartInfo){ + chart=Object.assign({},chartInfo) + }else{ + chart=Object.assign({},this.chartInfo) + } + if(chart&&chart.param){ //按照粒度,project>module>endpoint 查询只传最细粒度 + let param=chart.param; if(param.endpointId&¶m.endpointId != ''){ queryParam.endpointId=param.endpointId; }else{ @@ -887,7 +903,8 @@ export default { next:parseInt(_this.data.next), } targetDiv.style.height = (Math.round((containerHeight+_this.chartSpaceHeight)/10)*10-_this.chartSpaceHeight)+'px';//图表实际渲染高度,采用个位数字四舍五入 - _this.$put('panel/'+ _this.panelIdInner+'/charts/modify',modifyParams).then(response => { + console.log('chart-alert-panel-id='+this.panelId) + _this.$put('panel/'+this.panelId+'/charts/modify',modifyParams).then(response => { if (response.code === 200) { //更新当前图表数据 _this.data.span= span; diff --git a/nezha-fronted/src/components/charts/chartPreview.vue b/nezha-fronted/src/components/charts/chartPreview.vue index 6e2886175..7fa6449e8 100644 --- a/nezha-fronted/src/components/charts/chartPreview.vue +++ b/nezha-fronted/src/components/charts/chartPreview.vue @@ -57,7 +57,7 @@
{{chart.title}} -
+
- + 0) { series.data=response.data.result[0].values.map((item)=>{ @@ -545,6 +549,10 @@ smooth:0.2, //曲线变平滑 data: [], type:'line', + lineStyle: { + width: 1, + opacity: 0.9 + }, }; if (response.data.result.length > 0) { series.data=response.data.result[0].values.map((item)=>{ diff --git a/nezha-fronted/src/components/page/dashboard/panel.vue b/nezha-fronted/src/components/page/dashboard/panel.vue index dd4ca3e75..ee1cdc48c 100644 --- a/nezha-fronted/src/components/page/dashboard/panel.vue +++ b/nezha-fronted/src/components/page/dashboard/panel.vue @@ -593,7 +593,7 @@ margin-top: 3px; text-align:left; border-radius:4px; - width:120px; + width:260px; height:24px; border:solid 1px #d8dce1; white-space: nowrap; @@ -602,7 +602,7 @@ } .panel-list-title { min-height:24px; - width:100px; + width:236px; white-space: nowrap; overflow-x: hidden; text-overflow: ellipsis;