Files
YG_FT/frontend/src/api/modules/system.ts

13 lines
451 B
TypeScript
Raw Normal View History

import { get, post } from '../request'
import type { SystemInfo, HealthMetrics } from '@/types'
/** 系统信息CPU/内存/磁盘/GPU/网络/系统) */
export const getSystemInfo = () => get<SystemInfo>('/system-info')
/** 健康指标(顶部栏轻量指标) */
export const getHealth = () => get<HealthMetrics>('/health')
/** 登录 */
export const login = (username: string, password: string) =>
post('/login', { username, password })