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 @@