mirror of
https://github.com/acepanel/panel.git
synced 2026-02-07 03:17:24 +08:00
feat: 跑分插件
This commit is contained in:
9
web/src/api/apps/benchmark/index.ts
Normal file
9
web/src/api/apps/benchmark/index.ts
Normal 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 })
|
||||
}
|
||||
@@ -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'),
|
||||
// 统计信息
|
||||
|
||||
Reference in New Issue
Block a user