implement Docker
This commit is contained in:
@@ -14,13 +14,13 @@
|
||||
<t-cell-info label="磁盘型号" :value="Text.display(item.diskModel)" />
|
||||
<t-cell-info label="磁盘序列号" :value="Text.display(item.diskSerial)" />
|
||||
<t-cell title="分区 ID" :note="Text.display(item.partitionId)" />
|
||||
<t-cell title="分区名称" :note="Text.display(item.partitionName)" />
|
||||
<t-cell-info label="分区名称" :value="Text.display(item.partitionName)" />
|
||||
<t-cell title="分区类型" :note="Text.display(item.partitionType)" />
|
||||
<t-cell-info label="UUID" :value="Text.display(item.uuid)" />
|
||||
<t-cell title="总容量" :note="IOSize.format(item.total)" />
|
||||
<t-cell title="已使用" :note="IOSize.format(item.used)" />
|
||||
<t-cell title="可用容量" :note="IOSize.format(resolveAvailableBytes(item))" />
|
||||
<t-cell title="使用率" :note="Text.unit(resolveUsageRate(item) * 100, '%')" />
|
||||
<t-cell title="可用容量" :note="IOSize.format(item.total - item.used)" />
|
||||
<t-cell title="使用率" :note="Text.unit(item.used / item.total * 100, '%')" />
|
||||
<t-cell
|
||||
v-if="typeof item.transferTimeMs === 'number'"
|
||||
title="传输耗时"
|
||||
@@ -74,24 +74,13 @@ onUnmounted(() => {
|
||||
|
||||
function resolvePartitionTitle(item: Partition): string {
|
||||
const mountPoint = Text.display(item.mountPoint);
|
||||
const partitionName = Text.display(item.partitionName);
|
||||
if (partitionName !== "-") {
|
||||
return `${mountPoint} (${partitionName})`;
|
||||
const partitionId = Text.display(item.partitionId);
|
||||
if (partitionId !== "-") {
|
||||
return `${mountPoint} (${partitionId})`;
|
||||
}
|
||||
return mountPoint;
|
||||
}
|
||||
|
||||
function resolveUsageRate(item: Partition): number {
|
||||
if (item.total < 1) {
|
||||
return 0;
|
||||
}
|
||||
return item.used / item.total;
|
||||
}
|
||||
|
||||
function resolveAvailableBytes(item: Partition): number {
|
||||
return Math.max(item.total - item.used, 0);
|
||||
}
|
||||
|
||||
async function refreshDetail(): Promise<void> {
|
||||
if (isLoading.value) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user