feat(frontend): 在状态监控中显示 CPU 型号并启用网络图提示

在 CPU 卡片中增加型号文本展示,补充更完整的设备信息。
同时为紧凑模式下的网络历史图启用 tooltip,便于查看带宽细节。
This commit is contained in:
yinjianm
2026-05-01 23:16:11 +08:00
parent 2233e3fa4f
commit 6975037414
5 changed files with 18 additions and 4 deletions
@@ -9,5 +9,5 @@
"done": 0, "done": 0,
"percent": 0, "percent": 0,
"current": "重设计目录树样式 — 紧凑树视图", "current": "重设计目录树样式 — 紧凑树视图",
"updated_at": "2026-05-01 21:35:15" "updated_at": "2026-05-01 23:06:29"
} }
@@ -91,11 +91,11 @@
| 时间 | 事件 | 详情 | | 时间 | 事件 | 详情 |
|------|------|------| |------|------|------|
| 2026-05-01 21:25:50 | 进度快照(自动) | 完成:0 失败:0 跳过:0 待做:10 (0%) |
| 2026-05-01 21:27:46 | 进度快照(自动) | 完成:0 失败:0 跳过:0 待做:10 (0%) | | 2026-05-01 21:27:46 | 进度快照(自动) | 完成:0 失败:0 跳过:0 待做:10 (0%) |
| 2026-05-01 21:28:56 | 进度快照(自动) | 完成:0 失败:0 跳过:0 待做:10 (0%) | | 2026-05-01 21:28:56 | 进度快照(自动) | 完成:0 失败:0 跳过:0 待做:10 (0%) |
| 2026-05-01 21:33:06 | 进度快照(自动) | 完成:0 失败:0 跳过:0 待做:10 (0%) | | 2026-05-01 21:33:06 | 进度快照(自动) | 完成:0 失败:0 跳过:0 待做:10 (0%) |
| 2026-05-01 21:35:15 | 进度快照(自动) | 完成:0 失败:0 跳过:0 待做:10 (0%) | | 2026-05-01 21:35:15 | 进度快照(自动) | 完成:0 失败:0 跳过:0 待做:10 (0%) |
| 2026-05-01 23:06:29 | PreCompact快照 | 完成:0 失败:0 跳过:0 待做:10 (0%) |
## 执行备注 ## 执行备注
+1 -1
View File
@@ -1 +1 @@
2026-05-01T21:36:14.234134 2026-05-01T23:11:52.792686
@@ -57,6 +57,8 @@
<StatusMonitorCpuHistoryChart :cpu-history="currentCpuHistory" :compact="true" class="sm-mini-chart" /> <StatusMonitorCpuHistoryChart :cpu-history="currentCpuHistory" :compact="true" class="sm-mini-chart" />
</div> </div>
<div v-if="cpuModelLabel" class="sm-cpu-model">{{ cpuModelLabel }}</div>
<div class="sm-cpu-cores"> <div class="sm-cpu-cores">
<div <div
v-for="item in cpuCoreItems" v-for="item in cpuCoreItems"
@@ -486,6 +488,8 @@ const networkRateUnitLabel = computed(() => {
const processPreviewItems = computed<readonly ProcessListItem[]>(() => topProcessPreview.value.slice(0, 4)); const processPreviewItems = computed<readonly ProcessListItem[]>(() => topProcessPreview.value.slice(0, 4));
const cpuModelLabel = computed(() => cachedCpuModel.value || null);
const copyIpToClipboard = async (ipAddress: string | null) => { const copyIpToClipboard = async (ipAddress: string | null) => {
if (!ipAddress) return; if (!ipAddress) return;
try { try {
@@ -699,6 +703,16 @@ const copyIpToClipboard = async (ipAddress: string | null) => {
.sm-link-btn--icon i { font-size: 10px; } .sm-link-btn--icon i { font-size: 10px; }
/* ── CPU ── */ /* ── CPU ── */
.sm-cpu-model {
color: #94a3b8;
font-size: 11px;
line-height: 1.3;
padding: 0 2px 4px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.sm-cpu-cores { .sm-cpu-cores {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@@ -171,7 +171,7 @@ const networkChartOptions = computed<ChartOptions<'line'>>(() => ({
display: false, display: false,
}, },
tooltip: { tooltip: {
enabled: !props.compact, enabled: true,
mode: 'index', mode: 'index',
intersect: false, intersect: false,
displayColors: true, displayColors: true,