修复ServerStatus主题Bug (#346)
This commit is contained in:
parent
f3c90bbf59
commit
66b4c88c24
@ -28,7 +28,7 @@
|
|||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/js/bootstrap.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/js/bootstrap.min.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.14"></script>
|
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.14"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/echarts@5.5.0/dist/echarts.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/echarts@5.5.0/dist/echarts.min.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/echarts/map/js/world.js" integrity="md5-ZmUzMzZlOGQyYzk2NTgwNGRlMzRlNTliZDgyYTY1OGUgIC0=" crossorigin="anonymous"></script>
|
<script src="https://cdn.jsdelivr.net/npm/echarts/map/js/world.js"></script>
|
||||||
<script src="/static/theme-server-status/js/mixin.js?v20240302"></script>
|
<script src="/static/theme-server-status/js/mixin.js?v20240302"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -123,6 +123,7 @@
|
|||||||
console.log('init countryMapChartData not complete');
|
console.log('init countryMapChartData not complete');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const unit = this.language=='zh-CN' ? '台' : 'servers';
|
||||||
const isMobile = this.checkIsMobile();
|
const isMobile = this.checkIsMobile();
|
||||||
const width = isMobile ? 338 : 1102;
|
const width = isMobile ? 338 : 1102;
|
||||||
const height = isMobile ? 200 : 500;
|
const height = isMobile ? 200 : 500;
|
||||||
@ -153,8 +154,7 @@
|
|||||||
trigger: 'item',
|
trigger: 'item',
|
||||||
formatter: function (params) {
|
formatter: function (params) {
|
||||||
if (params.data && params.data.value > 0) {
|
if (params.data && params.data.value > 0) {
|
||||||
const unit = this.language=='zh-CN' ? '台' : ' Servers';
|
return params.name + ' ' + params.data.value + ' ' + unit;
|
||||||
return params.name + ' ' + params.data.value + unit;
|
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user