You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.ts 1.6 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. import { request } from '@umijs/max';
  2. // 查询开发环境url
  3. export function getJupyterUrl() {
  4. return request(`/api/mmp/jupyter/getURL`, {
  5. method: 'GET',
  6. });
  7. }
  8. // 查询 labelStudio url
  9. export function getLabelStudioUrl() {
  10. return request(`/api/mmp/labelStudio/getURL`, {
  11. method: 'GET',
  12. skipLoading: true,
  13. });
  14. }
  15. // 创建编辑器
  16. export function createEditorReq(data: any) {
  17. return request(`/api/mmp/devEnvironment`, {
  18. method: 'POST',
  19. data,
  20. });
  21. }
  22. // 获取编辑器列表
  23. export function getEditorListReq(params: any) {
  24. return request(`/api/mmp/devEnvironment`, {
  25. method: 'GET',
  26. params,
  27. });
  28. }
  29. // 获取编辑器详情
  30. export function getEditorInfoReq(id: number) {
  31. return request(`/api/mmp/devEnvironment/${id}`, {
  32. method: 'GET',
  33. });
  34. }
  35. // 创建编辑器
  36. export function deleteEditorReq(id: number) {
  37. return request(`/api/mmp/devEnvironment/${id}`, {
  38. method: 'DELETE',
  39. });
  40. }
  41. // 启动编辑器
  42. export function startEditorReq(id: number) {
  43. return request(`/api/mmp/jupyter/run/${id}`, {
  44. method: 'POST',
  45. });
  46. }
  47. // 停止编辑器
  48. export function stopEditorReq(id: number) {
  49. return request(`/api/mmp/jupyter/stop/${id}`, {
  50. method: 'DELETE',
  51. });
  52. }
  53. // 制作镜像
  54. export function createEditorMirrorReq(data: any) {
  55. return request(`/api/mmp/image/saveImage`, {
  56. method: 'POST',
  57. data,
  58. });
  59. }
  60. // 获取知识图谱的url
  61. export function getKnowledgeGraphUrl() {
  62. return request(`/api/mmp/knowledgeGraph/getURL`, {
  63. method: 'GET',
  64. skipLoading: true,
  65. });
  66. }