|
78 | 78 | <n-flex vertical :size="20" class="basis-1/3"> |
79 | 79 | <n-card title="用户情况报告" :bordered="false" class="report-card"> |
80 | 80 | <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> |
82 | 82 | <n-progress |
83 | 83 | style="margin: 0 8px 12px 0; width: 90px" |
84 | 84 | type="circle" |
85 | | - :percentage="20" |
| 85 | + :percentage="datausageinfo.total_used_capacity / datausageinfo.total_capacity" |
86 | 86 | :color="themeVars.infoColor" |
87 | 87 | :rail-color="changeColor(themeVars.infoColor, { alpha: 0.2 })" |
88 | 88 | :indicator-text-color="themeVars.infoColor"> |
|
138 | 138 | <div><Icon name="ri:secure-payment-fill" /></div> |
139 | 139 | </template> |
140 | 140 | <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> |
142 | 146 | </n-thing> |
143 | 147 | </n-list-item> |
144 | 148 | <n-list-item class="basis-1/3 mx-2" style="background-color: var(--n-color)"> |
|
147 | 151 | <Icon name="ri:list-settings-fill" /> |
148 | 152 | </template> |
149 | 153 | <template #header>减少冗余存储类奇偶校验</template> |
150 | | - <template #header-extra>n/a</template> |
| 154 | + <template #header-extra> |
| 155 | + {{ stroageinfo.backend?.RRSCParity }} |
| 156 | + <!-- n/a --> |
| 157 | + </template> |
151 | 158 | </n-thing> |
152 | 159 | </n-list-item> |
153 | 160 | </n-list> |
@@ -229,13 +236,27 @@ import { niceBytes } from "../../utils/functions" |
229 | 236 |
|
230 | 237 | const systemInfo: any = ref({}) |
231 | 238 | const getSystemInfo = async () => { |
232 | | - const res = await systemApi.getSystemInfo() |
| 239 | + const res: any = await systemApi.getSystemInfo() |
233 | 240 | systemInfo.value = res |
234 | 241 | } |
235 | 242 |
|
| 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 | +
|
236 | 255 | const getPageData = async () => { |
237 | 256 | await getSystemInfo() |
238 | 257 | await getServerInfo() |
| 258 | + await getdatausageinfo() |
| 259 | + await getstroageinfo() |
239 | 260 | } |
240 | 261 | getPageData() |
241 | 262 |
|
|
0 commit comments