From 63a66268a226c152a3dd258402dbd9e17e247774 Mon Sep 17 00:00:00 2001 From: wangwenrui Date: Thu, 4 Jun 2020 15:09:19 +0800 Subject: [PATCH 1/2] =?UTF-8?q?perf:=E4=BE=A7=E6=BB=91=E6=96=B0=E5=A2=9E/?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E9=A1=B5=E9=9D=A2label=20=E5=92=8C=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E6=A1=86=E7=BB=9F=E4=B8=80=E4=B8=BA=E5=B7=A6=E5=8F=B3?= =?UTF-8?q?=E5=88=86=E5=B8=83=E3=80=81=E5=8F=B3=E5=AF=B9=E9=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/common/bottomBox/tabs/panelTab.vue | 3 +++ .../src/components/common/rightBox/addEndpointBox.vue | 2 +- .../src/components/common/rightBox/alertConfigBox.vue | 2 +- .../src/components/common/rightBox/cabinetBox.vue | 2 +- nezha-fronted/src/components/common/rightBox/dcBox.vue | 2 +- .../src/components/common/rightBox/editEndpointBox.vue | 6 +++--- nezha-fronted/src/components/common/rightBox/mibBox.vue | 4 ++-- nezha-fronted/src/components/common/rightBox/modelBox.vue | 8 ++++---- .../src/components/common/rightBox/moduleBox.vue | 2 +- nezha-fronted/src/components/common/rightBox/panelBox.vue | 2 +- .../src/components/common/rightBox/projectBox.vue | 2 +- nezha-fronted/src/components/page/config/promServer.vue | 2 +- 12 files changed, 20 insertions(+), 17 deletions(-) diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/panelTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/panelTab.vue index 8cd602bf9..1bdd801b4 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/panelTab.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/panelTab.vue @@ -426,6 +426,9 @@ this.$put('/model/syncChart',param).then(response=>{ if(response.code == 200){ this.$message({duration: 1000, type: 'success', message: this.$t("tip.syncSuccess")}); + if(this.from == 'asset'){ + this.Refresh(); + } }else{ console.error(response.msg) this.$message.error(response.msg) diff --git a/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue b/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue index 28769993b..da8392f75 100644 --- a/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue +++ b/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue @@ -12,7 +12,7 @@ - + diff --git a/nezha-fronted/src/components/common/rightBox/alertConfigBox.vue b/nezha-fronted/src/components/common/rightBox/alertConfigBox.vue index 00bcf652b..7741a14f9 100644 --- a/nezha-fronted/src/components/common/rightBox/alertConfigBox.vue +++ b/nezha-fronted/src/components/common/rightBox/alertConfigBox.vue @@ -21,7 +21,7 @@ - + diff --git a/nezha-fronted/src/components/common/rightBox/cabinetBox.vue b/nezha-fronted/src/components/common/rightBox/cabinetBox.vue index 606a76947..f1d5beaad 100644 --- a/nezha-fronted/src/components/common/rightBox/cabinetBox.vue +++ b/nezha-fronted/src/components/common/rightBox/cabinetBox.vue @@ -20,7 +20,7 @@ - +
{{cabinet.name}}
diff --git a/nezha-fronted/src/components/common/rightBox/dcBox.vue b/nezha-fronted/src/components/common/rightBox/dcBox.vue index 2ac024362..056202e92 100644 --- a/nezha-fronted/src/components/common/rightBox/dcBox.vue +++ b/nezha-fronted/src/components/common/rightBox/dcBox.vue @@ -20,7 +20,7 @@ - +
{{currentDc.name}}
diff --git a/nezha-fronted/src/components/common/rightBox/editEndpointBox.vue b/nezha-fronted/src/components/common/rightBox/editEndpointBox.vue index 1189f0a1a..3f593337c 100644 --- a/nezha-fronted/src/components/common/rightBox/editEndpointBox.vue +++ b/nezha-fronted/src/components/common/rightBox/editEndpointBox.vue @@ -20,7 +20,7 @@ - + @@ -137,7 +137,8 @@ +
-
diff --git a/nezha-fronted/src/components/common/rightBox/mibBox.vue b/nezha-fronted/src/components/common/rightBox/mibBox.vue index 1553be501..a04bcc3aa 100644 --- a/nezha-fronted/src/components/common/rightBox/mibBox.vue +++ b/nezha-fronted/src/components/common/rightBox/mibBox.vue @@ -20,7 +20,7 @@ - + - + @@ -69,9 +69,9 @@
- - - + + +
diff --git a/nezha-fronted/src/components/common/rightBox/moduleBox.vue b/nezha-fronted/src/components/common/rightBox/moduleBox.vue index c0e02e8dd..27ca49fcf 100644 --- a/nezha-fronted/src/components/common/rightBox/moduleBox.vue +++ b/nezha-fronted/src/components/common/rightBox/moduleBox.vue @@ -20,7 +20,7 @@ - + diff --git a/nezha-fronted/src/components/common/rightBox/panelBox.vue b/nezha-fronted/src/components/common/rightBox/panelBox.vue index bac40d8b2..914bcb045 100644 --- a/nezha-fronted/src/components/common/rightBox/panelBox.vue +++ b/nezha-fronted/src/components/common/rightBox/panelBox.vue @@ -16,7 +16,7 @@ - + diff --git a/nezha-fronted/src/components/common/rightBox/projectBox.vue b/nezha-fronted/src/components/common/rightBox/projectBox.vue index 5a3ea605a..072ced069 100644 --- a/nezha-fronted/src/components/common/rightBox/projectBox.vue +++ b/nezha-fronted/src/components/common/rightBox/projectBox.vue @@ -18,7 +18,7 @@
{{rightBox.title}}
- +
{{project.name}}
diff --git a/nezha-fronted/src/components/page/config/promServer.vue b/nezha-fronted/src/components/page/config/promServer.vue index 1ba86f920..b0a06ce29 100644 --- a/nezha-fronted/src/components/page/config/promServer.vue +++ b/nezha-fronted/src/components/page/config/promServer.vue @@ -120,7 +120,7 @@ - From 06d33dbf8012770028764d2ce1d58d96a637984c Mon Sep 17 00:00:00 2001 From: wangwenrui Date: Thu, 4 Jun 2020 16:42:27 +0800 Subject: [PATCH 2/2] =?UTF-8?q?NEZ-311=20fix:alert=20list=E5=9B=BE?= =?UTF-8?q?=E8=A1=A8=20=E8=B0=83=E6=95=B4=E5=A4=A7=E5=B0=8F=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=8F=82=E6=95=B0=E9=94=99=E8=AF=AFbug=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=20&=20=E9=A1=B9=E7=9B=AE=E5=85=B6=E4=BB=96=E5=9B=BE?= =?UTF-8?q?=E8=A1=A8=E8=B0=83=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;