sync dashboard tab

This commit is contained in:
Timi
2026-04-13 14:55:15 +08:00
parent df6c6b78c9
commit a6c89717a6
3 changed files with 92 additions and 24 deletions

View File

@@ -12,7 +12,13 @@
title="运行时长"
:note="Time.duration(Time.now() - snapshotView?.snapshot?.os?.bootAt)"
/>
<t-cell title="更多" arrow @click="router.push('/server/system-detail')" />
<t-cell title="更多" arrow @click="router.push({
path: '/server/system-detail',
query: {
tab: 'server'
}
})"
/>
</t-cell-group>
<t-cell-group class="section performance" title="资源" theme="card">
<t-cell-info label="CPU" :value="Text.display(snapshotView?.snapshot?.cpu?.model)">
@@ -46,7 +52,13 @@
<t-icon name="arrow-down" />
</template>
</t-cell>
<t-cell title="更多" arrow @click="router.push('/server/performance-detail')" />
<t-cell title="更多" arrow @click="router.push({
path: '/server/performance-detail',
query: {
tab: 'server'
}
})"
/>
</t-cell-group>
<t-cell-group class="section disk" title="磁盘" theme="card">
<t-cell-info
@@ -66,7 +78,13 @@
:note="Text.unit(item.used / item.total * 100, '%')"
/>
</t-cell-info>
<t-cell title="更多" arrow @click="router.push('/server/partitions-detail')" />
<t-cell title="更多" arrow @click="router.push({
path: '/server/partitions-detail',
query: {
tab: 'server'
}
})"
/>
</t-cell-group>
</template>
<t-empty v-else description="暂无系统状态数据" />
@@ -124,7 +142,7 @@ import SystemAPI from "@/api/SystemAPI";
import type { SystemStatusHistoryPoint, SystemStatusSnapshotView } from "@/types/System";
import type { DashboardHistoryMetric } from "@/store/settingStore";
import { useSettingStore } from "@/store/settingStore";
import { IOSize, type LabelValue, Text, Time, Toolkit } from "timi-web";
import { IOSize, type LabelValue, Text, Time } from "timi-web";
import TCellInfo from "@/components/TCellInfo.vue";
import type { ProgressItem } from "@/components/ProgressGroup.vue";
import ProgressGroup from "@/components/ProgressGroup.vue";