2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-07 03:17:24 +08:00

feat: 跑分插件

This commit is contained in:
耗子
2024-10-20 01:34:22 +08:00
parent 2be97a4543
commit 0d9c8b3a2d
16 changed files with 1048 additions and 12 deletions

View File

@@ -0,0 +1,9 @@
import type { AxiosResponse } from 'axios'
import { request } from '@/utils'
export default {
// 运行评分
test: (name: string, multi: boolean): Promise<AxiosResponse<any>> =>
request.post('/apps/benchmark/test', { name, multi })
}

View File

@@ -1,7 +1,8 @@
import type { AxiosResponse } from 'axios'
import { request } from '@/utils'
import type { AxiosResponse } from 'axios'
import type { RequestConfig } from '~/types/axios'
export default {
// 面板信息
panel: (): Promise<Response> => fetch('/api/dashboard/panel'),
@@ -11,7 +12,7 @@ export default {
homeApps: (): Promise<AxiosResponse<any>> => request.get('/dashboard/homeApps'),
// 实时信息
current: (nets: string[], disks: string[]): Promise<AxiosResponse<any>> =>
request.post('/dashboard/current', { nets, disks }),
request.post('/dashboard/current', { nets, disks }, { noNeedTip: true } as RequestConfig),
// 系统信息
systemInfo: (): Promise<AxiosResponse<any>> => request.get('/dashboard/systemInfo'),
// 统计信息