perf: overview纵坐标、tooltip格式化
This commit is contained in:
@@ -137,7 +137,7 @@ const cn = {
|
||||
unit: "单位",
|
||||
legend: "图例",
|
||||
legendTip: "使用名称或表达式控制时间序列的名称。例如{{hostname}将替换为标签主机名的标签值。",
|
||||
option: "操作"
|
||||
option: "操作",
|
||||
},
|
||||
chartTableColumn: {
|
||||
metric: "指标",
|
||||
@@ -209,6 +209,7 @@ const cn = {
|
||||
overview: {
|
||||
title: "系统总览",
|
||||
contentTitle: "Nezha 管理系统",
|
||||
traffic: '流量',
|
||||
asset: {
|
||||
title: "资产",
|
||||
assetType: "资产类型",
|
||||
|
||||
@@ -214,6 +214,7 @@ const en = {
|
||||
overview:{
|
||||
title:'Overview',
|
||||
contentTitle:'Nezha Management System',
|
||||
traffic: 'Traffic',
|
||||
asset:{
|
||||
title:'Asset',
|
||||
assetType:'Asset type',
|
||||
|
||||
@@ -234,6 +234,10 @@
|
||||
trigger: 'axis',
|
||||
confine: false,
|
||||
extraCssText:'z-index:1000;',
|
||||
formatter: function(v, i) {
|
||||
console.info(v)
|
||||
return v;
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
left: 6,
|
||||
@@ -287,7 +291,20 @@
|
||||
show: false
|
||||
},
|
||||
axisLabel: {
|
||||
fontSize: 13*window.devicePixelRatio
|
||||
fontSize: 13*window.devicePixelRatio,
|
||||
formatter: function(value, i) {
|
||||
let y;
|
||||
if (value < 1000) {
|
||||
y = value + " Bs";
|
||||
} else if (value < 1000000) {
|
||||
y = value/1000 + " KBs";
|
||||
} else if (value >= 1000000) {
|
||||
y = value/1000000 + " MBs";
|
||||
} else {
|
||||
y = value/1000000000 + " GBs";
|
||||
}
|
||||
return y;
|
||||
}
|
||||
}
|
||||
},
|
||||
useUTC: false,//使用本地时间
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
<div class="content-row-box">
|
||||
<div class="content-col-box">
|
||||
<div class="content-col-title">
|
||||
<span>{{$t("dashboard.overview.alert.chart.chartTitle")}}</span>
|
||||
<span>{{$t("dashboard.overview.traffic")}}</span>
|
||||
<span class="content-col-title-tools">
|
||||
<time-picker ref="calendarPanel" class="nz-dashboard-picker" @change="dateChange"></time-picker>
|
||||
<!--<el-dropdown trigger="hover" :show-timeout="0" size="small" :hide-on-click="false" @command="selectDatacenter">
|
||||
@@ -95,7 +95,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="content-col-content">
|
||||
<chart-box chart-type="overviewLine" ref="chartbox" :show-toolbox="false" name="trend"></chart-box>
|
||||
<chart-box chart-type="overviewLine" ref="chartbox" :show-toolbox="false" name="trend" :unit="15"></chart-box>
|
||||
<div class="no-data-tip" v-if="(!chartSeries[0] && !chartSeries[1]) || (chartSeries[0].data.length == 0 && chartSeries[1] && chartSeries[1].data.length == 0)">N/A</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -456,7 +456,7 @@
|
||||
if(response.status == 'success'){
|
||||
if(response.data.result){
|
||||
let series={
|
||||
name: 'ifInOctets',
|
||||
name: 'RX',
|
||||
symbol:'none', //去掉点
|
||||
smooth:true, //曲线变平滑
|
||||
data: [],
|
||||
@@ -479,7 +479,7 @@
|
||||
if(response.status == 'success'){
|
||||
if(response.data.result){
|
||||
let series={
|
||||
name: 'ifOutOctets',
|
||||
name: 'TX',
|
||||
symbol:'none', //去掉点
|
||||
smooth:true, //曲线变平滑
|
||||
data: [],
|
||||
|
||||
Reference in New Issue
Block a user