chore: watch api
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { request } from '@umijs/max';
|
||||
import { ListItem } from '../config/types';
|
||||
import { GPUDeviceItem, ListItem } from '../config/types';
|
||||
|
||||
export const WORKERS_API = '/workers';
|
||||
export const GPU_DEVICES_API = '/gpu-devices';
|
||||
|
||||
export async function queryWorkersList(
|
||||
params: Global.Pagination & { query?: string }
|
||||
@@ -11,3 +12,18 @@ export async function queryWorkersList(
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
export async function queryGpuDevicesList(
|
||||
params: Global.Pagination & { query?: string }
|
||||
) {
|
||||
return request<Global.PageResponse<GPUDeviceItem>>(`${GPU_DEVICES_API}`, {
|
||||
methos: 'GET',
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
export async function queryGPUDeviceItem(id: string) {
|
||||
return request<GPUDeviceItem>(`${GPU_DEVICES_API}/${id}`, {
|
||||
methos: 'GET'
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user