diff --git a/ui/src/api/monitor/dataSource.ts b/ui/src/api/monitor/dataSource.ts new file mode 100644 index 0000000..6fcbf0e --- /dev/null +++ b/ui/src/api/monitor/dataSource.ts @@ -0,0 +1,65 @@ +import { http } from '@/utils/http/axios'; + +/** + * @description: 列表 + */ +export function getDataSourceList(params?) { + return http.request({ + url: '/data/source/page', + method: 'GET', + params, + }); +} + +/** + * @description: 根据ID获取详情 + */ +export function getDataSourceDetail(id) { + return http.request({ + url: '/data/source/detail/' + id, + method: 'get', + }); +} + +/** + * @description: 添加 + */ +export function dataSourceAdd(data: any) { + return http.request({ + url: '/data/source/add', + method: 'POST', + data, + }); +} + +/** + * @description: 更新 + */ +export function dataSourceUpdate(data: any) { + return http.request({ + url: '/data/source/update', + method: 'PUT', + data, + }); +} + +/** + * @description: 删除 + */ +export function dataSourceDelete(id) { + return http.request({ + url: '/data/source/delete/' + id, + method: 'DELETE', + }); +} + +/** + * @description: 批量删除 + */ +export function dataSourceBatchDelete(data: any) { + return http.request({ + url: '/data/source/batchDelete', + method: 'DELETE', + data, + }); +}