fix: 1.对浏览器resize 事件进行优化2.更改kBps为Kbps
This commit is contained in:
@@ -94,8 +94,8 @@
|
||||
entityData.bytesSentRate
|
||||
? unitConvert(
|
||||
entityData.bytesSentRate,
|
||||
unitTypes.byte,
|
||||
).join(' ') + 'ps'
|
||||
unitTypes.bps,
|
||||
).join(' ')
|
||||
: '-'
|
||||
}}</span>
|
||||
<!-- 曲线-->
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<div class="row__label row__label--width130">{{$t('overall.throughput')}}</div>
|
||||
<div class="row__contents">
|
||||
<div class="row__content">
|
||||
<div class="row__charts-msg">{{$t('overall.sent')}}:{{unitConvert(entityData.bytesSentRate, unitTypes.byte).join(' ')}}ps</div>
|
||||
<div class="row__charts-msg">{{$t('overall.sent')}}:{{unitConvert(entityData.bytesSentRate, unitTypes.bps).join(' ')}}</div>
|
||||
<!-- 曲线-->
|
||||
<div class="row__charts" :id="`entityDetailSend${entityData.appName}`" ></div>
|
||||
</div>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<div class="row__label row__label--width130">{{$t('overall.throughput')}}</div>
|
||||
<div class="row__contents">
|
||||
<div class="row__content">
|
||||
<div class="row__charts-msg">{{$t('overall.sent')}}:{{unitConvert(entityData.bytesSentRate, unitTypes.byte).join(' ')}}ps</div>
|
||||
<div class="row__charts-msg">{{$t('overall.sent')}}:{{unitConvert(entityData.bytesSentRate, unitTypes.bps).join(' ')}}</div>
|
||||
<!-- 曲线-->
|
||||
<div class="row__charts" :id="`entityDetailSend${entityData.domainName}`" ></div>
|
||||
</div>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<div class="row__label row__label--width130">{{$t('overall.dnsServerInfo.queryRate')}}</div>
|
||||
<div class="row__contents">
|
||||
<div class="row__content">
|
||||
<div class="row__charts-msg">{{unitConvert(entityData.queryRate, unitTypes.byte).join(' ')}}ps</div>
|
||||
<div class="row__charts-msg">{{unitConvert(entityData.queryRate, unitTypes.bps).join(' ')}}</div>
|
||||
<!-- 曲线-->
|
||||
<div class="row__charts" :id="`entityDnsServerInfo${entityData.ipAddr}`"></div>
|
||||
</div>
|
||||
@@ -62,7 +62,7 @@
|
||||
<div class="row__label row__label--width130">{{$t('overall.throughput')}}</div>
|
||||
<div class="row__contents">
|
||||
<div class="row__content">
|
||||
<div class="row__charts-msg">{{$t('overall.sent')}}:{{unitConvert(entityData.bytesSentRate, unitTypes.byte).join(' ')}}ps</div>
|
||||
<div class="row__charts-msg">{{$t('overall.sent')}}:{{unitConvert(entityData.bytesSentRate, unitTypes.bps).join(' ')}}</div>
|
||||
<!-- 曲线-->
|
||||
<div class="row__charts" :id="`entityDetailSend${entityData.ipAddr}`"></div>
|
||||
</div>
|
||||
|
||||
@@ -350,11 +350,12 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
window.addEventListener('resize', this.$_.debounce(this.resize, 200))
|
||||
this.debounceFunc = this.$_.debounce(this.resize, 200)
|
||||
window.addEventListener('resize', this.debounceFunc)
|
||||
this.chartOption = _.cloneDeep(entityListLineOption)
|
||||
setTimeout(() => { this.queryEntityDetail() })
|
||||
},
|
||||
beforeUnmount () {
|
||||
window.removeEventListener('resize', this.resize)
|
||||
window.removeEventListener('resize', this.debounceFunc)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -313,7 +313,8 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
window.addEventListener('resize', this.$_.debounce(this.resize, 200))
|
||||
this.debounceFunc = this.$_.debounce(this.resize, 200)
|
||||
window.addEventListener('resize', this.debounceFunc)
|
||||
this.chartOption = _.cloneDeep(entityListLineOption)
|
||||
this.entityData = _.cloneDeep(this.entity)
|
||||
setTimeout(() => {
|
||||
@@ -323,6 +324,6 @@ export default {
|
||||
})
|
||||
},
|
||||
beforeUnmount () {
|
||||
window.removeEventListener('resize', this.resize)
|
||||
window.removeEventListener('resize', this.debounceFunc)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user