Skip to content

Commit 397ebae

Browse files
committed
fix : 数据
1 parent 836e762 commit 397ebae

File tree

1 file changed

+26
-5
lines changed

1 file changed

+26
-5
lines changed

pages/performance/index.vue

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@
7878
<n-flex vertical :size="20" class="basis-1/3">
7979
<n-card title="用户情况报告" :bordered="false" class="report-card">
8080
<n-flex :size="20" justify="space-between" align="center">
81-
<span class="text-3xl font-bold">292 MiB</span>
81+
<span class="text-3xl font-bold">{{ niceBytes(datausageinfo.total_used_capacity) }}</span>
8282
<n-progress
8383
style="margin: 0 8px 12px 0; width: 90px"
8484
type="circle"
85-
:percentage="20"
85+
:percentage="datausageinfo.total_used_capacity / datausageinfo.total_capacity"
8686
:color="themeVars.infoColor"
8787
:rail-color="changeColor(themeVars.infoColor, { alpha: 0.2 })"
8888
:indicator-text-color="themeVars.infoColor">
@@ -138,7 +138,11 @@
138138
<div><Icon name="ri:secure-payment-fill" /></div>
139139
</template>
140140
<template #header>标准存储类奇偶校验</template>
141-
<template #header-extra>n/a</template>
141+
<template #header-extra>
142+
<!-- {{ stroageinfo.backend.StandardSCParity }}/{{ stroageinfo.backend.StandardSCParity }} -->
143+
<!-- n/a -->
144+
{{ stroageinfo.backend?.StandardSCParity }}
145+
</template>
142146
</n-thing>
143147
</n-list-item>
144148
<n-list-item class="basis-1/3 mx-2" style="background-color: var(--n-color)">
@@ -147,7 +151,10 @@
147151
<Icon name="ri:list-settings-fill" />
148152
</template>
149153
<template #header>减少冗余存储类奇偶校验</template>
150-
<template #header-extra>n/a</template>
154+
<template #header-extra>
155+
{{ stroageinfo.backend?.RRSCParity }}
156+
<!-- n/a -->
157+
</template>
151158
</n-thing>
152159
</n-list-item>
153160
</n-list>
@@ -229,13 +236,27 @@ import { niceBytes } from "../../utils/functions"
229236
230237
const systemInfo: any = ref({})
231238
const getSystemInfo = async () => {
232-
const res = await systemApi.getSystemInfo()
239+
const res: any = await systemApi.getSystemInfo()
233240
systemInfo.value = res
234241
}
235242
243+
const datausageinfo: any = ref({})
244+
const getdatausageinfo = async () => {
245+
const res = await systemApi.getDataUsageInfo()
246+
datausageinfo.value = res
247+
}
248+
249+
const stroageinfo: any = ref({})
250+
const getstroageinfo = async () => {
251+
const res = await systemApi.getStorageInfo()
252+
stroageinfo.value = res
253+
}
254+
236255
const getPageData = async () => {
237256
await getSystemInfo()
238257
await getServerInfo()
258+
await getdatausageinfo()
259+
await getstroageinfo()
239260
}
240261
getPageData()
241262

0 commit comments

Comments
 (0)