perf: 重构跟踪任务

This commit is contained in:
TsMask
2024-09-20 18:20:01 +08:00
parent f8439bb40a
commit 84dac247d2
11 changed files with 398 additions and 515 deletions

39
src/api/trace/pcap.ts Normal file
View File

@@ -0,0 +1,39 @@
import { request } from '@/plugins/http-fetch';
// 网元抓包PACP 开始
export function dumpStart(data: Record<string, string>) {
return request({
url: '/trace/tcpdump/start',
method: 'post',
data: data,
});
}
// 网元抓包PACP 结束
export function dumpStop(data: Record<string, string>) {
return request({
url: '/trace/tcpdump/stop',
method: 'post',
data: data,
});
}
// 网元抓包PACP 下载
export function dumpDownload(data: Record<string, any>) {
return request({
url: '/trace/tcpdump/download',
method: 'get',
params: data,
responseType: 'blob',
timeout: 60_000,
});
}
// UPF标准版内部抓包
export function traceUPF(data: Record<string, string>) {
return request({
url: '/trace/tcpdump/upf',
method: 'post',
data: data,
});
}