1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-03-03 12:34:14 +08:00
1Panel/frontend/src/api/modules/dashboard.ts

19 lines
628 B
Go
Raw Normal View History

2022-11-24 23:56:48 +08:00
import http from '@/api';
import { Dashboard } from '../interface/dashboard';
export const loadOsInfo = () => {
return http.get<Dashboard.OsInfo>(`/dashboard/base/os`);
};
2022-11-24 23:56:48 +08:00
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 systemRestart = (operation: string) => {
return http.post(`/dashboard/system/restart/${operation}`);
};