diff --git a/resource/static/manifest-en-US.json b/resource/static/manifest-en-US.json
index 894a13b..c32a0dd 100644
--- a/resource/static/manifest-en-US.json
+++ b/resource/static/manifest-en-US.json
@@ -15,13 +15,13 @@
"purpose": "maskable"
},
{
- "src": "//static/manifest-512x512.png",
+ "src": "/static/manifest-512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "any"
},
{
- "src": "//static/manifest-512x512.png",
+ "src": "/static/manifest-512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
diff --git a/resource/template/theme-default/header.html b/resource/template/theme-default/header.html
index 59dbc18..72cc42a 100644
--- a/resource/template/theme-default/header.html
+++ b/resource/template/theme-default/header.html
@@ -3,11 +3,13 @@
+ {{ .Title }}
+
{{ if eq .Conf.Language "zh-CN" }}
diff --git a/resource/template/theme-default/home.html b/resource/template/theme-default/home.html
index cc51b2c..0bcb0e5 100644
--- a/resource/template/theme-default/home.html
+++ b/resource/template/theme-default/home.html
@@ -194,7 +194,7 @@
]
},
mixins: [mixinsVue],
- created() {
+ created() {
this.servers = JSON.parse('{{.Servers}}').servers;
this.group()
},
diff --git a/resource/template/theme-default/network.html b/resource/template/theme-default/network.html
index bff7248..f2d671c 100644
--- a/resource/template/theme-default/network.html
+++ b/resource/template/theme-default/network.html
@@ -36,7 +36,11 @@
defaultTemplate: {{.Conf.Site.Theme}},
templates: {{.Themes}},
servers: initData,
- option: {
+ option: {}
+ },
+ mixins: [mixinsVue],
+ created() {
+ this.option = {
tooltip: {
trigger: 'axis',
position: function (pt) {
@@ -69,15 +73,6 @@
right: this.isMobile ? '8%' : '3.8%',
},
backgroundColor: '',
- toolbox: {
- feature: {
- dataZoom: {
- yAxisIndex: 'none'
- },
- restore: {},
- saveAsImage: {}
- }
- },
dataZoom: [
{
type: 'slider',
@@ -94,10 +89,8 @@
boundaryGap: false
},
series: [],
- },
- chartOnOff: true,
+ }
},
- mixins: [mixinsVue],
mounted() {
this.renderChart();
this.parseMonitorInfo(monitorInfo);
@@ -237,6 +230,20 @@
this.option.title.text = monitorInfo.result[0].server_name;
this.option.series = tSeries;
this.option.legend.data = tLegendData;
+ const maxLegendsPerRowMobile = localStorage.getItem("maxLegendsPerRowMobile") ? localStorage.getItem("maxLegendsPerRowMobile") : 2;
+ const maxLegendsPerRowPc = localStorage.getItem("maxLegendsPerRowPc") ? localStorage.getItem("maxLegendsPerRowPc") : 6;
+ const autoIncrement = Math.floor((tLegendData.length - 1) / (this.isMobile ? maxLegendsPerRowMobile : maxLegendsPerRowPc)) * (this.isMobile ? 28 : 34);
+ const height = 520 + autoIncrement;
+ const gridTop = 60 + autoIncrement;
+ this.option.grid = {
+ left: this.isMobile ? '8%' : '3.8%',
+ right: this.isMobile ? '8%' : '3.8%',
+ top: gridTop
+ };
+ this.myChart.resize({
+ width: 'auto',
+ height: height
+ });
this.myChart.clear();
this.myChart.setOption(this.option);
},
diff --git a/resource/template/theme-server-status/header.html b/resource/template/theme-server-status/header.html
index 692bb09..bb742f8 100644
--- a/resource/template/theme-server-status/header.html
+++ b/resource/template/theme-server-status/header.html
@@ -8,6 +8,7 @@
+
{{if eq .Conf.Language "zh-CN"}}