forgeplus-react/src/service/task.ts

59 lines
1.4 KiB
TypeScript

import Fetch from '@/utils/fetch';
export async function saveWithTPI(params?: any) {
return Fetch(`/api/jupyters/save_with_tpi.json`, {
method: 'Get',
params
});
}
export async function getJupyterData(params?: any) {
return Fetch(`/api/tasks/${params.identifier}/jupyter.json`, {
method: 'Get',
params
});
}
export async function getInfoWithTPI(params?: any) {
return Fetch(`/api/jupyters/get_info_with_tpi.json`, {
method: 'Get',
params
});
}
export async function getTimeInfoWithTPI(params?: any) {
return Fetch(`/api/jupyters/timeinfo_with_tpi.json`, {
method: 'Get',
params
});
}
export async function resetWithTPI(params?: any) {
return Fetch(`/api/jupyters/reset_with_tpi.json`, {
method: 'Get',
params
});
}
export async function activeWithTPI(params?: any) {
return Fetch(`/api/jupyters/active_with_tpi.json`, {
method: 'Get',
params
});
}
export async function syncCode(params?: any) {
return Fetch(`/api/myshixuns/${params.identifier}/sync_code.json`, {
method: 'Post',
params
});
}
export async function getDataSets(params?: any) {
return Fetch(`/api/shixuns/${params.identifier}/get_data_sets.json`, {
method: 'Get',
params
});
}
// 重启window 云主机
export async function rebootEsc(params?: any) {
return Fetch(`/api/tasks/${params.identifier}/reboot_esc.json`, {
method: 'post',
});
}