mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-10-30 08:05:43 +00:00
perf: 优化首页加载速度 (#6461)
This commit is contained in:
@@ -105,4 +105,10 @@ export namespace Dashboard {
|
||||
power: string;
|
||||
memoryUtil: string;
|
||||
}
|
||||
|
||||
export interface DashboardReq {
|
||||
scope: string;
|
||||
ioOption: string;
|
||||
netOption: string;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user