mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-22 09:10:25 +08:00
节点看板磁盘缓存用量增加剩余磁盘空间
This commit is contained in:
@@ -33,7 +33,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="ui column">
|
<div class="ui column">
|
||||||
<h4>磁盘缓存用量</h4>
|
<h4>磁盘缓存用量</h4>
|
||||||
<div class="value"><span>{{board.cacheDiskSize}}</span></div>
|
<div class="value"><span>{{board.cacheDiskSize}}</span><span class="small" :class="{grey: !cacheDirAvailWarning, red: cacheDirAvailWarning}" style="font-size: 0.9em" v-if="cacheDirAvail.length > 0">剩余{{cacheDirAvail}}</span></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui column">
|
<div class="ui column">
|
||||||
<h4>内存缓存用量</h4>
|
<h4>内存缓存用量</h4>
|
||||||
|
|||||||
@@ -428,10 +428,13 @@ Tea.context(function () {
|
|||||||
|
|
||||||
this.cacheDirUsed = ""
|
this.cacheDirUsed = ""
|
||||||
this.cacheDirTotal = ""
|
this.cacheDirTotal = ""
|
||||||
|
this.cacheDirAvail = ""
|
||||||
|
this.cacheDirAvailWarning = false
|
||||||
if (this.cacheDirValues.length > 0) {
|
if (this.cacheDirValues.length > 0) {
|
||||||
this.cacheDirUsed = teaweb.formatBytes(this.cacheDirValues.$last().value.dirs[0].used)
|
this.cacheDirUsed = teaweb.formatBytes(this.cacheDirValues.$last().value.dirs[0].used)
|
||||||
this.cacheDirTotal = teaweb.formatBytes(this.cacheDirValues.$last().value.dirs[0].total)
|
this.cacheDirTotal = teaweb.formatBytes(this.cacheDirValues.$last().value.dirs[0].total)
|
||||||
this.cacheDirAvail = teaweb.formatBytes(this.cacheDirValues.$last().value.dirs[0].avail)
|
this.cacheDirAvail = teaweb.formatBytes(this.cacheDirValues.$last().value.dirs[0].avail)
|
||||||
|
this.cacheDirAvailWarning = (this.cacheDirValues.$last().value.dirs[0].avail < 1024 * 1024 * 1024 * 10)
|
||||||
}
|
}
|
||||||
this.reloadCacheDirsChart = function () {
|
this.reloadCacheDirsChart = function () {
|
||||||
let axis = {unit: "%", divider: 1}
|
let axis = {unit: "%", divider: 1}
|
||||||
|
|||||||
Reference in New Issue
Block a user