From 8885463a75423231356578594a129ef26d4fbcb5 Mon Sep 17 00:00:00 2001 From: ssongliu Date: Fri, 30 Oct 2026 15:18:44 +0800 Subject: [PATCH] feat(dashboard): add system and GPU status views (#14251) --- frontend/src/views/home/index.vue | 19 +- frontend/src/views/home/status/gpu.vue | 407 +++++++++++++++++++++++ frontend/src/views/home/status/index.vue | 263 ++------------- 3 files changed, 458 insertions(+), 231 deletions(-) create mode 100644 frontend/src/views/home/status/gpu.vue diff --git a/frontend/src/views/home/index.vue b/frontend/src/views/home/index.vue index 4202675d3..db80877cf 100644 --- a/frontend/src/views/home/index.vue +++ b/frontend/src/views/home/index.vue @@ -72,8 +72,14 @@ + | null = null; let initialSampleTimer: ReturnType | null = null; let isInit = ref(true); @@ -678,6 +685,16 @@ const currentInfo = ref({ shotTime: new Date(), }); +const hasGPU = computed(() => + [currentInfo.value.gpuData, currentInfo.value.npuData, currentInfo.value.xpuData].some((items) => items?.length), +); +const statusView = computed({ + get: () => (hasGPU.value && statusOption.value === 'gpu' ? 'gpu' : 'system'), + set: (value: 'system' | 'gpu') => { + statusOption.value = value; + localStorage.setItem('dashboard_status_view', value); + }, +}); const currentChartInfo = reactive({ ioReadBytes: 0, ioWriteBytes: 0, diff --git a/frontend/src/views/home/status/gpu.vue b/frontend/src/views/home/status/gpu.vue new file mode 100644 index 000000000..1d0c96990 --- /dev/null +++ b/frontend/src/views/home/status/gpu.vue @@ -0,0 +1,407 @@ + + + + + + diff --git a/frontend/src/views/home/status/index.vue b/frontend/src/views/home/status/index.vue index 834e3bbcf..716aaf5dc 100644 --- a/frontend/src/views/home/status/index.vue +++ b/frontend/src/views/home/status/index.vue @@ -1,6 +1,6 @@