perf: 优化首页加载速度 (#6461)

This commit is contained in:
zhengkunwang
2024-09-11 14:12:16 +00:00
committed by GitHub
parent fc70345fcd
commit d2ca265cc2
8 changed files with 239 additions and 148 deletions
+6
View File
@@ -105,4 +105,10 @@ export namespace Dashboard {
power: string;
memoryUtil: string;
}
export interface DashboardReq {
scope: string;
ioOption: string;
netOption: string;
}
}
+2 -2
View File
@@ -9,8 +9,8 @@ export const loadBaseInfo = (ioOption: string, netOption: string) => {
return http.get<Dashboard.BaseInfo>(`/dashboard/base/${ioOption}/${netOption}`);
};
export const loadCurrentInfo = (ioOption: string, netOption: string) => {
return http.get<Dashboard.CurrentInfo>(`/dashboard/current/${ioOption}/${netOption}`);
export const loadCurrentInfo = (req: Dashboard.DashboardReq) => {
return http.post<Dashboard.CurrentInfo>(`/dashboard/current`, req);
};
export const systemRestart = (operation: string) => {