From 3a733c85ad4026687eeb198ed0927cfa94ac0291 Mon Sep 17 00:00:00 2001
From: xykt <152045469+xykt@users.noreply.github.com>
Date: Sun, 24 Mar 2024 13:33:19 +0800
Subject: [PATCH] =?UTF-8?q?=E7=BE=8E=E5=8C=96=E4=B8=89=E7=BD=91=E5=BB=B6?=
=?UTF-8?q?=E8=BF=9F=E7=95=8C=E9=9D=A2=20(#335)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* Update network.html
修复以下问题:
- 延迟默认最高300ms,超过后默认抹平
- 曲线上有很多ping值为0的无效散点,导致毛刺很多,干扰效果
- 图标的y轴比例失调,上方大片留白,大大降低了有效显示区域
- 默认只显示最近不到半小时左右的延迟表现,想看全天需要拖动,影响效果
- 曲线不显示极大极小值,不够直观
* Update config.go
修复了以下问题:
- 延迟默认最高300ms,超过后默认抹平
- 曲线上有很多ping值为0的无效散点,导致毛刺很多,干扰效果
- 图标的y轴比例失调,上方大片留白,大大降低了有效显示区域
- 默认只显示最近不到半小时左右的延迟表现,想看全天需要拖动,影响效果
- 曲线不显示极大极小值,不够直观
* Update network.html
美化了三网延迟界面:
1. 将Marker缩小降低曲线遮挡
2. 设置为曲线对应的颜色使其更加直观
3. 设置Marker透明度降低对画面的影响
4. 将延迟极小值的Marker倒置显示以快速区别极大值
5. 将超过MaxTCPPingValue的点删除
6. 显示丢包分布(细线),以及服务器断流区间(粗线)
* Update network.html
* Update network.html
* Update network.html
* Update network.html
---
resource/template/theme-daynight/network.html | 355 +++++++++++-------
resource/template/theme-default/network.html | 44 ++-
resource/template/theme-mdui/network.html | 40 +-
.../template/theme-server-status/network.html | 38 +-
4 files changed, 331 insertions(+), 146 deletions(-)
diff --git a/resource/template/theme-daynight/network.html b/resource/template/theme-daynight/network.html
index b413673..6ac655b 100644
--- a/resource/template/theme-daynight/network.html
+++ b/resource/template/theme-daynight/network.html
@@ -107,149 +107,250 @@
+ legendName = monitorInfo.result[i].monitor_name +" "+ lossRate + "%";
+ tLegendData.push(legendName);
+ tSeries.push({
+ name: legendName,
+ type: 'line',
+ smooth: true,
+ symbol: 'none',
+ data: data,
+ markPoint: {
+ data: [
+ { type: 'max', symbol: 'pin', name: 'Max', itemStyle: { color: rgbaColorMarker }, symbolSize: 30, label: { fontSize: 8 } },
+ { type: 'min', symbol: 'pin', name: 'Min', itemStyle: { color: rgbaColorMarker }, symbolSize: 30, label: { fontSize: 8, offset: [0, 7.5] }, symbolRotate: 180 }
+ ]
+ }
+ });
+ tSeries.push({
+ name: legendName,
+ type: 'bar',
+ smooth: true,
+ symbol: 'none',
+ data: datal,
+ itemStyle: { color: rgbaColorBar }
+ });
+ }
+ this.option.title.text = monitorInfo.result[0].server_name;
+ this.option.series = tSeries;
+ this.option.legend.data = tLegendData;
+ this.myChart.clear();
+ this.myChart.setOption(this.option);
+ },
+ this.option.title.text = monitorInfo.result[0].server_name;
+ this.option.series = tSeries;
+ this.option.legend.data = tLegendData;
+ this.myChart.clear();
+ this.myChart.setOption(this.option);
+ },
+ isWindowsPlatform(str) {
+ return str.includes('Windows')
+ },
+ renderChart() {
+ this.myChart = echarts.init(this.$refs.chartDom);
+ this.myChart.setOption(this.option);
+ },
+ resizeHandle () {
+ this.myChart.resize();
+ },
+ },
+ beforeDestroy() {
+ this.myChart.dispose();
+ this.myChart = null;
+ },
+ });
+